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: _id would return only the _id field |
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: sort=-name would return entities in reverse lexicographical order |
filter | string | The format of the parameter is inspired by the MongoDB query format. expected in query, sample value: filter={name: {$in: ["sales", "marketing"]}} would return entities that have name either "sales" or "marketing" |
skip | integer | How many entities to skip 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: "@[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: plainText |
200 | goalsResponse |
400 | bad request |
401 | unauthorized |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v2/integrations/goals?fields=_id would return only the _id field&sort=sort=-name would return entities in reverse lexicographical order&filter=filter={name: {$in: ["sales", "marketing"]}} would return entities that have name either "sales" or "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/integrations/goals?fields=_id would return only the _id field&sort=sort=-name would return entities in reverse lexicographical order&filter=filter={name: {$in: ["sales", "marketing"]}} would return entities that have name either "sales" or "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/integrations/goals"
requests.get(url, headers = headers)
{
"items": [
{
"access": {
"inherits": false,
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
"EmbeddedGoalResponse"
],
"metrics": [
"BaseMetricResponse"
],
"sessions": [
"BasePlanningSessionResponse"
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"reviewersNeeded": 2,
"status": "string value"
}
}
],
"totalCount": 2
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the 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 | The goal IDs by which to filter goals separated by ','. expected in query, sample value: 61a74153d8b312000145b519,602e31560f20d500012dbe0e |
ownerIds | string | The owner IDs by which to filter goals separated by ','. expected in query, sample value: 6197665868264500014d04e0,619765b69b8b5c0001b5e669 |
metricOwnerId | string | The metric owner IDs by which to filter goals separated by ','. expected in query, sample value: 615a9d1c84d86400013f8170,6197665815627f0001850837 |
confidence | string | The goal confidence for which to filter. Supports operators like greater or less than. expected in query, sample value: >0.5 |
attainment | 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 |
metricBefore | string | Specifies that the goal must have metrics checked in before that date. Date format: 2006-01-02 expected in query, sample value: 2021-03-20 |
metricAfter | string | Specifies that the goal must have metrics checked in after that date. Date format: 2006-01-02 expected in query, sample value: >1 |
metricAttainment | string | Specifies that the goal must have metrics with that is greater or less than the specified.
Supports operators like greater or less than. expected in query, sample value: -attainment |
sort | string | The sort expression. expected in query, sample value: true |
includeMetrics | boolean | Weather 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: 5 |
skip | integer | How many entities to skip when executing a get query expected in query, sample value: 50 |
take | integer | The max number of entities that can be returned by the get query. expected in query, sample value: 2 |
200 | goalsGroupedByResponse |
400 | bad request |
401 | unauthorized |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v2/integrations/goals/groupBy/owners?filter=current&ids=61a74153d8b312000145b519,602e31560f20d500012dbe0e&ownerIds=6197665868264500014d04e0,619765b69b8b5c0001b5e669&metricOwnerId=615a9d1c84d86400013f8170,6197665815627f0001850837&confidence=>0.5&attainment=2021-03-20&metricBefore=2021-03-20&metricAfter=>1&metricAttainment=-attainment&sort=true&includeMetrics=5&skip=50&take=2' \ -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/integrations/goals/groupBy/owners?filter=current&ids=61a74153d8b312000145b519,602e31560f20d500012dbe0e&ownerIds=6197665868264500014d04e0,619765b69b8b5c0001b5e669&metricOwnerId=615a9d1c84d86400013f8170,6197665815627f0001850837&confidence=>0.5&attainment=2021-03-20&metricBefore=2021-03-20&metricAfter=>1&metricAttainment=-attainment&sort=true&includeMetrics=5&skip=50&take=2", "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/integrations/goals/groupBy/owners"
requests.get(url, headers = headers)
{
"totalCount": 2
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the 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 | The goal IDs by which to filter goals separated by ','. expected in query, sample value: 61a74153d8b312000145b519,602e31560f20d500012dbe0e |
ownerIds | string | The owner IDs by which to filter goals separated by ','. expected in query, sample value: 6197665868264500014d04e0,619765b69b8b5c0001b5e669 |
metricOwnerId | string | The metric owner IDs by which to filter goals separated by ','. expected in query, sample value: 615a9d1c84d86400013f8170,6197665815627f0001850837 |
confidence | string | The goal confidence for which to filter. Supports operators like greater or less than. expected in query, sample value: >0.5 |
attainment | 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 |
metricBefore | string | Specifies that the goal must have metrics checked in before that date. Date format: 2006-01-02 expected in query, sample value: 2021-03-20 |
metricAfter | string | Specifies that the goal must have metrics checked in after that date. Date format: 2006-01-02 expected in query, sample value: >1 |
metricAttainment | string | Specifies that the goal must have metrics with that is greater or less than the specified.
Supports operators like greater or less than. expected in query, sample value: -attainment |
sort | string | The sort expression. expected in query, sample value: true |
includeMetrics | boolean | Weather 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: 5 |
skip | integer | How many entities to skip when executing a get query expected in query, sample value: 50 |
take | integer | The max number of entities that can be returned by the get query. expected in query, sample value: 2 |
200 | goalsGroupedByResponse |
400 | bad request |
401 | unauthorized |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v2/integrations/goals/groupBy/reviewers?filter=current&ids=61a74153d8b312000145b519,602e31560f20d500012dbe0e&ownerIds=6197665868264500014d04e0,619765b69b8b5c0001b5e669&metricOwnerId=615a9d1c84d86400013f8170,6197665815627f0001850837&confidence=>0.5&attainment=2021-03-20&metricBefore=2021-03-20&metricAfter=>1&metricAttainment=-attainment&sort=true&includeMetrics=5&skip=50&take=2' \ -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/integrations/goals/groupBy/reviewers?filter=current&ids=61a74153d8b312000145b519,602e31560f20d500012dbe0e&ownerIds=6197665868264500014d04e0,619765b69b8b5c0001b5e669&metricOwnerId=615a9d1c84d86400013f8170,6197665815627f0001850837&confidence=>0.5&attainment=2021-03-20&metricBefore=2021-03-20&metricAfter=>1&metricAttainment=-attainment&sort=true&includeMetrics=5&skip=50&take=2", "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/integrations/goals/groupBy/reviewers"
requests.get(url, headers = headers)
{
"totalCount": 2
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
ownerId * | string | Specifies the Id of the metric owner. expected in path, sample value: 6138969ab6adf10001fc329c |
200 | goalsResponse |
400 | bad request |
401 | unauthorized |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v2/integrations/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/v2/integrations/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/v2/integrations/goals/metric/{ownerId}"
requests.get(url, headers = headers)
{
"items": [
{
"access": {
"inherits": false,
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
"EmbeddedGoalResponse"
],
"metrics": [
"BaseMetricResponse"
],
"sessions": [
"BasePlanningSessionResponse"
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"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 ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
fields | string | If you provide the fields parameter with a list of fields for the resource you are interested in separated by comas, only those fields will be returned in the document
The 'id' and 'accountId' fields are needed to identify an object so they are always included. Ex: '?fields=name,createdById,metrics{name,attainment}'
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: string |
formatting | string | The formatting used for the description and custom fields of type text area. By default they are returned as 'mentionsMarkup' and they can contain markdown and special markup for mentioned people. Use 'plainText' if you want the response without markdown and special markup. expected in query, sample value: string |
200 | goalMetricsLinksResponse |
400 | bad request |
404 | not found |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v2/integrations/goals/{id}?fields=string&formatting=string' \ -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/integrations/goals/{id}?fields=string&formatting=string", "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/integrations/goals/{id}"
requests.get(url, headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
200 | goalWorkflowActionResponse |
400 | bad request |
404 | not found |
500 | internal server error |
curl -X GET 'https://app.gtmhub.com/api/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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 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: { "appId": "string 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 |
400 | bad request |
401 | unauthorized |
curl -X POST 'https://app.gtmhub.com/api/v2/integrations/goals' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"appId":"string 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":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
","sessionId":"3284gh256a36860111f56578","tags":[{"title":"annual"}],"owner":{"accountDomain":"string value","accountId":"string value","accountName":"string value","clientId":"string value","createdById":"string value","dateCreated":"string value","dateInvited":"string value","email":"string value","firstName":"string value","id":"string value","identities":{"items":[{"clientId":"string value","connection":"string value","isSocial":false,"name":"string value","provider":"string value"}],"totalCount":2},"invitedBy":"string value","isActive":false,"isPrimary":false,"isSSOBased":false,"isSwitched":false,"language":"string value","lastName":"string value","name":"string value","notificationSettings":{"subjectsOptedOut":["string value 1","string value 2"]},"permissions":["string value 1","string value 2"],"picture":"string value","pictureInfo":{"canEditPicture":false,"isActive":false,"isPictureEdited":false,"isSSOBased":false},"roles":[{"accountId":"string","description":"string value","id":"string","name":"string value","team":{"ExternalTeamMapping":{"ExternalId":"string value","ExternalSystem":"string value"},"accountId":"string","avatar":"string value","color":"string value","createdById":"string","dateCreated":"string value","description":"string value","id":"string","manager":"string","members":["ID"],"mentions":{},"modifiedById":"string","movedExternalMembers":["ID"],"name":"string value","parentId":"string","picture":"string value","richTextDescription":"string value","tags":[{"id":"ID","isActive":"IsActiveFlag","name":"string value","title":"string value"}]}}],"settings":"string value","subscriptionType":"string value","teamIds":["string value 1","string value 2"],"userSettings":{"alignmentTreeFilter":{"ownerIds":"string value","tags":"string value","teamIds":"string value"},"alignmentTreeMode":"string value","checklist":{"optOut":false,"showCards":{"inviteTeammate":false,"visitDemoAccount":false,"visitMarketplace":false},"stepsV1":{"createdOkr":false,"invitedTeammate":false,"visitedDemoAccount":false,"visitedMarketplace":false,"watchedVideo":false},"stepsV1Completed":false},"collapsedEntities":["string value 1","string value 2"],"customFieldsSettings":{"hideManageOrderBanner":false,"lastUpdated":"string value"},"dashboardSettings":[{"dashboardId":"string value","settings":["DashboardItemSetting"]}],"emailVerified":false,"favs":[{"id":"string value","name":"string value","type":"string value"}],"goalsGrid":[{"field":"string value","isCustom":false,"label":"string value","visible":false}],"goalsTreeMode":"string value","homeCollapsedItems":{"myOkrs":false,"todo":false},"homeScreen":"string value","insightTemplateSuggestions":{"dismissed":false,"insightboards":[{"insightboardId":"string value","linkToMarketplaceDismissed":false,"numberOfSuggestionsToShow":2}],"tooltipShown":false},"insightboardParams":{},"kpiVirtualGroups":{"favorites":["string value 1","string value 2"]},"kpis":{"from":"string value","groupBy":"string value","to":"string value"},"leftNavItems":{"hub":false,"insights":false,"leftNavIsClosed":false,"lists":false,"okrs":false,"people":false,"reports":false},"listFilters":["string value 1","string value 2"],"listIds":["string value 1","string value 2"],"profilesSettings":{"employeeProfileSettings":{"processSessionFilter":{"sessionIds":["string value 1","string value 2"]},"progressSessionFilter":{"sessionIds":["string value 1","string value 2"]}}},"resizableGridColumns":[{"goalProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"metricProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"taskProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"width":2}],"sessionsIds":[{"linkedSessionIds":["string value 1","string value 2"],"parentId":"string value"}],"showArchivedSessions":false,"snippets":[{"code":"string value","language":"string value","name":"string value"}],"surveys":{"shown":["string value 1","string value 2"]},"taskOrder":"string value","taskView":"string value","teamsView":"string value","treeViewOrder":{"field":"string value","name":"string value"},"useDragMode":false,"useScrollbars":false,"verificationEmailSent":false,"whiteboards":{"opened":[{"id":"string value","openedAt":"string value","zoom":2}]}}}}'
var body ={ "appId": "string 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": "
Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578", "tags": [ { "title": "annual" } ], "owner": { "accountDomain": "string value", "accountId": "string value", "accountName": "string value", "clientId": "string value", "createdById": "string value", "dateCreated": "string value", "dateInvited": "string value", "email": "string value", "firstName": "string value", "id": "string value", "identities": { "items": [ { "clientId": "string value", "connection": "string value", "isSocial": false, "name": "string value", "provider": "string value" } ], "totalCount": 2 }, "invitedBy": "string value", "isActive": false, "isPrimary": false, "isSSOBased": false, "isSwitched": false, "language": "string value", "lastName": "string value", "name": "string value", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] }, "permissions": [ "string value 1", "string value 2" ], "picture": "string value", "pictureInfo": { "canEditPicture": false, "isActive": false, "isPictureEdited": false, "isSSOBased": false }, "roles": [ { "accountId": "string", "description": "string value", "id": "string", "name": "string value", "team": { "ExternalTeamMapping": { "ExternalId": "string value", "ExternalSystem": "string value" }, "accountId": "string", "avatar": "string value", "color": "string value", "createdById": "string", "dateCreated": "string value", "description": "string value", "id": "string", "manager": "string", "members": [ "ID" ], "mentions": {}, "modifiedById": "string", "movedExternalMembers": [ "ID" ], "name": "string value", "parentId": "string", "picture": "string value", "richTextDescription": "string value", "tags": [ { "id": "ID", "isActive": "IsActiveFlag", "name": "string value", "title": "string value" } ] } } ], "settings": "string value", "subscriptionType": "string value", "teamIds": [ "string value 1", "string value 2" ], "userSettings": { "alignmentTreeFilter": { "ownerIds": "string value", "tags": "string value", "teamIds": "string value" }, "alignmentTreeMode": "string value", "checklist": { "optOut": false, "showCards": { "inviteTeammate": false, "visitDemoAccount": false, "visitMarketplace": false }, "stepsV1": { "createdOkr": false, "invitedTeammate": false, "visitedDemoAccount": false, "visitedMarketplace": false, "watchedVideo": false }, "stepsV1Completed": false }, "collapsedEntities": [ "string value 1", "string value 2" ], "customFieldsSettings": { "hideManageOrderBanner": false, "lastUpdated": "string value" }, "dashboardSettings": [ { "dashboardId": "string value", "settings": [ "DashboardItemSetting" ] } ], "emailVerified": false, "favs": [ { "id": "string value", "name": "string value", "type": "string value" } ], "goalsGrid": [ { "field": "string value", "isCustom": false, "label": "string value", "visible": false } ], "goalsTreeMode": "string value", "homeCollapsedItems": { "myOkrs": false, "todo": false }, "homeScreen": "string value", "insightTemplateSuggestions": { "dismissed": false, "insightboards": [ { "insightboardId": "string value", "linkToMarketplaceDismissed": false, "numberOfSuggestionsToShow": 2 } ], "tooltipShown": false }, "insightboardParams": {}, "kpiVirtualGroups": { "favorites": [ "string value 1", "string value 2" ] }, "kpis": { "from": "string value", "groupBy": "string value", "to": "string value" }, "leftNavItems": { "hub": false, "insights": false, "leftNavIsClosed": false, "lists": false, "okrs": false, "people": false, "reports": false }, "listFilters": [ "string value 1", "string value 2" ], "listIds": [ "string value 1", "string value 2" ], "profilesSettings": { "employeeProfileSettings": { "processSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] }, "progressSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] } } }, "resizableGridColumns": [ { "goalProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "metricProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "taskProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "width": 2 } ], "sessionsIds": [ { "linkedSessionIds": [ "string value 1", "string value 2" ], "parentId": "string value" } ], "showArchivedSessions": false, "snippets": [ { "code": "string value", "language": "string value", "name": "string value" } ], "surveys": { "shown": [ "string value 1", "string value 2" ] }, "taskOrder": "string value", "taskView": "string value", "teamsView": "string value", "treeViewOrder": { "field": "string value", "name": "string value" }, "useDragMode": false, "useScrollbars": false, "verificationEmailSent": false, "whiteboards": { "opened": [ { "id": "string value", "openedAt": "string value", "zoom": 2 } ] } } } };
var settings = { "url": "https://app.gtmhub.com/api/v2/integrations/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/v2/integrations/goals"
body = { "appId": "string 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": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578", "tags": [ { "title": "annual" } ], "owner": { "accountDomain": "string value", "accountId": "string value", "accountName": "string value", "clientId": "string value", "createdById": "string value", "dateCreated": "string value", "dateInvited": "string value", "email": "string value", "firstName": "string value", "id": "string value", "identities": { "items": [ { "clientId": "string value", "connection": "string value", "isSocial": false, "name": "string value", "provider": "string value" } ], "totalCount": 2 }, "invitedBy": "string value", "isActive": false, "isPrimary": false, "isSSOBased": false, "isSwitched": false, "language": "string value", "lastName": "string value", "name": "string value", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] }, "permissions": [ "string value 1", "string value 2" ], "picture": "string value", "pictureInfo": { "canEditPicture": false, "isActive": false, "isPictureEdited": false, "isSSOBased": false }, "roles": [ { "accountId": "string", "description": "string value", "id": "string", "name": "string value", "team": { "ExternalTeamMapping": { "ExternalId": "string value", "ExternalSystem": "string value" }, "accountId": "string", "avatar": "string value", "color": "string value", "createdById": "string", "dateCreated": "string value", "description": "string value", "id": "string", "manager": "string", "members": [ "ID" ], "mentions": {}, "modifiedById": "string", "movedExternalMembers": [ "ID" ], "name": "string value", "parentId": "string", "picture": "string value", "richTextDescription": "string value", "tags": [ { "id": "ID", "isActive": "IsActiveFlag", "name": "string value", "title": "string value" } ] } } ], "settings": "string value", "subscriptionType": "string value", "teamIds": [ "string value 1", "string value 2" ], "userSettings": { "alignmentTreeFilter": { "ownerIds": "string value", "tags": "string value", "teamIds": "string value" }, "alignmentTreeMode": "string value", "checklist": { "optOut": false, "showCards": { "inviteTeammate": false, "visitDemoAccount": false, "visitMarketplace": false }, "stepsV1": { "createdOkr": false, "invitedTeammate": false, "visitedDemoAccount": false, "visitedMarketplace": false, "watchedVideo": false }, "stepsV1Completed": false }, "collapsedEntities": [ "string value 1", "string value 2" ], "customFieldsSettings": { "hideManageOrderBanner": false, "lastUpdated": "string value" }, "dashboardSettings": [ { "dashboardId": "string value", "settings": [ "DashboardItemSetting" ] } ], "emailVerified": false, "favs": [ { "id": "string value", "name": "string value", "type": "string value" } ], "goalsGrid": [ { "field": "string value", "isCustom": false, "label": "string value", "visible": false } ], "goalsTreeMode": "string value", "homeCollapsedItems": { "myOkrs": false, "todo": false }, "homeScreen": "string value", "insightTemplateSuggestions": { "dismissed": false, "insightboards": [ { "insightboardId": "string value", "linkToMarketplaceDismissed": false, "numberOfSuggestionsToShow": 2 } ], "tooltipShown": false }, "insightboardParams": {}, "kpiVirtualGroups": { "favorites": [ "string value 1", "string value 2" ] }, "kpis": { "from": "string value", "groupBy": "string value", "to": "string value" }, "leftNavItems": { "hub": false, "insights": false, "leftNavIsClosed": false, "lists": false, "okrs": false, "people": false, "reports": false }, "listFilters": [ "string value 1", "string value 2" ], "listIds": [ "string value 1", "string value 2" ], "profilesSettings": { "employeeProfileSettings": { "processSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] }, "progressSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] } } }, "resizableGridColumns": [ { "goalProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "metricProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "taskProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "width": 2 } ], "sessionsIds": [ { "linkedSessionIds": [ "string value 1", "string value 2" ], "parentId": "string value" } ], "showArchivedSessions": false, "snippets": [ { "code": "string value", "language": "string value", "name": "string value" } ], "surveys": { "shown": [ "string value 1", "string value 2" ] }, "taskOrder": "string value", "taskView": "string value", "teamsView": "string value", "treeViewOrder": { "field": "string value", "name": "string value" }, "useDragMode": false, "useScrollbars": false, "verificationEmailSent": false, "whiteboards": { "opened": [ { "id": "string value", "openedAt": "string value", "zoom": 2 } ] } } } };
requests.post(url, data=json.dumps(body), headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"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: { "appId": "string 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 |
400 | bad request |
401 | unauthorized |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v2/integrations/goals/bulk' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"appId":"string 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":"Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
","sessionId":"3284gh256a36860111f56578","tags":[{"title":"annual"}],"owner":{"accountDomain":"string value","accountId":"string value","accountName":"string value","clientId":"string value","createdById":"string value","dateCreated":"string value","dateInvited":"string value","email":"string value","firstName":"string value","id":"string value","identities":{"items":[{"clientId":"string value","connection":"string value","isSocial":false,"name":"string value","provider":"string value"}],"totalCount":2},"invitedBy":"string value","isActive":false,"isPrimary":false,"isSSOBased":false,"isSwitched":false,"language":"string value","lastName":"string value","name":"string value","notificationSettings":{"subjectsOptedOut":["string value 1","string value 2"]},"permissions":["string value 1","string value 2"],"picture":"string value","pictureInfo":{"canEditPicture":false,"isActive":false,"isPictureEdited":false,"isSSOBased":false},"roles":[{"accountId":"string","description":"string value","id":"string","name":"string value","team":{"ExternalTeamMapping":{"ExternalId":"string value","ExternalSystem":"string value"},"accountId":"string","avatar":"string value","color":"string value","createdById":"string","dateCreated":"string value","description":"string value","id":"string","manager":"string","members":["ID"],"mentions":{},"modifiedById":"string","movedExternalMembers":["ID"],"name":"string value","parentId":"string","picture":"string value","richTextDescription":"string value","tags":[{"id":"ID","isActive":"IsActiveFlag","name":"string value","title":"string value"}]}}],"settings":"string value","subscriptionType":"string value","teamIds":["string value 1","string value 2"],"userSettings":{"alignmentTreeFilter":{"ownerIds":"string value","tags":"string value","teamIds":"string value"},"alignmentTreeMode":"string value","checklist":{"optOut":false,"showCards":{"inviteTeammate":false,"visitDemoAccount":false,"visitMarketplace":false},"stepsV1":{"createdOkr":false,"invitedTeammate":false,"visitedDemoAccount":false,"visitedMarketplace":false,"watchedVideo":false},"stepsV1Completed":false},"collapsedEntities":["string value 1","string value 2"],"customFieldsSettings":{"hideManageOrderBanner":false,"lastUpdated":"string value"},"dashboardSettings":[{"dashboardId":"string value","settings":["DashboardItemSetting"]}],"emailVerified":false,"favs":[{"id":"string value","name":"string value","type":"string value"}],"goalsGrid":[{"field":"string value","isCustom":false,"label":"string value","visible":false}],"goalsTreeMode":"string value","homeCollapsedItems":{"myOkrs":false,"todo":false},"homeScreen":"string value","insightTemplateSuggestions":{"dismissed":false,"insightboards":[{"insightboardId":"string value","linkToMarketplaceDismissed":false,"numberOfSuggestionsToShow":2}],"tooltipShown":false},"insightboardParams":{},"kpiVirtualGroups":{"favorites":["string value 1","string value 2"]},"kpis":{"from":"string value","groupBy":"string value","to":"string value"},"leftNavItems":{"hub":false,"insights":false,"leftNavIsClosed":false,"lists":false,"okrs":false,"people":false,"reports":false},"listFilters":["string value 1","string value 2"],"listIds":["string value 1","string value 2"],"profilesSettings":{"employeeProfileSettings":{"processSessionFilter":{"sessionIds":["string value 1","string value 2"]},"progressSessionFilter":{"sessionIds":["string value 1","string value 2"]}}},"resizableGridColumns":[{"goalProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"metricProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"taskProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"width":2}],"sessionsIds":[{"linkedSessionIds":["string value 1","string value 2"],"parentId":"string value"}],"showArchivedSessions":false,"snippets":[{"code":"string value","language":"string value","name":"string value"}],"surveys":{"shown":["string value 1","string value 2"]},"taskOrder":"string value","taskView":"string value","teamsView":"string value","treeViewOrder":{"field":"string value","name":"string value"},"useDragMode":false,"useScrollbars":false,"verificationEmailSent":false,"whiteboards":{"opened":[{"id":"string value","openedAt":"string value","zoom":2}]}}}}'
var body ={ "appId": "string 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": "
Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578", "tags": [ { "title": "annual" } ], "owner": { "accountDomain": "string value", "accountId": "string value", "accountName": "string value", "clientId": "string value", "createdById": "string value", "dateCreated": "string value", "dateInvited": "string value", "email": "string value", "firstName": "string value", "id": "string value", "identities": { "items": [ { "clientId": "string value", "connection": "string value", "isSocial": false, "name": "string value", "provider": "string value" } ], "totalCount": 2 }, "invitedBy": "string value", "isActive": false, "isPrimary": false, "isSSOBased": false, "isSwitched": false, "language": "string value", "lastName": "string value", "name": "string value", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] }, "permissions": [ "string value 1", "string value 2" ], "picture": "string value", "pictureInfo": { "canEditPicture": false, "isActive": false, "isPictureEdited": false, "isSSOBased": false }, "roles": [ { "accountId": "string", "description": "string value", "id": "string", "name": "string value", "team": { "ExternalTeamMapping": { "ExternalId": "string value", "ExternalSystem": "string value" }, "accountId": "string", "avatar": "string value", "color": "string value", "createdById": "string", "dateCreated": "string value", "description": "string value", "id": "string", "manager": "string", "members": [ "ID" ], "mentions": {}, "modifiedById": "string", "movedExternalMembers": [ "ID" ], "name": "string value", "parentId": "string", "picture": "string value", "richTextDescription": "string value", "tags": [ { "id": "ID", "isActive": "IsActiveFlag", "name": "string value", "title": "string value" } ] } } ], "settings": "string value", "subscriptionType": "string value", "teamIds": [ "string value 1", "string value 2" ], "userSettings": { "alignmentTreeFilter": { "ownerIds": "string value", "tags": "string value", "teamIds": "string value" }, "alignmentTreeMode": "string value", "checklist": { "optOut": false, "showCards": { "inviteTeammate": false, "visitDemoAccount": false, "visitMarketplace": false }, "stepsV1": { "createdOkr": false, "invitedTeammate": false, "visitedDemoAccount": false, "visitedMarketplace": false, "watchedVideo": false }, "stepsV1Completed": false }, "collapsedEntities": [ "string value 1", "string value 2" ], "customFieldsSettings": { "hideManageOrderBanner": false, "lastUpdated": "string value" }, "dashboardSettings": [ { "dashboardId": "string value", "settings": [ "DashboardItemSetting" ] } ], "emailVerified": false, "favs": [ { "id": "string value", "name": "string value", "type": "string value" } ], "goalsGrid": [ { "field": "string value", "isCustom": false, "label": "string value", "visible": false } ], "goalsTreeMode": "string value", "homeCollapsedItems": { "myOkrs": false, "todo": false }, "homeScreen": "string value", "insightTemplateSuggestions": { "dismissed": false, "insightboards": [ { "insightboardId": "string value", "linkToMarketplaceDismissed": false, "numberOfSuggestionsToShow": 2 } ], "tooltipShown": false }, "insightboardParams": {}, "kpiVirtualGroups": { "favorites": [ "string value 1", "string value 2" ] }, "kpis": { "from": "string value", "groupBy": "string value", "to": "string value" }, "leftNavItems": { "hub": false, "insights": false, "leftNavIsClosed": false, "lists": false, "okrs": false, "people": false, "reports": false }, "listFilters": [ "string value 1", "string value 2" ], "listIds": [ "string value 1", "string value 2" ], "profilesSettings": { "employeeProfileSettings": { "processSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] }, "progressSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] } } }, "resizableGridColumns": [ { "goalProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "metricProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "taskProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "width": 2 } ], "sessionsIds": [ { "linkedSessionIds": [ "string value 1", "string value 2" ], "parentId": "string value" } ], "showArchivedSessions": false, "snippets": [ { "code": "string value", "language": "string value", "name": "string value" } ], "surveys": { "shown": [ "string value 1", "string value 2" ] }, "taskOrder": "string value", "taskView": "string value", "teamsView": "string value", "treeViewOrder": { "field": "string value", "name": "string value" }, "useDragMode": false, "useScrollbars": false, "verificationEmailSent": false, "whiteboards": { "opened": [ { "id": "string value", "openedAt": "string value", "zoom": 2 } ] } } } };
var settings = { "url": "https://app.gtmhub.com/api/v2/integrations/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/v2/integrations/goals/bulk"
body = { "appId": "string 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": "Becoming a market leader definitely does not happen overnight, but rather takes careful planning and hard work.
", "sessionId": "3284gh256a36860111f56578", "tags": [ { "title": "annual" } ], "owner": { "accountDomain": "string value", "accountId": "string value", "accountName": "string value", "clientId": "string value", "createdById": "string value", "dateCreated": "string value", "dateInvited": "string value", "email": "string value", "firstName": "string value", "id": "string value", "identities": { "items": [ { "clientId": "string value", "connection": "string value", "isSocial": false, "name": "string value", "provider": "string value" } ], "totalCount": 2 }, "invitedBy": "string value", "isActive": false, "isPrimary": false, "isSSOBased": false, "isSwitched": false, "language": "string value", "lastName": "string value", "name": "string value", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] }, "permissions": [ "string value 1", "string value 2" ], "picture": "string value", "pictureInfo": { "canEditPicture": false, "isActive": false, "isPictureEdited": false, "isSSOBased": false }, "roles": [ { "accountId": "string", "description": "string value", "id": "string", "name": "string value", "team": { "ExternalTeamMapping": { "ExternalId": "string value", "ExternalSystem": "string value" }, "accountId": "string", "avatar": "string value", "color": "string value", "createdById": "string", "dateCreated": "string value", "description": "string value", "id": "string", "manager": "string", "members": [ "ID" ], "mentions": {}, "modifiedById": "string", "movedExternalMembers": [ "ID" ], "name": "string value", "parentId": "string", "picture": "string value", "richTextDescription": "string value", "tags": [ { "id": "ID", "isActive": "IsActiveFlag", "name": "string value", "title": "string value" } ] } } ], "settings": "string value", "subscriptionType": "string value", "teamIds": [ "string value 1", "string value 2" ], "userSettings": { "alignmentTreeFilter": { "ownerIds": "string value", "tags": "string value", "teamIds": "string value" }, "alignmentTreeMode": "string value", "checklist": { "optOut": false, "showCards": { "inviteTeammate": false, "visitDemoAccount": false, "visitMarketplace": false }, "stepsV1": { "createdOkr": false, "invitedTeammate": false, "visitedDemoAccount": false, "visitedMarketplace": false, "watchedVideo": false }, "stepsV1Completed": false }, "collapsedEntities": [ "string value 1", "string value 2" ], "customFieldsSettings": { "hideManageOrderBanner": false, "lastUpdated": "string value" }, "dashboardSettings": [ { "dashboardId": "string value", "settings": [ "DashboardItemSetting" ] } ], "emailVerified": false, "favs": [ { "id": "string value", "name": "string value", "type": "string value" } ], "goalsGrid": [ { "field": "string value", "isCustom": false, "label": "string value", "visible": false } ], "goalsTreeMode": "string value", "homeCollapsedItems": { "myOkrs": false, "todo": false }, "homeScreen": "string value", "insightTemplateSuggestions": { "dismissed": false, "insightboards": [ { "insightboardId": "string value", "linkToMarketplaceDismissed": false, "numberOfSuggestionsToShow": 2 } ], "tooltipShown": false }, "insightboardParams": {}, "kpiVirtualGroups": { "favorites": [ "string value 1", "string value 2" ] }, "kpis": { "from": "string value", "groupBy": "string value", "to": "string value" }, "leftNavItems": { "hub": false, "insights": false, "leftNavIsClosed": false, "lists": false, "okrs": false, "people": false, "reports": false }, "listFilters": [ "string value 1", "string value 2" ], "listIds": [ "string value 1", "string value 2" ], "profilesSettings": { "employeeProfileSettings": { "processSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] }, "progressSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] } } }, "resizableGridColumns": [ { "goalProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "metricProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "taskProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "width": 2 } ], "sessionsIds": [ { "linkedSessionIds": [ "string value 1", "string value 2" ], "parentId": "string value" } ], "showArchivedSessions": false, "snippets": [ { "code": "string value", "language": "string value", "name": "string value" } ], "surveys": { "shown": [ "string value 1", "string value 2" ] }, "taskOrder": "string value", "taskView": "string value", "teamsView": "string value", "treeViewOrder": { "field": "string value", "name": "string value" }, "useDragMode": false, "useScrollbars": false, "verificationEmailSent": false, "whiteboards": { "opened": [ { "id": "string value", "openedAt": "string value", "zoom": 2 } ] } } } };
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": " |
204 | no content |
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": " |
204 | no content |
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" ] } |
204 | no content |
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 |
204 | no content |
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 ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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 ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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 ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
body * | object | The object used to specify which users and which permissions to be checked expected in body, sample value: { "permissions": [ "string value 1", "string value 2" ], "users": [ "string value 1", "string value 2" ] } |
200 | verifyGoalPermissionsResponse |
400 | bad request |
404 | not found |
409 | conflict |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v2/integrations/goals/{id}/permissions' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"permissions":["string value 1","string value 2"],"users":["string value 1","string value 2"]}'
var body ={ "permissions": [ "string value 1", "string value 2" ], "users": [ "string value 1", "string value 2" ] };
var settings = { "url": "https://app.gtmhub.com/api/v2/integrations/goals/{id}/permissions", "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/v2/integrations/goals/{id}/permissions"
body = { "permissions": [ "string value 1", "string value 2" ], "users": [ "string value 1", "string value 2" ] };
requests.post(url, data=json.dumps(body), headers = headers)
{
"users": [
"string value 1",
"string value 2"
]
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/review"
body = { "reviewers": [ "602b85a255c9d30001d2b7e8", "602b8dc804f94000010daae1" ] };
requests.post(url, data=json.dumps(body), headers = headers)
Name | Type | Description |
---|---|---|
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
200 | goalMetricsLinksResponse |
400 | bad request |
404 | not found |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v2/integrations/goals/{id}/unwatch' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
var settings = { "url": "https://app.gtmhub.com/api/v2/integrations/goals/{id}/unwatch", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.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/integrations/goals/{id}/unwatch"
requests.post(url, headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
200 | goalMetricsLinksResponse |
400 | bad request |
404 | not found |
500 | internal server error |
curl -X POST 'https://app.gtmhub.com/api/v2/integrations/goals/{id}/watch' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
var settings = { "url": "https://app.gtmhub.com/api/v2/integrations/goals/{id}/watch", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.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/integrations/goals/{id}/watch"
requests.post(url, headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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","owner":{"accountDomain":"string value","accountId":"string value","accountName":"string value","clientId":"string value","createdById":"string value","dateCreated":"string value","dateInvited":"string value","email":"string value","firstName":"string value","id":"string value","identities":{"items":[{"clientId":"string value","connection":"string value","isSocial":false,"name":"string value","provider":"string value"}],"totalCount":2},"invitedBy":"string value","isActive":false,"isPrimary":false,"isSSOBased":false,"isSwitched":false,"language":"string value","lastName":"string value","name":"string value","notificationSettings":{"subjectsOptedOut":["string value 1","string value 2"]},"permissions":["string value 1","string value 2"],"picture":"string value","pictureInfo":{"canEditPicture":false,"isActive":false,"isPictureEdited":false,"isSSOBased":false},"roles":[{"accountId":"string","description":"string value","id":"string","name":"string value","team":{"ExternalTeamMapping":{"ExternalId":"string value","ExternalSystem":"string value"},"accountId":"string","avatar":"string value","color":"string value","createdById":"string","dateCreated":"string value","description":"string value","id":"string","manager":"string","members":["ID"],"mentions":{},"modifiedById":"string","movedExternalMembers":["ID"],"name":"string value","parentId":"string","picture":"string value","richTextDescription":"string value","tags":[{"id":"ID","isActive":"IsActiveFlag","name":"string value","title":"string value"}]}}],"settings":"string value","subscriptionType":"string value","teamIds":["string value 1","string value 2"],"userSettings":{"alignmentTreeFilter":{"ownerIds":"string value","tags":"string value","teamIds":"string value"},"alignmentTreeMode":"string value","checklist":{"optOut":false,"showCards":{"inviteTeammate":false,"visitDemoAccount":false,"visitMarketplace":false},"stepsV1":{"createdOkr":false,"invitedTeammate":false,"visitedDemoAccount":false,"visitedMarketplace":false,"watchedVideo":false},"stepsV1Completed":false},"collapsedEntities":["string value 1","string value 2"],"customFieldsSettings":{"hideManageOrderBanner":false,"lastUpdated":"string value"},"dashboardSettings":[{"dashboardId":"string value","settings":["DashboardItemSetting"]}],"emailVerified":false,"favs":[{"id":"string value","name":"string value","type":"string value"}],"goalsGrid":[{"field":"string value","isCustom":false,"label":"string value","visible":false}],"goalsTreeMode":"string value","homeCollapsedItems":{"myOkrs":false,"todo":false},"homeScreen":"string value","insightTemplateSuggestions":{"dismissed":false,"insightboards":[{"insightboardId":"string value","linkToMarketplaceDismissed":false,"numberOfSuggestionsToShow":2}],"tooltipShown":false},"insightboardParams":{},"kpiVirtualGroups":{"favorites":["string value 1","string value 2"]},"kpis":{"from":"string value","groupBy":"string value","to":"string value"},"leftNavItems":{"hub":false,"insights":false,"leftNavIsClosed":false,"lists":false,"okrs":false,"people":false,"reports":false},"listFilters":["string value 1","string value 2"],"listIds":["string value 1","string value 2"],"profilesSettings":{"employeeProfileSettings":{"processSessionFilter":{"sessionIds":["string value 1","string value 2"]},"progressSessionFilter":{"sessionIds":["string value 1","string value 2"]}}},"resizableGridColumns":[{"goalProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"metricProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"taskProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"width":2}],"sessionsIds":[{"linkedSessionIds":["string value 1","string value 2"],"parentId":"string value"}],"showArchivedSessions":false,"snippets":[{"code":"string value","language":"string value","name":"string value"}],"surveys":{"shown":["string value 1","string value 2"]},"taskOrder":"string value","taskView":"string value","teamsView":"string value","treeViewOrder":{"field":"string value","name":"string value"},"useDragMode":false,"useScrollbars":false,"verificationEmailSent":false,"whiteboards":{"opened":[{"id":"string value","openedAt":"string value","zoom":2}]}}}}'
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", "owner": { "accountDomain": "string value", "accountId": "string value", "accountName": "string value", "clientId": "string value", "createdById": "string value", "dateCreated": "string value", "dateInvited": "string value", "email": "string value", "firstName": "string value", "id": "string value", "identities": { "items": [ { "clientId": "string value", "connection": "string value", "isSocial": false, "name": "string value", "provider": "string value" } ], "totalCount": 2 }, "invitedBy": "string value", "isActive": false, "isPrimary": false, "isSSOBased": false, "isSwitched": false, "language": "string value", "lastName": "string value", "name": "string value", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] }, "permissions": [ "string value 1", "string value 2" ], "picture": "string value", "pictureInfo": { "canEditPicture": false, "isActive": false, "isPictureEdited": false, "isSSOBased": false }, "roles": [ { "accountId": "string", "description": "string value", "id": "string", "name": "string value", "team": { "ExternalTeamMapping": { "ExternalId": "string value", "ExternalSystem": "string value" }, "accountId": "string", "avatar": "string value", "color": "string value", "createdById": "string", "dateCreated": "string value", "description": "string value", "id": "string", "manager": "string", "members": [ "ID" ], "mentions": {}, "modifiedById": "string", "movedExternalMembers": [ "ID" ], "name": "string value", "parentId": "string", "picture": "string value", "richTextDescription": "string value", "tags": [ { "id": "ID", "isActive": "IsActiveFlag", "name": "string value", "title": "string value" } ] } } ], "settings": "string value", "subscriptionType": "string value", "teamIds": [ "string value 1", "string value 2" ], "userSettings": { "alignmentTreeFilter": { "ownerIds": "string value", "tags": "string value", "teamIds": "string value" }, "alignmentTreeMode": "string value", "checklist": { "optOut": false, "showCards": { "inviteTeammate": false, "visitDemoAccount": false, "visitMarketplace": false }, "stepsV1": { "createdOkr": false, "invitedTeammate": false, "visitedDemoAccount": false, "visitedMarketplace": false, "watchedVideo": false }, "stepsV1Completed": false }, "collapsedEntities": [ "string value 1", "string value 2" ], "customFieldsSettings": { "hideManageOrderBanner": false, "lastUpdated": "string value" }, "dashboardSettings": [ { "dashboardId": "string value", "settings": [ "DashboardItemSetting" ] } ], "emailVerified": false, "favs": [ { "id": "string value", "name": "string value", "type": "string value" } ], "goalsGrid": [ { "field": "string value", "isCustom": false, "label": "string value", "visible": false } ], "goalsTreeMode": "string value", "homeCollapsedItems": { "myOkrs": false, "todo": false }, "homeScreen": "string value", "insightTemplateSuggestions": { "dismissed": false, "insightboards": [ { "insightboardId": "string value", "linkToMarketplaceDismissed": false, "numberOfSuggestionsToShow": 2 } ], "tooltipShown": false }, "insightboardParams": {}, "kpiVirtualGroups": { "favorites": [ "string value 1", "string value 2" ] }, "kpis": { "from": "string value", "groupBy": "string value", "to": "string value" }, "leftNavItems": { "hub": false, "insights": false, "leftNavIsClosed": false, "lists": false, "okrs": false, "people": false, "reports": false }, "listFilters": [ "string value 1", "string value 2" ], "listIds": [ "string value 1", "string value 2" ], "profilesSettings": { "employeeProfileSettings": { "processSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] }, "progressSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] } } }, "resizableGridColumns": [ { "goalProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "metricProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "taskProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "width": 2 } ], "sessionsIds": [ { "linkedSessionIds": [ "string value 1", "string value 2" ], "parentId": "string value" } ], "showArchivedSessions": false, "snippets": [ { "code": "string value", "language": "string value", "name": "string value" } ], "surveys": { "shown": [ "string value 1", "string value 2" ] }, "taskOrder": "string value", "taskView": "string value", "teamsView": "string value", "treeViewOrder": { "field": "string value", "name": "string value" }, "useDragMode": false, "useScrollbars": false, "verificationEmailSent": false, "whiteboards": { "opened": [ { "id": "string value", "openedAt": "string value", "zoom": 2 } ] } } } };
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", "owner": { "accountDomain": "string value", "accountId": "string value", "accountName": "string value", "clientId": "string value", "createdById": "string value", "dateCreated": "string value", "dateInvited": "string value", "email": "string value", "firstName": "string value", "id": "string value", "identities": { "items": [ { "clientId": "string value", "connection": "string value", "isSocial": false, "name": "string value", "provider": "string value" } ], "totalCount": 2 }, "invitedBy": "string value", "isActive": false, "isPrimary": false, "isSSOBased": false, "isSwitched": false, "language": "string value", "lastName": "string value", "name": "string value", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] }, "permissions": [ "string value 1", "string value 2" ], "picture": "string value", "pictureInfo": { "canEditPicture": false, "isActive": false, "isPictureEdited": false, "isSSOBased": false }, "roles": [ { "accountId": "string", "description": "string value", "id": "string", "name": "string value", "team": { "ExternalTeamMapping": { "ExternalId": "string value", "ExternalSystem": "string value" }, "accountId": "string", "avatar": "string value", "color": "string value", "createdById": "string", "dateCreated": "string value", "description": "string value", "id": "string", "manager": "string", "members": [ "ID" ], "mentions": {}, "modifiedById": "string", "movedExternalMembers": [ "ID" ], "name": "string value", "parentId": "string", "picture": "string value", "richTextDescription": "string value", "tags": [ { "id": "ID", "isActive": "IsActiveFlag", "name": "string value", "title": "string value" } ] } } ], "settings": "string value", "subscriptionType": "string value", "teamIds": [ "string value 1", "string value 2" ], "userSettings": { "alignmentTreeFilter": { "ownerIds": "string value", "tags": "string value", "teamIds": "string value" }, "alignmentTreeMode": "string value", "checklist": { "optOut": false, "showCards": { "inviteTeammate": false, "visitDemoAccount": false, "visitMarketplace": false }, "stepsV1": { "createdOkr": false, "invitedTeammate": false, "visitedDemoAccount": false, "visitedMarketplace": false, "watchedVideo": false }, "stepsV1Completed": false }, "collapsedEntities": [ "string value 1", "string value 2" ], "customFieldsSettings": { "hideManageOrderBanner": false, "lastUpdated": "string value" }, "dashboardSettings": [ { "dashboardId": "string value", "settings": [ "DashboardItemSetting" ] } ], "emailVerified": false, "favs": [ { "id": "string value", "name": "string value", "type": "string value" } ], "goalsGrid": [ { "field": "string value", "isCustom": false, "label": "string value", "visible": false } ], "goalsTreeMode": "string value", "homeCollapsedItems": { "myOkrs": false, "todo": false }, "homeScreen": "string value", "insightTemplateSuggestions": { "dismissed": false, "insightboards": [ { "insightboardId": "string value", "linkToMarketplaceDismissed": false, "numberOfSuggestionsToShow": 2 } ], "tooltipShown": false }, "insightboardParams": {}, "kpiVirtualGroups": { "favorites": [ "string value 1", "string value 2" ] }, "kpis": { "from": "string value", "groupBy": "string value", "to": "string value" }, "leftNavItems": { "hub": false, "insights": false, "leftNavIsClosed": false, "lists": false, "okrs": false, "people": false, "reports": false }, "listFilters": [ "string value 1", "string value 2" ], "listIds": [ "string value 1", "string value 2" ], "profilesSettings": { "employeeProfileSettings": { "processSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] }, "progressSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] } } }, "resizableGridColumns": [ { "goalProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "metricProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "taskProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "width": 2 } ], "sessionsIds": [ { "linkedSessionIds": [ "string value 1", "string value 2" ], "parentId": "string value" } ], "showArchivedSessions": false, "snippets": [ { "code": "string value", "language": "string value", "name": "string value" } ], "surveys": { "shown": [ "string value 1", "string value 2" ] }, "taskOrder": "string value", "taskView": "string value", "teamsView": "string value", "treeViewOrder": { "field": "string value", "name": "string value" }, "useDragMode": false, "useScrollbars": false, "verificationEmailSent": false, "whiteboards": { "opened": [ { "id": "string value", "openedAt": "string value", "zoom": 2 } ] } } } };
requests.put(url, data=json.dumps(body), headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"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",
"attainment": 2,
"attainmentType": 2,
"createdById": "string",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string",
"inherits": false,
"isDeleted": false,
"name": "string value",
"ownerIds": [
"ID"
],
"owner_permissions": {
"deny": "Binary",
"grant": "Binary"
},
"parent": {
"goalId": "ObjectId",
"metricGoalId": "ObjectId",
"metricId": "ObjectId",
"sessionId": "ObjectId"
},
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"private": false,
"richTextDescription": "string value",
"sessionId": "string"
}
],
"metrics": [
{
"actual": 2,
"attainment": 2,
"cascadeType": "string value",
"createdById": "string",
"dateCreated": "string value",
"description": "string value",
"fieldName": "string value",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string",
"id": "string",
"inherits": false,
"initialValue": 2,
"insightName": "string value",
"isDeleted": false,
"manualType": "string value",
"modifiedById": "string",
"name": "string value",
"objectId": "string",
"ownerIds": [
"ID"
],
"owner_permissions": {
"deny": "Binary",
"grant": "Binary"
},
"parent": {
"private": false
},
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"richTextDescription": "string value",
"target": 2,
"targetOperator": "string value"
}
],
"sessions": [
{
"accountId": "string",
"end": "string value",
"id": "string",
"inherits": false,
"isDeleted": false,
"owner_permissions": {
"deny": "Binary",
"grant": "Binary"
},
"parentId": "string",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"mentions": {},
"metricsAttainment": 2,
"metricsCount": 2,
"modifiedById": "string",
"name": "string value",
"nonArchivedTasksCount": 2,
"orderId": 2,
"ownerIds": [
"string"
],
"owner_permissions": {
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 2
}
},
"parent": {
"goalId": "string",
"metricGoalId": "string",
"metricId": "string",
"sessionId": "string"
},
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": {
"id": "string value",
"review": "string value"
},
"UserId": "string"
}
],
"ReviewersNeeded": 2,
"Status": 2
},
"ownerId": "string"
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
goal * | object | 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 |
400 | bad request |
500 | internal server error |
curl -X PUT 'https://app.gtmhub.com/api/v2/integrations/goals/{id}' \ -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","owner":{"accountDomain":"string value","accountId":"string value","accountName":"string value","clientId":"string value","createdById":"string value","dateCreated":"string value","dateInvited":"string value","email":"string value","firstName":"string value","id":"string value","identities":{"items":[{"clientId":"string value","connection":"string value","isSocial":false,"name":"string value","provider":"string value"}],"totalCount":2},"invitedBy":"string value","isActive":false,"isPrimary":false,"isSSOBased":false,"isSwitched":false,"language":"string value","lastName":"string value","name":"string value","notificationSettings":{"subjectsOptedOut":["string value 1","string value 2"]},"permissions":["string value 1","string value 2"],"picture":"string value","pictureInfo":{"canEditPicture":false,"isActive":false,"isPictureEdited":false,"isSSOBased":false},"roles":[{"accountId":"string","description":"string value","id":"string","name":"string value","team":{"ExternalTeamMapping":{"ExternalId":"string value","ExternalSystem":"string value"},"accountId":"string","avatar":"string value","color":"string value","createdById":"string","dateCreated":"string value","description":"string value","id":"string","manager":"string","members":["ID"],"mentions":{},"modifiedById":"string","movedExternalMembers":["ID"],"name":"string value","parentId":"string","picture":"string value","richTextDescription":"string value","tags":[{"id":"ID","isActive":"IsActiveFlag","name":"string value","title":"string value"}]}}],"settings":"string value","subscriptionType":"string value","teamIds":["string value 1","string value 2"],"userSettings":{"alignmentTreeFilter":{"ownerIds":"string value","tags":"string value","teamIds":"string value"},"alignmentTreeMode":"string value","checklist":{"optOut":false,"showCards":{"inviteTeammate":false,"visitDemoAccount":false,"visitMarketplace":false},"stepsV1":{"createdOkr":false,"invitedTeammate":false,"visitedDemoAccount":false,"visitedMarketplace":false,"watchedVideo":false},"stepsV1Completed":false},"collapsedEntities":["string value 1","string value 2"],"customFieldsSettings":{"hideManageOrderBanner":false,"lastUpdated":"string value"},"dashboardSettings":[{"dashboardId":"string value","settings":["DashboardItemSetting"]}],"emailVerified":false,"favs":[{"id":"string value","name":"string value","type":"string value"}],"goalsGrid":[{"field":"string value","isCustom":false,"label":"string value","visible":false}],"goalsTreeMode":"string value","homeCollapsedItems":{"myOkrs":false,"todo":false},"homeScreen":"string value","insightTemplateSuggestions":{"dismissed":false,"insightboards":[{"insightboardId":"string value","linkToMarketplaceDismissed":false,"numberOfSuggestionsToShow":2}],"tooltipShown":false},"insightboardParams":{},"kpiVirtualGroups":{"favorites":["string value 1","string value 2"]},"kpis":{"from":"string value","groupBy":"string value","to":"string value"},"leftNavItems":{"hub":false,"insights":false,"leftNavIsClosed":false,"lists":false,"okrs":false,"people":false,"reports":false},"listFilters":["string value 1","string value 2"],"listIds":["string value 1","string value 2"],"profilesSettings":{"employeeProfileSettings":{"processSessionFilter":{"sessionIds":["string value 1","string value 2"]},"progressSessionFilter":{"sessionIds":["string value 1","string value 2"]}}},"resizableGridColumns":[{"goalProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"metricProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"taskProperty":{"propertyName":"string value","type":"string value","viewName":"string value"},"width":2}],"sessionsIds":[{"linkedSessionIds":["string value 1","string value 2"],"parentId":"string value"}],"showArchivedSessions":false,"snippets":[{"code":"string value","language":"string value","name":"string value"}],"surveys":{"shown":["string value 1","string value 2"]},"taskOrder":"string value","taskView":"string value","teamsView":"string value","treeViewOrder":{"field":"string value","name":"string value"},"useDragMode":false,"useScrollbars":false,"verificationEmailSent":false,"whiteboards":{"opened":[{"id":"string value","openedAt":"string value","zoom":2}]}}}}'
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", "owner": { "accountDomain": "string value", "accountId": "string value", "accountName": "string value", "clientId": "string value", "createdById": "string value", "dateCreated": "string value", "dateInvited": "string value", "email": "string value", "firstName": "string value", "id": "string value", "identities": { "items": [ { "clientId": "string value", "connection": "string value", "isSocial": false, "name": "string value", "provider": "string value" } ], "totalCount": 2 }, "invitedBy": "string value", "isActive": false, "isPrimary": false, "isSSOBased": false, "isSwitched": false, "language": "string value", "lastName": "string value", "name": "string value", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] }, "permissions": [ "string value 1", "string value 2" ], "picture": "string value", "pictureInfo": { "canEditPicture": false, "isActive": false, "isPictureEdited": false, "isSSOBased": false }, "roles": [ { "accountId": "string", "description": "string value", "id": "string", "name": "string value", "team": { "ExternalTeamMapping": { "ExternalId": "string value", "ExternalSystem": "string value" }, "accountId": "string", "avatar": "string value", "color": "string value", "createdById": "string", "dateCreated": "string value", "description": "string value", "id": "string", "manager": "string", "members": [ "ID" ], "mentions": {}, "modifiedById": "string", "movedExternalMembers": [ "ID" ], "name": "string value", "parentId": "string", "picture": "string value", "richTextDescription": "string value", "tags": [ { "id": "ID", "isActive": "IsActiveFlag", "name": "string value", "title": "string value" } ] } } ], "settings": "string value", "subscriptionType": "string value", "teamIds": [ "string value 1", "string value 2" ], "userSettings": { "alignmentTreeFilter": { "ownerIds": "string value", "tags": "string value", "teamIds": "string value" }, "alignmentTreeMode": "string value", "checklist": { "optOut": false, "showCards": { "inviteTeammate": false, "visitDemoAccount": false, "visitMarketplace": false }, "stepsV1": { "createdOkr": false, "invitedTeammate": false, "visitedDemoAccount": false, "visitedMarketplace": false, "watchedVideo": false }, "stepsV1Completed": false }, "collapsedEntities": [ "string value 1", "string value 2" ], "customFieldsSettings": { "hideManageOrderBanner": false, "lastUpdated": "string value" }, "dashboardSettings": [ { "dashboardId": "string value", "settings": [ "DashboardItemSetting" ] } ], "emailVerified": false, "favs": [ { "id": "string value", "name": "string value", "type": "string value" } ], "goalsGrid": [ { "field": "string value", "isCustom": false, "label": "string value", "visible": false } ], "goalsTreeMode": "string value", "homeCollapsedItems": { "myOkrs": false, "todo": false }, "homeScreen": "string value", "insightTemplateSuggestions": { "dismissed": false, "insightboards": [ { "insightboardId": "string value", "linkToMarketplaceDismissed": false, "numberOfSuggestionsToShow": 2 } ], "tooltipShown": false }, "insightboardParams": {}, "kpiVirtualGroups": { "favorites": [ "string value 1", "string value 2" ] }, "kpis": { "from": "string value", "groupBy": "string value", "to": "string value" }, "leftNavItems": { "hub": false, "insights": false, "leftNavIsClosed": false, "lists": false, "okrs": false, "people": false, "reports": false }, "listFilters": [ "string value 1", "string value 2" ], "listIds": [ "string value 1", "string value 2" ], "profilesSettings": { "employeeProfileSettings": { "processSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] }, "progressSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] } } }, "resizableGridColumns": [ { "goalProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "metricProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "taskProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "width": 2 } ], "sessionsIds": [ { "linkedSessionIds": [ "string value 1", "string value 2" ], "parentId": "string value" } ], "showArchivedSessions": false, "snippets": [ { "code": "string value", "language": "string value", "name": "string value" } ], "surveys": { "shown": [ "string value 1", "string value 2" ] }, "taskOrder": "string value", "taskView": "string value", "teamsView": "string value", "treeViewOrder": { "field": "string value", "name": "string value" }, "useDragMode": false, "useScrollbars": false, "verificationEmailSent": false, "whiteboards": { "opened": [ { "id": "string value", "openedAt": "string value", "zoom": 2 } ] } } } };
var settings = { "url": "https://app.gtmhub.com/api/v2/integrations/goals/{id}", "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/v2/integrations/goals/{id}"
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", "owner": { "accountDomain": "string value", "accountId": "string value", "accountName": "string value", "clientId": "string value", "createdById": "string value", "dateCreated": "string value", "dateInvited": "string value", "email": "string value", "firstName": "string value", "id": "string value", "identities": { "items": [ { "clientId": "string value", "connection": "string value", "isSocial": false, "name": "string value", "provider": "string value" } ], "totalCount": 2 }, "invitedBy": "string value", "isActive": false, "isPrimary": false, "isSSOBased": false, "isSwitched": false, "language": "string value", "lastName": "string value", "name": "string value", "notificationSettings": { "subjectsOptedOut": [ "string value 1", "string value 2" ] }, "permissions": [ "string value 1", "string value 2" ], "picture": "string value", "pictureInfo": { "canEditPicture": false, "isActive": false, "isPictureEdited": false, "isSSOBased": false }, "roles": [ { "accountId": "string", "description": "string value", "id": "string", "name": "string value", "team": { "ExternalTeamMapping": { "ExternalId": "string value", "ExternalSystem": "string value" }, "accountId": "string", "avatar": "string value", "color": "string value", "createdById": "string", "dateCreated": "string value", "description": "string value", "id": "string", "manager": "string", "members": [ "ID" ], "mentions": {}, "modifiedById": "string", "movedExternalMembers": [ "ID" ], "name": "string value", "parentId": "string", "picture": "string value", "richTextDescription": "string value", "tags": [ { "id": "ID", "isActive": "IsActiveFlag", "name": "string value", "title": "string value" } ] } } ], "settings": "string value", "subscriptionType": "string value", "teamIds": [ "string value 1", "string value 2" ], "userSettings": { "alignmentTreeFilter": { "ownerIds": "string value", "tags": "string value", "teamIds": "string value" }, "alignmentTreeMode": "string value", "checklist": { "optOut": false, "showCards": { "inviteTeammate": false, "visitDemoAccount": false, "visitMarketplace": false }, "stepsV1": { "createdOkr": false, "invitedTeammate": false, "visitedDemoAccount": false, "visitedMarketplace": false, "watchedVideo": false }, "stepsV1Completed": false }, "collapsedEntities": [ "string value 1", "string value 2" ], "customFieldsSettings": { "hideManageOrderBanner": false, "lastUpdated": "string value" }, "dashboardSettings": [ { "dashboardId": "string value", "settings": [ "DashboardItemSetting" ] } ], "emailVerified": false, "favs": [ { "id": "string value", "name": "string value", "type": "string value" } ], "goalsGrid": [ { "field": "string value", "isCustom": false, "label": "string value", "visible": false } ], "goalsTreeMode": "string value", "homeCollapsedItems": { "myOkrs": false, "todo": false }, "homeScreen": "string value", "insightTemplateSuggestions": { "dismissed": false, "insightboards": [ { "insightboardId": "string value", "linkToMarketplaceDismissed": false, "numberOfSuggestionsToShow": 2 } ], "tooltipShown": false }, "insightboardParams": {}, "kpiVirtualGroups": { "favorites": [ "string value 1", "string value 2" ] }, "kpis": { "from": "string value", "groupBy": "string value", "to": "string value" }, "leftNavItems": { "hub": false, "insights": false, "leftNavIsClosed": false, "lists": false, "okrs": false, "people": false, "reports": false }, "listFilters": [ "string value 1", "string value 2" ], "listIds": [ "string value 1", "string value 2" ], "profilesSettings": { "employeeProfileSettings": { "processSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] }, "progressSessionFilter": { "sessionIds": [ "string value 1", "string value 2" ] } } }, "resizableGridColumns": [ { "goalProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "metricProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "taskProperty": { "propertyName": "string value", "type": "string value", "viewName": "string value" }, "width": 2 } ], "sessionsIds": [ { "linkedSessionIds": [ "string value 1", "string value 2" ], "parentId": "string value" } ], "showArchivedSessions": false, "snippets": [ { "code": "string value", "language": "string value", "name": "string value" } ], "surveys": { "shown": [ "string value 1", "string value 2" ] }, "taskOrder": "string value", "taskView": "string value", "teamsView": "string value", "treeViewOrder": { "field": "string value", "name": "string value" }, "useDragMode": false, "useScrollbars": false, "verificationEmailSent": false, "whiteboards": { "opened": [ { "id": "string value", "openedAt": "string value", "zoom": 2 } ] } } } };
requests.put(url, data=json.dumps(body), headers = headers)
{
"access": {
"inherits": false,
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
goalConfidence * | object | expected in body, sample value: { "reason": "string value", "value": 2 } |
200 | goal |
400 | bad request |
500 | internal server error |
curl -X PUT 'https://app.gtmhub.com/api/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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/v2/integrations/goals/{id}/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",
"attainment": 2,
"attainmentType": 2,
"createdById": "string",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string",
"inherits": false,
"isDeleted": false,
"name": "string value",
"ownerIds": [
"ID"
],
"owner_permissions": {
"deny": "Binary",
"grant": "Binary"
},
"parent": {
"goalId": "ObjectId",
"metricGoalId": "ObjectId",
"metricId": "ObjectId",
"sessionId": "ObjectId"
},
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"private": false,
"richTextDescription": "string value",
"sessionId": "string"
}
],
"metrics": [
{
"actual": 2,
"attainment": 2,
"cascadeType": "string value",
"createdById": "string",
"dateCreated": "string value",
"description": "string value",
"fieldName": "string value",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string",
"id": "string",
"inherits": false,
"initialValue": 2,
"insightName": "string value",
"isDeleted": false,
"manualType": "string value",
"modifiedById": "string",
"name": "string value",
"objectId": "string",
"ownerIds": [
"ID"
],
"owner_permissions": {
"deny": "Binary",
"grant": "Binary"
},
"parent": {
"private": false
},
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"richTextDescription": "string value",
"target": 2,
"targetOperator": "string value"
}
],
"sessions": [
{
"accountId": "string",
"end": "string value",
"id": "string",
"inherits": false,
"isDeleted": false,
"owner_permissions": {
"deny": "Binary",
"grant": "Binary"
},
"parentId": "string",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"mentions": {},
"metricsAttainment": 2,
"metricsCount": 2,
"modifiedById": "string",
"name": "string value",
"nonArchivedTasksCount": 2,
"orderId": 2,
"ownerIds": [
"string"
],
"owner_permissions": {
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 2
}
},
"parent": {
"goalId": "string",
"metricGoalId": "string",
"metricId": "string",
"sessionId": "string"
},
"permissions": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": {
"id": "string value",
"review": "string value"
},
"UserId": "string"
}
],
"ReviewersNeeded": 2,
"Status": 2
},
"ownerId": "string"
}
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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"reviewersNeeded": 2,
"status": "string value"
}
}
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
goal * | object | 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 |
400 | bad request |
500 | internal server error |
curl -X PATCH 'https://app.gtmhub.com/api/v2/integrations/goals/{id}' \ -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/v2/integrations/goals/{id}", "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/v2/integrations/goals/{id}"
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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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",
"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",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": {
"ID": "ID",
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": {},
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
{
"deny": "Binary",
"grant": "Binary",
"principalId": "ObjectId",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"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": {
"ID": "string",
"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": "6093fdabd251f200015e8f92",
"goalOwnerIds": {},
"initialValue": 2,
"insightName": "1k42vv2z24",
"links": {
"expanded": {
"goals": [
{
"access": "defaultAccess",
"accountId": "string value",
"assignee": "assigneeResponse",
"assignees": [
"assigneeResponse"
],
"attainment": 2,
"attainmentTypeString": "string value",
"createdById": "string value",
"dateCreated": "string value",
"dateFrom": "string value",
"dateTo": "string value",
"description": "string value",
"id": "string value",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"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",
"url": "string value"
}
],
"metrics": [
{
"actual": 6,
"cascadeType": "absolute_value",
"description": "My Description",
"dynamic": true,
"fieldName": "count",
"format": "MetricFormat",
"goalId": "string value",
"goalName": "string value",
"initialValue": 2,
"insightName": "1k42vv2z24",
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "string value",
"ownerIds": "Ids",
"richTextDescription": "string value",
"sessionId": "6093fdabd251f200015e8f92",
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"manualType": "double",
"name": "string value",
"numberOfOwners": 2,
"obfuscated": false,
"ownerId": "6093fdabd251f200015e8f92",
"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": [
{
"deny": {
"Subtype": 2,
"Kind": 2
},
"grant": {
"Subtype": 2,
"Kind": 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": [
{
"id": "string value",
"review": "string value"
}
],
"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)
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | Specifies the ID of the gtmhub account. expected in header, sample value: 5be26318e5274a0007f17f61 |
id * | string | Specifies the goal ID. expected in path, sample value: 5be26318e5274a0007f17f61 |
200 | string message returned by the service |
404 | not found |
500 | internal server error |
curl -X DELETE 'https://app.gtmhub.com/api/v2/integrations/goals/{id}' \ -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/integrations/goals/{id}", "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/v2/integrations/goals/{id}"
requests.delete(url, headers = headers)
Oops! Looks like there are no API calls of that type for this Endpoint