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.

🔗
get
/goals
Gets all goals in the current gtmhub account.
By default goal metrics and links.expanded are not included in the response.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
fieldsstringList of fields to be retrieved, separated by comas (,).
expected in query, sample value:
_id would return only the _id field
sortstringList 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
filterstringThe 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"
skipintegerHow many entities to skip when executing a get query. By default skip value is 0.
expected in query, sample value:
5
limitintegerThe max number of entities that can be returned by the get query. By default take value is 100.
expected in query, sample value:
10
formattingstringThe 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
Expected response codes
200goalsResponse
400bad request
401unauthorized
500internal 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
}
🔗
get
/goals/groupBy/owners
Gets list of users or teams that are goal owners and their corresponding owned goals.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
filterstringThe named filter for filtering goals by their deadline dates. One of current, past, future.
expected in query, sample value:
current
idsstringThe goal IDs by which to filter goals separated by ','.
expected in query, sample value:
61a74153d8b312000145b519,602e31560f20d500012dbe0e
ownerIdsstringThe owner IDs by which to filter goals separated by ','.
expected in query, sample value:
6197665868264500014d04e0,619765b69b8b5c0001b5e669
metricOwnerIdstringThe metric owner IDs by which to filter goals separated by ','.
expected in query, sample value:
615a9d1c84d86400013f8170,6197665815627f0001850837
confidencestringThe goal confidence for which to filter. Supports operators like greater or less than.
expected in query, sample value:
>0.5
attainmentstringSpecifies that the goal must have metrics checked in before that date. Date format: yyyy-mm-dd
expected in query, sample value:
2021-03-20
metricBeforestringSpecifies that the goal must have metrics checked in before that date. Date format: 2006-01-02
expected in query, sample value:
2021-03-20
metricAfterstringSpecifies that the goal must have metrics checked in after that date. Date format: 2006-01-02
expected in query, sample value:
>1
metricAttainmentstringSpecifies 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
sortstringThe sort expression.
expected in query, sample value:
true
includeMetricsbooleanWeather 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
skipintegerHow many entities to skip when executing a get query
expected in query, sample value:
50
takeintegerThe max number of entities that can be returned by the get query.
expected in query, sample value:
2
Expected response codes
200goalsGroupedByResponse
400bad request
401unauthorized
500internal 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
}
🔗
get
/goals/groupBy/reviewers
Gets list of users that are selected as reviewers and their corresponding goals to review.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
filterstringThe named filter for filtering goals by their deadline dates. One of current, past, future.
expected in query, sample value:
current
idsstringThe goal IDs by which to filter goals separated by ','.
expected in query, sample value:
61a74153d8b312000145b519,602e31560f20d500012dbe0e
ownerIdsstringThe owner IDs by which to filter goals separated by ','.
expected in query, sample value:
6197665868264500014d04e0,619765b69b8b5c0001b5e669
metricOwnerIdstringThe metric owner IDs by which to filter goals separated by ','.
expected in query, sample value:
615a9d1c84d86400013f8170,6197665815627f0001850837
confidencestringThe goal confidence for which to filter. Supports operators like greater or less than.
expected in query, sample value:
>0.5
attainmentstringSpecifies that the goal must have metrics checked in before that date. Date format: yyyy-mm-dd
expected in query, sample value:
2021-03-20
metricBeforestringSpecifies that the goal must have metrics checked in before that date. Date format: 2006-01-02
expected in query, sample value:
2021-03-20
metricAfterstringSpecifies that the goal must have metrics checked in after that date. Date format: 2006-01-02
expected in query, sample value:
>1
metricAttainmentstringSpecifies 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
sortstringThe sort expression.
expected in query, sample value:
true
includeMetricsbooleanWeather 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
skipintegerHow many entities to skip when executing a get query
expected in query, sample value:
50
takeintegerThe max number of entities that can be returned by the get query.
expected in query, sample value:
2
Expected response codes
200goalsGroupedByResponse
400bad request
401unauthorized
500internal 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
}
🔗
get
/goals/metric/{ownerId}
Get goals based on metric owner id.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
ownerId
*
stringSpecifies the Id of the metric owner.
expected in path, sample value:
6138969ab6adf10001fc329c
Expected response codes
200goalsResponse
400bad request
401unauthorized
500internal 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
}
🔗
get
/goals/{goalId}
Gets a goal by its unique identifier (id) in the current gtmhub account.
By default the content of links.expanded is not included as part of the response due to its potential size. If you wish to include the full linked fields, use the fields projection option in the query string. Example: ?fields=name,links
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
fieldsstringList 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}
formattingstringThe 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
Expected response codes
200goalMetricsLinksResponse
401unauthorized

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"
    }
}
🔗
get
/goals/{goalId}/workflow-actions
Returns workflow actions for a given goal.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
Expected response codes
200goalWorkflowActionResponse
400bad request
404not found
500internal 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
}
🔗
get
/goals/{id}
Gets a goal by its ID in the current gtmhub account.
By default the content of links.expanded is not included as part of the response due to its potential size. If you wish to include the full linked fields use the fields projection option in the query string Example: ?fields=name,links
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
fieldsstringIf 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
formattingstringThe 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
Expected response codes
200goalMetricsLinksResponse
400bad request
404not found
500internal 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"
    }
}
🔗
get
/goals/{id}/workflow-actions
Returns workflow actions for a given goal.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200goalWorkflowActionResponse
400bad request
404not found
500internal 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
}
🔗
post
/goals
Creates a goal in the current Gtmhub account.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goal
*
objectThe 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": "

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 } ] } } } }
Expected response codes
201goalMetricsLinksResponse
400bad request
401unauthorized

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"
    }
}
🔗
post
/goals/bulk
Creates multiple goals in the current Gtmhub account.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goals
*
objectThe 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": "

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 } ] } } } }
Expected response codes
201createdGoalsResponse
400bad request
401unauthorized
403forbidden
404not found
500internal 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"
            }
        ]
    }
]
🔗
post
/goals/{goalId}/approve
Changes the status of the goal to "approved". This endpoint is relevant for goals that have approval workflow enabled.
More info: https://help.gtmhub.com/en/articles/3125479-approval-workflow The goal can be approved only if the current user is selected as reviewer, otherwise an error occurs.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
comment
*
objectThe 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": "

