Gtmhub provides a fully exposed RESTful API with endpoints that cover all the aspects of Gtmhub.
You can explore the API documentation, as well as test it out at: https://app.gtmhub.com/api/v1/docs/
Two key parameters
When working with Gtmhub, you will need two parameters for any given call:
- API token for authentication
- Gtmhub account id - to identify the account for which you are making the request
You can generate API token in Gtmhub configuration. To do so, follow these steps:
- Log in to Gtmhub
- Navigate to Setup > Configuration
- Select API tokens from the menu on the left
To generate an API token you need to give it a name and select the user that will be impersonated through this API token. The permissions you will have through the API depend on the permissions that impersonated user has.
Example: If the user you are impersonating does not have a permission to create new objectives, you will not be able to create objectives through the API.
- Set the name of the API token
- Select the user that API will impersonate
You can easily find the Account ID in the API Tokens screen.
The Gtmhub API's entity names differ from the UI terminology Here is a short list of the most important mapping
UI term API term
Objective -> Goal
Key result -> Metric
Effort -> Task
Using the API
You can use Gtmhub API from any programming language or environment that supports REST protocol.
Here is a sample that illustrates how to get all objectives for your given account using Restlet Client.
If you need help with any aspect of Gtmhub API please contact us.