Objectives endpoints
In the Gtmhub REST API Goals is the programmatic name of Objectives. All endpoints listed in this section enable you to perform CRUD operations with Objectives.
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
fields | string | List of fields to be retrieved, separated by comas (,). expected in query, sample value: name,description |
sort | string | List of fields separated by comas (,).
To invert a field's sort, you can prefix its name with a minus (-).
For example, the following expression: sort=-name,dateCreated would return entities in reverse lexicographical order and then ordered by dateCreated. expected in query, sample value: -name,dateCreated |
filter | string | The format of the parameter is inspired by the MongoDB query format.
For example, the following expression {name: {$in: ["sales", "marketing"]}} would return all the entities that have name either "sales" or "marketing".
This expression {"name":{$regex:".*Sales.*"}} would return entities that contain "Sales" in their names. expected in query, sample value: {name: {$in: ["sales", "marketing"]}} |
skip | integer | How many entities to be skipped when executing a GET query.
By default skip value is 0. expected in query, sample value: 5 |
limit | integer | The max number of entities that can be returned by the GET query.
By default take value is 100. expected in query, sample value: 10 |
formatting | string | The formatting used for the description and custom fields of type text area.
By default returned as 'mentionsMarkup'.
Ex: "@[John Smith:[email protected]:602a65efc05575000123291b]".
Use 'plainText' if you need the response to be returned without markdown and special markup.
Ex: "@John Smith" expected in query, sample value: plainText |
200 | goalsResponse |
401 | unauthorized |
curl -X GET 'https://app.gtmhub.com/api/v2/goals?fields=name,description&sort=-name,dateCreated&filter={name: {$in: ["sales", "marketing"]}}&skip=5&limit=10&formatting=plainText' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v2/goals?fields=name,description&sort=-name,dateCreated&filter={name: {$in: ["sales", "marketing"]}}&skip=5&limit=10&formatting=plainText", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v2/goals"
requests.get(url, headers = headers)
{
"items": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
"Permission"
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
"PolicyResultResponse"
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": "ReviewersResponse",
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": "sessionsGoalsMetricsResponse"
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
"DashboardDynamicValue"
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
"CadenceRange"
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "MonthPeriod",
"weekday": "Weekday"
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": "multipleOwnersSetting",
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"locked": false,
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": "ClosedStatusResponse",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": "DesignScoreResponse",
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
"tagResponse"
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": "ApprovalWorkflowResponse"
}
],
"metrics": [
{
"actual": 6,
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalClosedStatus": "ClosedStatusResponse",
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": "Ids",
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": "linksResponse",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
"DashboardItemSetting"
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": "Ids",
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": "Cadence",
"cadenceStart": "CadenceStart",
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"settings": "planningSessionSettings",
"start": "string value",
"status": "string value",
"tags": [
"tagResponse"
],
"title": "string value",
"workflow": "SessionWorkflowResponse"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "string",
"type": "string"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasks": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"archived": false,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"description": "string value",
"dueDate": "string value",
"externalId": "string value",
"externalSystem": "string value",
"id": "string value",
"lastComment": {
"createdById": "string value",
"text": "string value"
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"parentId": "string value",
"parentName": "string value",
"parentType": "string value",
"priority": 2,
"richTextDescription": "string value",
"sessionId": "string value",
"snapshots": [
{
"id": "string value",
"modifiedAt": "string value",
"modifiedBy": "string value",
"newStatus": "string value",
"oldStatus": "string value",
"previouslyModifiedAt": "string value"
}
],
"status": "string value",
"taskType": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
2
],
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"totalCount": 2
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
filter | string | The named filter for filtering goals by their deadline dates.
One of current, past, future. expected in query, sample value: current |
ids | string | A comma separated list of goal ids to filter by. expected in query, sample value: 61a74153d8b312000145b519,602e31560f20d500012dbe0e |
ownerIds | string | A comma separated list of goal owner ids to filter by. expected in query, sample value: 6197665868264500014d04e0,619765b69b8b5c0001b5e669 |
metricOwnerId | string | A comma separated list of metric owner ids to filter by. expected in query, sample value: 615a9d1c84d86400013f8170,6197665815627f0001850837 |
attainment | string | Specifies the value of the goal attainment to filter by.
Supports operators like greater(>) or less(<) than. expected in query, sample value: >0.5 |
metricBefore | string | Specifies that the goal must have metrics checked in before that date.
Date format: yyyy-mm-dd expected in query, sample value: 2021-03-20 |
metricAfter | string | Specifies that the goal must have metrics checked in after that date.
Date format: yyyy-mm-dd expected in query, sample value: 2021-03-20 |
metricAttainment | string | Specifies that the goal must have metrics with attainment that is greater or less than the specified.
Supports operators like greater or less than. expected in query, sample value: >1 |
sort | string | List of fields separated by comas (,).
To invert a field's sort, you can prefix its name with a minus (-). expected in query, sample value: -attainment |
includeMetrics | boolean | Specifies whether to include metrics objects as part of the returned goals entities or not.
The default value if omitted is false. expected in query, sample value: true |
skip | integer | How many entities to be skipped when executing a GET query. expected in query, sample value: 5 |
take | integer | The max number of entities that can be returned by executing a GET query. expected in query, sample value: 50 |
200 | goalsGroupedByResponse |
401 | unauthorized |
curl -X GET 'https://app.gtmhub.com/api/v1/goals/groupBy/owners?filter=current&ids=61a74153d8b312000145b519,602e31560f20d500012dbe0e&ownerIds=6197665868264500014d04e0,619765b69b8b5c0001b5e669&metricOwnerId=615a9d1c84d86400013f8170,6197665815627f0001850837&attainment=>0.5&metricBefore=2021-03-20&metricAfter=2021-03-20&metricAttainment=>1&sort=-attainment&includeMetrics=true&skip=5&take=50' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/groupBy/owners?filter=current&ids=61a74153d8b312000145b519,602e31560f20d500012dbe0e&ownerIds=6197665868264500014d04e0,619765b69b8b5c0001b5e669&metricOwnerId=615a9d1c84d86400013f8170,6197665815627f0001850837&attainment=>0.5&metricBefore=2021-03-20&metricAfter=2021-03-20&metricAttainment=>1&sort=-attainment&includeMetrics=true&skip=5&take=50", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/groupBy/owners"
requests.get(url, headers = headers)
{
"totalCount": 2
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
filter | string | The named filter for filtering goals by their deadline dates.
One of current, past, future. expected in query, sample value: current |
ids | string | A comma separated list of goal ids to filter by. expected in query, sample value: 61a74153d8b312000145b519,602e31560f20d500012dbe0e |
ownerIds | string | A comma separated list of goal owner ids to filter by. expected in query, sample value: 6197665868264500014d04e0,619765b69b8b5c0001b5e669 |
metricOwnerId | string | A comma separated list of metric owner ids to filter by. expected in query, sample value: 615a9d1c84d86400013f8170,6197665815627f0001850837 |
attainment | string | Specifies the value of the goal attainment to filter by.
Supports operators like greater(>) or less(<) than. expected in query, sample value: >0.5 |
metricBefore | string | Specifies that the goal must have metrics checked in before that date.
Date format: yyyy-mm-dd expected in query, sample value: 2021-03-20 |
metricAfter | string | Specifies that the goal must have metrics checked in after that date.
Date format: yyyy-mm-dd expected in query, sample value: 2021-03-20 |
metricAttainment | string | Specifies that the goal must have metrics with attainment that is greater or less than the specified.
Supports operators like greater or less than. expected in query, sample value: >1 |
sort | string | List of fields separated by comas (,).
To invert a field's sort, you can prefix its name with a minus (-). expected in query, sample value: -attainment |
includeMetrics | boolean | Specifies whether to include metrics objects as part of the returned goals entities or not.
The default value if omitted is false. expected in query, sample value: true |
skip | integer | How many entities to be skipped when executing a GET query. expected in query, sample value: 5 |
take | integer | The max number of entities that can be returned by executing a GET query. expected in query, sample value: 50 |
200 | goalsGroupedByResponse |
401 | unauthorized |
curl -X GET 'https://app.gtmhub.com/api/v1/goals/groupBy/reviewers?filter=current&ids=61a74153d8b312000145b519,602e31560f20d500012dbe0e&ownerIds=6197665868264500014d04e0,619765b69b8b5c0001b5e669&metricOwnerId=615a9d1c84d86400013f8170,6197665815627f0001850837&attainment=>0.5&metricBefore=2021-03-20&metricAfter=2021-03-20&metricAttainment=>1&sort=-attainment&includeMetrics=true&skip=5&take=50' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/groupBy/reviewers?filter=current&ids=61a74153d8b312000145b519,602e31560f20d500012dbe0e&ownerIds=6197665868264500014d04e0,619765b69b8b5c0001b5e669&metricOwnerId=615a9d1c84d86400013f8170,6197665815627f0001850837&attainment=>0.5&metricBefore=2021-03-20&metricAfter=2021-03-20&metricAttainment=>1&sort=-attainment&includeMetrics=true&skip=5&take=50", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/groupBy/reviewers"
requests.get(url, headers = headers)
{
"totalCount": 2
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
ownerId * | string | Specifies the unique identifier (id) of the metric owner. expected in path, sample value: 6138969ab6adf10001fc329c |
200 | goalsResponse |
401 | unauthorized |
curl -X GET 'https://app.gtmhub.com/api/v1/goals/metric/{ownerId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/metric/{ownerId}", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/metric/{ownerId}"
requests.get(url, headers = headers)
{
"items": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
"Permission"
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
"PolicyResultResponse"
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": "ReviewersResponse",
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": "sessionsGoalsMetricsResponse"
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
"DashboardDynamicValue"
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
"CadenceRange"
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "MonthPeriod",
"weekday": "Weekday"
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": "multipleOwnersSetting",
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"locked": false,
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": "ClosedStatusResponse",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": "DesignScoreResponse",
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
"tagResponse"
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": "ApprovalWorkflowResponse"
}
],
"metrics": [
{
"actual": 6,
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalClosedStatus": "ClosedStatusResponse",
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": "Ids",
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": "linksResponse",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
"DashboardItemSetting"
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": "Ids",
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": "Cadence",
"cadenceStart": "CadenceStart",
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"settings": "planningSessionSettings",
"start": "string value",
"status": "string value",
"tags": [
"tagResponse"
],
"title": "string value",
"workflow": "SessionWorkflowResponse"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "string",
"type": "string"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasks": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"archived": false,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"description": "string value",
"dueDate": "string value",
"externalId": "string value",
"externalSystem": "string value",
"id": "string value",
"lastComment": {
"createdById": "string value",
"text": "string value"
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"parentId": "string value",
"parentName": "string value",
"parentType": "string value",
"priority": 2,
"richTextDescription": "string value",
"sessionId": "string value",
"snapshots": [
{
"id": "string value",
"modifiedAt": "string value",
"modifiedBy": "string value",
"newStatus": "string value",
"oldStatus": "string value",
"previouslyModifiedAt": "string value"
}
],
"status": "string value",
"taskType": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
2
],
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"totalCount": 2
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
fields | string | List of fields to be retrieved, separated by comas (,).
The 'id' and 'accountId' fields are needed to identify an object so they are always included.
If any of the fields is a complex object with sub-fields you can specify which set to include using the 'parent-field-name{sub-field-names}' syntax. expected in query, sample value: name,sessionId,metrics{name,attainment},links{expanded} |
formatting | string | The formatting used for the description and custom fields of type text area.
By default returned as 'mentionsMarkup' (Ex: "@[Mariya Velikova:[email protected]:602a65efc05575000123291b]").
Use 'plainText' if you need the response to be returned without markdown and special markup (Ex: "@Mariya Velikova"). expected in query, sample value: mentionsMarkup |
200 | goalMetricsLinksResponse |
401 | unauthorized |
curl -X GET 'https://app.gtmhub.com/api/v1/goals/{goalId}?fields=name,sessionId,metrics{name,attainment},links{expanded}&formatting=mentionsMarkup' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}?fields=name,sessionId,metrics{name,attainment},links{expanded}&formatting=mentionsMarkup", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}"
requests.get(url, headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
"ReviewerResponse"
],
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
"goalResponse"
],
"metrics": [
"metricDto"
],
"sessions": [
"planningSessionResponse"
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "ID",
"type": "DynamicValueType"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
{
"cadenceOrder": 2,
"end": "string value",
"start": "string value"
}
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "string",
"weekday": 2
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": {
"disabledForGoals": false,
"disabledForMetrics": false
},
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"locked": false,
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
"Permission"
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
"PolicyResultResponse"
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": "ReviewersResponse",
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": "sessionsGoalsMetricsResponse"
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
"DashboardDynamicValue"
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
"CadenceRange"
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "MonthPeriod",
"weekday": "Weekday"
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": "multipleOwnersSetting",
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "string",
"type": "string"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasks": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"archived": false,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"description": "string value",
"dueDate": "string value",
"externalId": "string value",
"externalSystem": "string value",
"id": "string value",
"lastComment": {
"createdById": "string value",
"text": "string value"
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"parentId": "string value",
"parentName": "string value",
"parentType": "string value",
"priority": 2,
"richTextDescription": "string value",
"sessionId": "string value",
"snapshots": [
{
"id": "string value",
"modifiedAt": "string value",
"modifiedBy": "string value",
"newStatus": "string value",
"oldStatus": "string value",
"previouslyModifiedAt": "string value"
}
],
"status": "string value",
"taskType": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
2
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
200 | goalWorkflowActionResponse |
400 | bad request |
404 | not found |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v1/goals/{goalId}/workflow-actions' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}/workflow-actions", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}/workflow-actions"
requests.get(url, headers = headers)
{
"approved": false,
"draft": false,
"needsReviewers": false,
"none": false,
"owner": false,
"random": false,
"review": false,
"reviewer": false
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goal * | object | The object representing the goal to be created. expected in body, sample value: { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": " |
201 | goalMetricsLinksResponse |
401 | unauthorized |
curl -X POST 'https://app.gtmhub.com/api/v1/goals' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"attainmentTypeString":"average_children","customFields":"customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]","description":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.","links":{},"name":"Become a market leader","ownerId":"string value","ownerIds":{},"parentId":"6184ed271a35460001f26588","private":false,"richTextCustomFields":"customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]","richTextDescription":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
","sessionId":"3284gh256a36860111f56578"}'
var body ={ "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": "
Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578" };
var settings = { "url": "https://app.gtmhub.com/api/v1/goals", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals"
body = { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578" };
requests.post(url, data=json.dumps(body), headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
"ReviewerResponse"
],
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
"goalResponse"
],
"metrics": [
"metricDto"
],
"sessions": [
"planningSessionResponse"
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "ID",
"type": "DynamicValueType"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
{
"cadenceOrder": 2,
"end": "string value",
"start": "string value"
}
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "string",
"weekday": 2
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": {
"disabledForGoals": false,
"disabledForMetrics": false
},
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"locked": false,
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
"Permission"
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
"PolicyResultResponse"
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": "ReviewersResponse",
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": "sessionsGoalsMetricsResponse"
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
"DashboardDynamicValue"
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
"CadenceRange"
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "MonthPeriod",
"weekday": "Weekday"
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": "multipleOwnersSetting",
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "string",
"type": "string"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasks": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"archived": false,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"description": "string value",
"dueDate": "string value",
"externalId": "string value",
"externalSystem": "string value",
"id": "string value",
"lastComment": {
"createdById": "string value",
"text": "string value"
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"parentId": "string value",
"parentName": "string value",
"parentType": "string value",
"priority": 2,
"richTextDescription": "string value",
"sessionId": "string value",
"snapshots": [
{
"id": "string value",
"modifiedAt": "string value",
"modifiedBy": "string value",
"newStatus": "string value",
"oldStatus": "string value",
"previouslyModifiedAt": "string value"
}
],
"status": "string value",
"taskType": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
2
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goals * | object | The object representing the list of the goals to be created. expected in body, sample value: { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": " |
201 | createdGoalsResponse |
401 | unauthorized |
curl -X POST 'https://app.gtmhub.com/api/v1/goals/bulk' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"attainmentTypeString":"average_children","customFields":"customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]","description":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.","links":{},"name":"Become a market leader","ownerId":"string value","ownerIds":{},"parentId":"6184ed271a35460001f26588","private":false,"richTextCustomFields":"customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]","richTextDescription":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
","sessionId":"3284gh256a36860111f56578"}'
var body ={ "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": "
Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578" };
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/bulk", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/bulk"
body = { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578" };
requests.post(url, data=json.dumps(body), headers = headers)
[
{
"id": "string value",
"metrics": [
{
"id": "string value"
}
]
}
]
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
comment * | object | The object used to describe the reason for approving/declining a goal. expected in body, sample value: { "comment": "This goal is / is not important for the company.", "richTextComment": " |
200 | string message returned by the service |
400 | bad request |
404 | not found |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v1/goals/{goalId}/approve' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"comment":"This goal is / is not important for the company.","richTextComment":"This goal is / is not important for the company.
"}'
var body ={ "comment": "This goal is / is not important for the company.", "richTextComment": "
This goal is / is not important for the company.
" };
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}/approve", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}/approve"
body = { "comment": "This goal is / is not important for the company.", "richTextComment": "This goal is / is not important for the company.
" };
requests.post(url, data=json.dumps(body), headers = headers)
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
comment * | object | The object used to describe the reason for approving/declining a goal. expected in body, sample value: { "comment": "This goal is / is not important for the company.", "richTextComment": " |
200 | string message returned by the service |
400 | bad request |
404 | not found |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v1/goals/{goalId}/decline' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"comment":"This goal is / is not important for the company.","richTextComment":"This goal is / is not important for the company.
"}'
var body ={ "comment": "This goal is / is not important for the company.", "richTextComment": "
This goal is / is not important for the company.
" };
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}/decline", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}/decline"
body = { "comment": "This goal is / is not important for the company.", "richTextComment": "This goal is / is not important for the company.
" };
requests.post(url, data=json.dumps(body), headers = headers)
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
reviewers * | object | The object used to specify the ids of users that have to be selected as reviewers of the goal. expected in body, sample value: { "reviewers": [ "602b85a255c9d30001d2b7e8", "602b8dc804f94000010daae1" ] } |
200 | string message returned by the service |
400 | nonExistingReviewResponse |
404 | not found |
409 | conflict |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v1/goals/{goalId}/review' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"reviewers":["602b85a255c9d30001d2b7e8","602b8dc804f94000010daae1"]}'
var body ={ "reviewers": [ "602b85a255c9d30001d2b7e8", "602b8dc804f94000010daae1" ] };
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}/review", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}/review"
body = { "reviewers": [ "602b85a255c9d30001d2b7e8", "602b8dc804f94000010daae1" ] };
requests.post(url, data=json.dumps(body), headers = headers)
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
200 | string message returned by the service |
400 | bad request |
404 | not found |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v1/goals/{goalId}/withdraw' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}/withdraw", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}/withdraw"
requests.post(url, headers = headers)
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
goal * | object | The object representing the goal to be updated. expected in body, sample value: { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": " |
200 | goalMetricsLinksResponse |
401 | unauthorized |
curl -X PUT 'https://app.gtmhub.com/api/v1/goals/{goalId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"attainmentTypeString":"average_children","customFields":"customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]","description":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.","links":{},"name":"Become a market leader","ownerId":"string value","ownerIds":{},"parentId":"6184ed271a35460001f26588","private":false,"richTextCustomFields":"customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]","richTextDescription":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
","sessionId":"3284gh256a36860111f56578"}'
var body ={ "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": "
Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578" };
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}", "method": "PUT", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}"
body = { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "description": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "6184ed271a35460001f26588", "private": false, "richTextCustomFields": "customFieldMultiselectDropdown:[\"602b8dc804f94000010daae1\",\"602a65efc05575000123291b\"]", "richTextDescription": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578" };
requests.put(url, data=json.dumps(body), headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
"ReviewerResponse"
],
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
"goalResponse"
],
"metrics": [
"metricDto"
],
"sessions": [
"planningSessionResponse"
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "ID",
"type": "DynamicValueType"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
{
"cadenceOrder": 2,
"end": "string value",
"start": "string value"
}
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "string",
"weekday": 2
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": {
"disabledForGoals": false,
"disabledForMetrics": false
},
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"locked": false,
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
"Permission"
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
"PolicyResultResponse"
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": "ReviewersResponse",
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": "sessionsGoalsMetricsResponse"
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
"DashboardDynamicValue"
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
"CadenceRange"
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "MonthPeriod",
"weekday": "Weekday"
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": "multipleOwnersSetting",
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "string",
"type": "string"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasks": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"archived": false,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"description": "string value",
"dueDate": "string value",
"externalId": "string value",
"externalSystem": "string value",
"id": "string value",
"lastComment": {
"createdById": "string value",
"text": "string value"
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"parentId": "string value",
"parentName": "string value",
"parentType": "string value",
"priority": 2,
"richTextDescription": "string value",
"sessionId": "string value",
"snapshots": [
{
"id": "string value",
"modifiedAt": "string value",
"modifiedBy": "string value",
"newStatus": "string value",
"oldStatus": "string value",
"previouslyModifiedAt": "string value"
}
],
"status": "string value",
"taskType": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
2
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
goalConfidence * | object | expected in body, sample value: { "reason": "string value", "value": 2 } |
200 | goal |
401 | unauthorized |
curl -X PUT 'https://app.gtmhub.com/api/v1/goals/{goalId}/confidence' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-d '{"reason":"string value","value":2}'
var body ={ "reason": "string value", "value": 2 };
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}/confidence", "method": "PUT", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}/confidence"
body = { "reason": "string value", "value": 2 };
requests.put(url, data=json.dumps(body), headers = headers)
{
"accountId": "string",
"aggregatedAttainment": 2,
"attainment": 2,
"attainmentType": 2,
"calculationStatus": 2,
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"childrenKRAttainment": 2,
"closedStatus": {
"Reason": "string value",
"Status": 2
},
"createdById": "string",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"deletedAt": "string value",
"deletedById": "string",
"deletionReason": 2,
"description": "string value",
"designScore": {
"policies": [
{
"passed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string",
"inherits": false,
"isDeleted": false,
"lastCalculated": "string value",
"links": {
"expanded": {
"goals": [
{
"accountId": "string",
"aggregatedAttainment": 2,
"attainment": 2,
"attainmentType": 2,
"calculationStatus": 2,
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"childrenKRAttainment": 2,
"closedStatus": {
"Reason": "string value",
"Status": 2
},
"createdById": "string",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"deletedAt": "string value",
"deletedById": "string",
"deletionReason": 2,
"description": "string value",
"designScore": {
"policies": [
{
"passed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string",
"inherits": false,
"isDeleted": false,
"lastCalculated": "string value",
"links": {
"expanded": {
"goals": [
"goal"
],
"metrics": [
"Metric"
],
"sessions": [
"planningSession"
]
}
},
"mentions": {},
"metricsAttainment": 2,
"metricsCount": 2,
"modifiedById": "string",
"name": "string value",
"nonArchivedTasksCount": 2,
"orderId": 2,
"ownerIds": [
"string"
],
"owner_permissions": {
"deny": {
"Subtype": 2
},
"grant": {
"Subtype": 2
}
},
"parent": {
"goalId": "string",
"metricGoalId": "string",
"metricId": "string",
"sessionId": "string"
},
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
],
"private": false,
"richTextDescription": "string value",
"sessionId": "string",
"subTreeCount": 2,
"tags": [
{
"id": "string",
"isActive": {
"IsActive": false
},
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"watchers": [
"string"
],
"workflow": {
"ApprovedAt": "string value",
"Reviewers": [
"Reviewer"
],
"ReviewersNeeded": 2,
"Status": 2
}
}
],
"metrics": [
{
"actual": 2,
"attainment": 2,
"cascadeType": "string value",
"childrenCount": 2,
"confidence": {
"date": "string value",
"gif": {
"id": "string value",
"searchQuery": "string value"
},
"reason": "string value",
"userId": "string",
"value": 2
},
"createdById": "string",
"critical": 2,
"dateCreated": "string value",
"deletedAt": "string value",
"deletedById": "string",
"deletionReason": 2,
"description": "string value",
"dueDate": "string value",
"fieldName": "string value",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string",
"id": "string",
"inherits": false,
"initialValue": 2,
"insightName": "string value",
"isDeleted": false,
"lastReminded": "string value",
"lastSnapshotAt": "string value",
"latestSnapshotAt": "string value",
"limitedAttainment": false,
"links": {
"expanded": {
"goals": [
"goal"
],
"metrics": [
"Metric"
],
"sessions": [
"planningSession"
]
}
},
"manualType": "string value",
"mentions": {},
"modifiedById": "string",
"name": "string value",
"nonArchivedTasksCount": 2,
"objectId": "string",
"orderId": 2,
"ownerIds": [
"string"
],
"owner_permissions": {
"deny": {
"Subtype": 2
},
"grant": {
"Subtype": 2
}
},
"parent": {
"private": false
},
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
],
"reminderSchedule": {
"active": false,
"day": "string value",
"email": "string value",
"type": "string value"
},
"richTextDescription": "string value",
"settings": [
{
"dynamicValues": [
"DashboardDynamicValue"
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"snapshots": [
{
"_id": "ID",
"comment": "string value",
"confidenceValue": 2,
"createdAt": "string value",
"date": "string value",
"gif": "Gif",
"mentions": "Mentions",
"modifiedBy": "ID",
"richTextComment": "string value",
"sourceInfo": "SnapshotSourceInfo",
"value": 2
}
],
"softDueDate": "string value",
"sourceMetricId": "string",
"target": 2,
"targetMetrics": [
"string"
],
"targetOperator": "string value",
"tasksCount": 2
}
],
"sessions": [
{
"accountId": "string",
"cadence": 2,
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "string",
"weekday": 2
},
"cadenceTimeZone": "string value",
"color": "string value",
"createdById": "string",
"deletedAt": "string value",
"deletedById": "string",
"deletionReason": 2,
"demo": false,
"end": "string value",
"id": "string",
"inherits": false,
"isDeleted": false,
"isSelfApproveAllowed": false,
"modifiedById": "string",
"owner_permissions": {
"deny": {
"Subtype": 2
},
"grant": {
"Subtype": 2
}
},
"parentId": "string",
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
],
"settings": {
"AssignGoalPermissions": 2,
"AssignMetricPermissions": 2,
"GoalsPerOwnerLimit": 2,
"MetricsPerGoalLimit": 2,
"MultipleOwners": {
"disabledForGoals": false,
"disabledForMetrics": false
},
"ProgressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"id": "string",
"isActive": {
"IsActive": false
},
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": 2
}
}
]
}
},
"mentions": {},
"metricsAttainment": 2,
"metricsCount": 2,
"modifiedById": "string",
"name": "string value",
"nonArchivedTasksCount": 2,
"orderId": 2,
"ownerIds": [
"string"
],
"owner_permissions": {
"deny": {
"Subtype": 2
},
"grant": {
"Subtype": 2
}
},
"parent": {
"goalId": "string",
"metricGoalId": "string",
"metricId": "string",
"sessionId": "string"
},
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
],
"private": false,
"richTextDescription": "string value",
"sessionId": "string",
"subTreeCount": 2,
"tags": [
{
"id": "string",
"isActive": {
"IsActive": false
},
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"watchers": [
"string"
],
"workflow": {
"ApprovedAt": "string value",
"Reviewers": [
{
"Response": 2,
"UserId": "string"
}
],
"ReviewersNeeded": 2,
"Status": 2
}
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
goal * | object | The object representing the goal to be updated. expected in body, sample value: { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown: [\"602b8dc804f94000010daae1\", \"602a65efc05575000123291b\"]", "description": "\"test\"", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "3284gh256a36860111f56578", "private": true, "richTextCustomFields": "customFieldMultiselectDropdown: [\"602b8dc804f94000010daae1\", \"602a65efc05575000123291b\"]", "richTextDescription": "\" |
200 | goalMetricsLinksResponse |
401 | unauthorized |
curl -X PATCH 'https://app.gtmhub.com/api/v1/goals/{goalId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"attainmentTypeString":"average_children","customFields":"customFieldMultiselectDropdown: [\"602b8dc804f94000010daae1\", \"602a65efc05575000123291b\"]","description":"\"test\"","links":{},"name":"Become a market leader","ownerId":"string value","ownerIds":{},"parentId":"3284gh256a36860111f56578","private":true,"richTextCustomFields":"customFieldMultiselectDropdown: [\"602b8dc804f94000010daae1\", \"602a65efc05575000123291b\"]","richTextDescription":"\"test
\"","sessionId":"6184ed271a35460001f26588"}'
var body ={ "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown: [\"602b8dc804f94000010daae1\", \"602a65efc05575000123291b\"]", "description": "\"test\"", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "3284gh256a36860111f56578", "private": true, "richTextCustomFields": "customFieldMultiselectDropdown: [\"602b8dc804f94000010daae1\", \"602a65efc05575000123291b\"]", "richTextDescription": "\"
test
\"", "sessionId": "6184ed271a35460001f26588" };
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}", "method": "PATCH", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}"
body = { "attainmentTypeString": "average_children", "customFields": "customFieldMultiselectDropdown: [\"602b8dc804f94000010daae1\", \"602a65efc05575000123291b\"]", "description": "\"test\"", "links": {}, "name": "Become a market leader", "ownerId": "string value", "ownerIds": {}, "parentId": "3284gh256a36860111f56578", "private": true, "richTextCustomFields": "customFieldMultiselectDropdown: [\"602b8dc804f94000010daae1\", \"602a65efc05575000123291b\"]", "richTextDescription": "\"test
\"", "sessionId": "6184ed271a35460001f26588" };
requests.patch(url, data=json.dumps(body), headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
{
"isPassed": false,
"policy": "string value",
"score": 2
}
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
"ReviewerResponse"
],
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
"goalResponse"
],
"metrics": [
"metricDto"
],
"sessions": [
"planningSessionResponse"
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "ID",
"type": "DynamicValueType"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
{
"cadenceOrder": 2,
"end": "string value",
"start": "string value"
}
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "string",
"weekday": 2
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": {
"disabledForGoals": false,
"disabledForMetrics": false
},
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"locked": false,
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"permissions": [
"Permission"
]
},
"accountId": "string value",
"aggregatedAttainment": 2,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"attainment": 2,
"attainmentTypeString": "string value",
"childrenAggregatedAttainment": 2,
"childrenCount": 2,
"closedStatus": {
"reason": "string value",
"status": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"designScore": {
"policies": [
"PolicyResultResponse"
],
"totalPoints": 2
},
"duration": 2,
"fullAggregatedAttainment": 2,
"fullSubTreeCount": 2,
"id": "string value",
"locked": false,
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": "ReviewersResponse",
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"metrics": [
{
"actual": 6,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
},
"assignees": [
{
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
"tagResponse"
],
"type": "string value"
}
],
"cascadeType": "absolute_value",
"critical": 50,
"description": "My Description",
"dueDate": "2021-06-30",
"dynamic": true,
"fieldName": "count",
"format": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalClosedStatus": {
"reason": "string value",
"status": "string value"
},
"goalDescription": "My Description",
"goalId": "string value",
"goalName": "string value",
"goalOwnerId": "string value",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": "sessionsGoalsMetricsResponse"
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
"DashboardDynamicValue"
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"sessions": [
{
"accountId": "string value",
"cadence": {
"ranges": [
"CadenceRange"
],
"totalCadences": 2,
"type": "string value"
},
"cadenceStart": {
"dayOfMonth": 2,
"periodOfMonth": "MonthPeriod",
"weekday": "Weekday"
},
"cadenceTimeZone": "string value",
"color": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"demo": false,
"dynamicValueType": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"isSelfApproveAllowed": false,
"parentId": "string value",
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
],
"settings": {
"assignGoalPermissions": "string value",
"assignMetricPermissions": "string value",
"goalsPerOwnerLimit": 2,
"metricsPerGoalLimit": 2,
"multipleOwners": "multipleOwnersSetting",
"progressAggregationDisabled": false
},
"start": "string value",
"status": "string value",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"title": "string value",
"workflow": {
"editableKrFields": [
"string value 1",
"string value 2"
],
"editableOkrFields": [
"string value 1",
"string value 2"
],
"reviewers": 2,
"target": [
"string value 1",
"string value 2"
]
}
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"settings": [
{
"dynamicValues": [
{
"teamId": "string",
"type": "string"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value"
}
],
"softDueDate": "2021-06-25",
"sourceMetricId": "6093fdabd251f200015e8f92",
"target": 100,
"targetMetrics": {},
"targetOperator": "at_least",
"tasksCount": 2,
"url": "string value"
}
],
"metricsCount": 2,
"modifiedById": "string value",
"name": "string value",
"nonArchivedTasksCount": 2,
"numberOfOwners": 2,
"obfuscated": false,
"orderId": 2,
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"parentGoalSessionId": "string value",
"parentId": "string value",
"parentType": "string value",
"private": false,
"richTextDescription": "string value",
"sessionId": "string value",
"subTreeCount": 2,
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"tasks": [
{
"access": {
"inherits": false,
"permissions": [
{
"grant": {
"Subtype": 2
},
"principalId": "string",
"principalKind": "string value"
}
]
},
"accountId": "string value",
"archived": false,
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dynamicValueType": "string value",
"email": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"picture": "string value",
"tags": [
{
"createdBy": "string",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"name": "string value",
"title": "string value"
}
],
"type": "string value"
},
"createdById": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"description": "string value",
"dueDate": "string value",
"externalId": "string value",
"externalSystem": "string value",
"id": "string value",
"lastComment": {
"createdById": "string value",
"text": "string value"
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"parentId": "string value",
"parentName": "string value",
"parentType": "string value",
"priority": 2,
"richTextDescription": "string value",
"sessionId": "string value",
"snapshots": [
{
"id": "string value",
"modifiedAt": "string value",
"modifiedBy": "string value",
"newStatus": "string value",
"oldStatus": "string value",
"previouslyModifiedAt": "string value"
}
],
"status": "string value",
"taskType": "string value"
}
],
"tasksCount": 2,
"url": "string value",
"watchers": [
"string value 1",
"string value 2"
],
"workflow": {
"approvedAt": "string value",
"reviewers": [
2
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the unique identifier (id) of the Gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
goalId * | string | Specifies the unique identifier of the goal (objective). expected in path, sample value: 6138969ab6adf10001fc329c |
401 | unauthorized |
curl -X DELETE 'https://app.gtmhub.com/api/v1/goals/{goalId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{goalId}", "method": "DELETE", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.gtmhub.com/api/v1/goals/{goalId}"
requests.delete(url, headers = headers)
Oops! Looks like there are no API calls of that type for this Endpoint