Articles on: Technical Support

TruGrid API

TruGrid API



Overview
The TruGrid API enables customers and partners to interact programmatically with the TruGrid platform.

The TruGrid API enables the following functionality:
Manage MFA settings for users
Manage User-Machine Assignments
Initiate an Active Directory sync to sync resources
Manage allowed UPN suffixes

We do plan to expand this functionality in the future. It does not provide any reporting functionality at this time. Please feel free to submit feedback on functionality you would like to see included in it.


How to obtain an API key
To utilize the TruGrid API, you will need an API key provisioned for your company. This key can be used for your primary domain and any customer domains (if you are an MSP). You can request an API key via email to help@trugrid.com. When requesting an API key, please provide:
Your TruGrid admin login email address and domain name.
Up to 15 external facing IP address the requests would initiate from. Only requests from those IP addresses will be processed.


API Interaction Rules
The below rules are applicable to all API endpoints listed in this document:
API supports HTTP method POST
Authentication header required (“api_key”)
To select domain for which request should be executed, domain DNS should be passed as query parameter called domainName
Example: https:// {api url}/{api_route}?domainName=domain.com
Other data required for API should be passed through the request body as JSON. The exact format will be listed in the specific API description.
Request body cannot contain more than 100 elements.
User’s UPN or domain’s DNS should be passed in corresponding format or else request will not be executed


Turn ON MFA
Description: API designed to turn ON MFA for users if it was previously disabled.
Request URI: https:// {api url}/api/public/turnOnMfa
Query parameters: domainName – DNS name of domain
Request Body: list of user’s UPNs.


Turn OFF MFA
Description: API designed to turn OFF MFA for users. It cannot be disabled for users with an Admin role.
Request URI: https:// {api url}/api/public/turnOffMfa
Query parameters:
domainName – DNS name of domain
Request Body: list of user’s UPNs.


Reset MFA
Description: API designed to reset MFA for users. This cannot be done if the MFA is not set, or it is turned OFF.
Request URI: https:// {api url}/api/public/resetMfa
Query parameters:
domainName – DNS name of domain
resetPhone – parameter which indicates if phone number should be reset.
Can have 2 values: true or false. (If true then phone number will also be reset.)
Request Body: list of user’s UPNs.


Create User-Machine Assignments
Description: API designed to create assignment between user/user group and machine/machine group (same as Resource Assignments on TruGrid portal).
Request URI: https:// {api url}/api/public/addUserMachineAssignment
Query parameters: domainName – DNS name of domain
Request Body: list of key-value pairs, where key is user’s UPN or user’s group name, and value is list of machines and/or machine’s group names. Keys should be unique.


Sync Newly Added Users
Description: API designed to synchronize users added directly into TG-Users group in AD.
Request URI: https:// {api url}/api/public/syncAddedAdUsers
Query parameters: domainName – DNS name of domain.
Request Body: list of user’s UPNs.


Sync Newly Added Machines
Description: API designed to synchronize machines added directly into TG-Machines group in AD.
Request URI: https:// {api url}/api/public/syncAddedAdMachines
Query parameters: domainName – DNS name of domain
Request Body: list of machine’s names.


Sync Newly Added User Groups
Description: API designed to synchronize user’s groups added directly into TG-Users group in AD.
Request URI: https:// {api url}/api/public/syncAddedAdUserGroups
Query parameters: domainName – DNS name of domain
Request Body: list of user’s group names.


Sync Newly Added Machine Groups
Description: API designed to synchronize machine’s groups added directly into TG-Machines group in AD.
Request URI: https:// {api url}/api/public/syncAddedAdMachineGroups
Query parameters: domainName – DNS name of domain
Request Body: list of machine’s groups names.


Add Allowed UPN Suffixes
Description: API designed to add allowed UPN suffix for specific domain. Passed DNS names cannot match any of the already registered domains in TruGrid or already have been added as UPN suffix to another domain.
Request URI: https:// {api url}/api/public/addUpnSuffix
Query parameters: domainName – DNS name of domain
RequestBody: list of domain’s DNS.

Updated on: 18/02/2025

Was this article helpful?

Share your feedback

Cancel

Thank you!