This goal is / is not important for the company.

" }
Expected response codes
204no content
400bad request
404not found
500internal 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)
🔗
post
/goals/{goalId}/decline
Changes the status of the goal to "declined".
Declining a goal automatically changes its status to draft. The goal can be declined only if the current user is selected as a reviewer, otherwise an error occurs.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
comment
*
objectThe 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": "

This goal is / is not important for the company.

" }
Expected response codes
204no content
400bad request
404not found
500internal 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)
🔗
post
/goals/{goalId}/review
Sets selected users as reviewers for this goal.
In order a user to be selected as a reviewer he has to have "read" and "update" permissions for the goal.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
reviewers
*
objectThe 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"
    ]
}
Expected response codes
204no content
400nonExistingReviewResponse
404not found
409conflict
500internal 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)
🔗
post
/goals/{goalId}/withdraw
Puts the goal back in draft state where the goal is not locked and can be edited.
Goals can be withdrawn by users that own the goal only. No request object required.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
Expected response codes
204no content
400bad request
404not found
500internal 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)
🔗
post
/goals/{id}/approve
Changes the status of the reviewer to "approves".
The goal can be approved only if the current user is selected as reviewer, otherwise Bad Request is returned.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
commentobjectThe 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": "

This goal is / is not important for the company.

" }
Expected response codes
200string message returned by the service
400bad request
404not found
500internal 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)
🔗
post
/goals/{id}/decline
Changes the status of the reviewer to "declines".
Declining a goal automatically changes its status to draft. The goal can be declined only if the current user is selected as a reviewer, otherwise Bad Request is returned.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
commentobjectThe 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": "

This goal is / is not important for the company.

" }
Expected response codes
200string message returned by the service
400bad request
404not found
500internal 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)
🔗
post
/goals/{id}/permissions
Verifies whether the provided entities have the requested permissions for the goal.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
body
*
objectThe 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"
    ]
}
Expected response codes
200verifyGoalPermissionsResponse
400bad request
404not found
409conflict
500internal 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"
    ]
}
🔗
post
/goals/{id}/review
Sets selected users as reviewers for this goal.
In order a user to be selected as a reviewer he has to have "read" and "update" permissions for the goal.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
reviewers
*
objectThe 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"
    ]
}
Expected response codes
200string message returned by the service
400nonExistingReviewResponse
404not found
409conflict
500internal 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)
🔗
post
/goals/{id}/unwatch
Marks the goal as no longer being watched.
Parameters
NameTypeDescription
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200goalMetricsLinksResponse
400bad request
404not found
500internal 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"
    }
}
🔗
post
/goals/{id}/watch
Marks the goal as being watched by the current user.
Parameters
NameTypeDescription
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200goalMetricsLinksResponse
400bad request
404not found
500internal 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"
    }
}
🔗
post
/goals/{id}/withdraw
Puts the goal back in draft state where the goal is not locked and can be edited.
Goals can be withdrawn only by users that own the goal.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200string message returned by the service
400bad request
404not found
500internal 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)
DEPRECATED
🔗
put
/goals/{goalId}
Updates an Objective.
This endpoint is deprecated. Use PATCH Objective instead.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
goal
*
objectThe 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": "

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 } ] } } } }
Expected response codes
200goalMetricsLinksResponse
401unauthorized

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"
    }
}
DEPRECATED
🔗
put
/goals/{goalId}/confidence
Updates an existing goal.
This endpoint is deprecated. Confidence is available on a Key Result level. Use PATCH Key Result instead.
Parameters
NameTypeDescription
goalId
*
stringSpecifies 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
}
Expected response codes
200goal
401unauthorized

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"
}
🔗
put
/goals/{id}
Updates a goal.
Deprecated: Use the Patch method of goals and Patch method of metrics instead
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies 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": "

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 } ] } } } }
Expected response codes
200goalMetricsLinksResponse
400bad request
500internal 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"
    }
}
🔗
put
/goals/{id}/confidence
Updates a goal.
Deprecated:confidence now lives on metrics
Parameters
NameTypeDescription
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
goalConfidence
*
object
expected in body, sample value:
{
    "reason": "string value",
    "value": 2
}
Expected response codes
200goal
400bad request
500internal 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"
}
🔗
patch
/goals/{goalId}
Partial update of the goal.
Updates all the fields that are specified in the request body.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
goal
*
objectThe 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": "\"

test

\"", "sessionId": "6184ed271a35460001f26588" }
Expected response codes
200goalMetricsLinksResponse
401unauthorized

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"
    }
}
🔗
patch
/goals/{id}
Partial update of the goal. Only updates field that are specified in the body of the request.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies 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": "\"

test

\"", "sessionId": "6184ed271a35460001f26588" }
Expected response codes
200goalMetricsLinksResponse
400bad request
500internal 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"
    }
}
🔗
delete
/goals/{goalId}
Deletes a goal in the current gtmhub account.
No request object required.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
goalId
*
stringSpecifies the unique identifier of the goal (objective).
expected in path, sample value:
6138969ab6adf10001fc329c
Expected response codes
401unauthorized

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)
🔗
delete
/goals/{id}
Deletes a goal in the current gtmhub account.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the goal ID.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200string message returned by the service
404not found
500internal 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)