Sessions endpoints

The Sessions endpoints enable you to work programatically with the sessions in your Gtmhub account. All CRUD operations are supported by the sessions API endpoints.

🔗
get
/sessions
Gets all the sessions in the account
Parameters
NameTypeDescription
fieldsstringList of fields to be retrieved, separated by comas (,).
expected in query, sample value:
name,description
sortstringList of fields separated by comas (,). To invert a field's sort, you can prefix its name with a minus (-). For example, the following expression: sort=-name,dateCreated would return entities in reverse lexicographical order and then ordered by dateCreated.
expected in query, sample value:
-name,dateCreated
filterstringThe format of the parameter is inspired by the MongoDB query format. For example, the following expression {name: {$in: ["sales", "marketing"]}} would return all the entities that have name either "sales" or "marketing". This expression {"name":{$regex:".*Sales.*"}} would return entities that contain "Sales" in their names.
expected in query, sample value:
{name: {$in: ["sales", "marketing"]}}
skipintegerHow many entities to be skipped 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: "@[John Smith:[email protected]:602a65efc05575000123291b]". Use 'plainText' if you need the response to be returned without markdown and special markup. Ex: "@John Smith"
expected in query, sample value:
plainText
Expected response codes
200planningSessionsResponse
401unauthorized

curl -X GET 'https://app.gtmhub.com/api/v2/sessions?fields=name,description&sort=-name,dateCreated&filter={name: {$in: ["sales", "marketing"]}}&skip=5&limit=10&formatting=plainText' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.gtmhub.com/api/v2/sessions?fields=name,description&sort=-name,dateCreated&filter={name: {$in: ["sales", "marketing"]}}&skip=5&limit=10&formatting=plainText", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.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/sessions"



requests.get(url, headers = headers)
{
    "items": [
        {
            "accountId": "string value",
            "cadence": {
                "ranges": [
                    {
                        "cadenceOrder": 2,
                        "end": "string value",
                        "start": "string value"
                    }
                ],
                "totalCadences": 2,
                "type": "string value"
            },
            "cadenceStart": {
                "dayOfMonth": 2,
                "periodOfMonth": "string",
                "weekday": 2
            },
            "cadenceTimeZone": "string value",
            "color": "string value",
            "currentUserAllowedActions": [
                "string value 1",
                "string value 2"
            ],
            "demo": false,
            "dynamicValueType": "string value",
            "end": "string value",
            "id": "string value",
            "inherits": false,
            "isSelfApproveAllowed": false,
            "parentId": "string value",
            "permissions": [
                {
                    "grant": {
                        "Subtype": 2
                    },
                    "principalId": "string",
                    "principalKind": "string value"
                }
            ],
            "settings": {
                "assignGoalPermissions": "string value",
                "assignMetricPermissions": "string value",
                "goalsPerOwnerLimit": 2,
                "metricsPerGoalLimit": 2,
                "multipleOwners": {
                    "disabledForGoals": false,
                    "disabledForMetrics": false
                },
                "progressAggregationDisabled": false
            },
            "start": "string value",
            "status": "string value",
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "title": "string value",
            "workflow": {
                "editableKrFields": [
                    "string value 1",
                    "string value 2"
                ],
                "editableOkrFields": [
                    "string value 1",
                    "string value 2"
                ],
                "reviewers": 2,
                "target": [
                    "string value 1",
                    "string value 2"
                ]
            }
        }
    ],
    "totalCount": 2
}
🔗
get
/sessions/{id}/stats/goalsMet
Gets the goals that are over 99% in this session.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
tagsstringA comma separated list of tag names/titles to filter by. The filter is inclusive (union). For example specifying tag names as "tag1,tag2" will return all items that have a tag1 or tag2 assigned.
expected in query, sample value:
string
Expected response codes
200goalsResponse
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{id}/stats/goalsMet?tags=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/v1/sessions/{id}/stats/goalsMet?tags=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/v1/sessions/{id}/stats/goalsMet"



requests.get(url, headers = headers)
{
    "items": [
        {
            "access": {
                "inherits": false,
                "permissions": [
                    {
                        "grant": {
                            "Subtype": 2
                        },
                        "principalId": "string",
                        "principalKind": "string value"
                    }
                ]
            },
            "accountId": "string value",
            "aggregatedAttainment": 2,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "assignees": [
                {
                    "accountId": "string value",
                    "avatar": "string value",
                    "color": "string value",
                    "dynamicValueType": "string value",
                    "email": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "picture": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "type": "string value"
                }
            ],
            "attainment": 2,
            "attainmentTypeString": "string value",
            "childrenAggregatedAttainment": 2,
            "childrenCount": 2,
            "closedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "createdById": "string value",
            "dateCreated": "string value",
            "dateFrom": "string value",
            "dateTo": "string value",
            "description": "string value",
            "designScore": {
                "policies": [
                    {
                        "isPassed": false,
                        "policy": "string value",
                        "score": 2
                    }
                ],
                "totalPoints": 2
            },
            "duration": 2,
            "fullAggregatedAttainment": 2,
            "fullSubTreeCount": 2,
            "id": "string value",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": {
                                "inherits": false,
                                "permissions": [
                                    "Permission"
                                ]
                            },
                            "accountId": "string value",
                            "aggregatedAttainment": 2,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "childrenAggregatedAttainment": 2,
                            "childrenCount": 2,
                            "closedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "designScore": {
                                "policies": [
                                    "PolicyResultResponse"
                                ],
                                "totalPoints": 2
                            },
                            "duration": 2,
                            "fullAggregatedAttainment": 2,
                            "fullSubTreeCount": 2,
                            "id": "string value",
                            "locked": false,
                            "metricsCount": 2,
                            "modifiedById": "string value",
                            "name": "string value",
                            "nonArchivedTasksCount": 2,
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "orderId": 2,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "subTreeCount": 2,
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "tasksCount": 2,
                            "url": "string value",
                            "watchers": [
                                "string value 1",
                                "string value 2"
                            ],
                            "workflow": {
                                "approvedAt": "string value",
                                "reviewers": "ReviewersResponse",
                                "reviewersNeeded": 2,
                                "status": "string value"
                            }
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "cascadeType": "absolute_value",
                            "critical": 50,
                            "description": "My Description",
                            "dueDate": "2021-06-30",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": {
                                "fractionSize": 2,
                                "prefix": "string value",
                                "suffix": "string value"
                            },
                            "goalClosedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "goalDescription": "My Description",
                            "goalId": "string value",
                            "goalName": "string value",
                            "goalOwnerId": "string value",
                            "goalOwnerIds": {},
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "links": {
                                "expanded": "sessionsGoalsMetricsResponse"
                            },
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": {},
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "settings": [
                                {
                                    "dynamicValues": [
                                        "DashboardDynamicValue"
                                    ],
                                    "name": "string value",
                                    "value": "string value",
                                    "valueDisplayName": "string value"
                                }
                            ],
                            "softDueDate": "2021-06-25",
                            "sourceMetricId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetMetrics": {},
                            "targetOperator": "at_least",
                            "tasksCount": 2,
                            "url": "string value"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "cadence": {
                                "ranges": [
                                    "CadenceRange"
                                ],
                                "totalCadences": 2,
                                "type": "string value"
                            },
                            "cadenceStart": {
                                "dayOfMonth": 2,
                                "periodOfMonth": "MonthPeriod",
                                "weekday": "Weekday"
                            },
                            "cadenceTimeZone": "string value",
                            "color": "string value",
                            "currentUserAllowedActions": [
                                "string value 1",
                                "string value 2"
                            ],
                            "demo": false,
                            "dynamicValueType": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "isSelfApproveAllowed": false,
                            "parentId": "string value",
                            "permissions": [
                                {
                                    "grant": "Binary",
                                    "principalId": "ID",
                                    "principalKind": "string value"
                                }
                            ],
                            "settings": {
                                "assignGoalPermissions": "string value",
                                "assignMetricPermissions": "string value",
                                "goalsPerOwnerLimit": 2,
                                "metricsPerGoalLimit": 2,
                                "multipleOwners": "multipleOwnersSetting",
                                "progressAggregationDisabled": false
                            },
                            "start": "string value",
                            "status": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "title": "string value",
                            "workflow": {
                                "editableKrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "editableOkrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "reviewers": 2,
                                "target": [
                                    "string value 1",
                                    "string value 2"
                                ]
                            }
                        }
                    ]
                }
            },
            "locked": false,
            "metrics": [
                {
                    "actual": 6,
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            {
                                "createdBy": "string",
                                "dateCreated": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "title": "string value"
                            }
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                {
                                    "createdBy": "string",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "type": "string value"
                        }
                    ],
                    "cascadeType": "absolute_value",
                    "critical": 50,
                    "description": "My Description",
                    "dueDate": "2021-06-30",
                    "dynamic": true,
                    "fieldName": "count",
                    "format": {
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalClosedStatus": {
                        "reason": "string value",
                        "status": "string value"
                    },
                    "goalDescription": "My Description",
                    "goalId": "string value",
                    "goalName": "string value",
                    "goalOwnerId": "string value",
                    "goalOwnerIds": {},
                    "initialValue": 2,
                    "insightName": "1k42vv2z24",
                    "links": {
                        "expanded": {
                            "goals": [
                                {
                                    "access": "defaultAccess",
                                    "accountId": "string value",
                                    "aggregatedAttainment": 2,
                                    "assignee": "assigneeResponse",
                                    "assignees": [
                                        "assigneeResponse"
                                    ],
                                    "attainment": 2,
                                    "attainmentTypeString": "string value",
                                    "childrenAggregatedAttainment": 2,
                                    "childrenCount": 2,
                                    "closedStatus": "ClosedStatusResponse",
                                    "createdById": "string value",
                                    "dateCreated": "string value",
                                    "dateFrom": "string value",
                                    "dateTo": "string value",
                                    "description": "string value",
                                    "designScore": "DesignScoreResponse",
                                    "duration": 2,
                                    "fullAggregatedAttainment": 2,
                                    "fullSubTreeCount": 2,
                                    "id": "string value",
                                    "locked": false,
                                    "metricsCount": 2,
                                    "modifiedById": "string value",
                                    "name": "string value",
                                    "nonArchivedTasksCount": 2,
                                    "numberOfOwners": 2,
                                    "obfuscated": false,
                                    "orderId": 2,
                                    "ownerId": "string value",
                                    "ownerIds": [
                                        "string value 1",
                                        "string value 2"
                                    ],
                                    "parentGoalSessionId": "string value",
                                    "parentId": "string value",
                                    "parentType": "string value",
                                    "private": false,
                                    "richTextDescription": "string value",
                                    "sessionId": "string value",
                                    "subTreeCount": 2,
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "tasksCount": 2,
                                    "url": "string value",
                                    "watchers": [
                                        "string value 1",
                                        "string value 2"
                                    ],
                                    "workflow": "ApprovalWorkflowResponse"
                                }
                            ],
                            "metrics": [
                                {
                                    "actual": 6,
                                    "assignee": "assigneeResponse",
                                    "assignees": [
                                        "assigneeResponse"
                                    ],
                                    "cascadeType": "absolute_value",
                                    "critical": 50,
                                    "description": "My Description",
                                    "dueDate": "2021-06-30",
                                    "dynamic": true,
                                    "fieldName": "count",
                                    "format": "MetricFormat",
                                    "goalClosedStatus": "ClosedStatusResponse",
                                    "goalDescription": "My Description",
                                    "goalId": "string value",
                                    "goalName": "string value",
                                    "goalOwnerId": "string value",
                                    "goalOwnerIds": "Ids",
                                    "initialValue": 2,
                                    "insightName": "1k42vv2z24",
                                    "links": "linksResponse",
                                    "manualType": "double",
                                    "name": "string value",
                                    "numberOfOwners": 2,
                                    "obfuscated": false,
                                    "ownerId": "string value",
                                    "ownerIds": "Ids",
                                    "richTextDescription": "string value",
                                    "sessionId": "6093fdabd251f200015e8f92",
                                    "settings": [
                                        "DashboardItemSetting"
                                    ],
                                    "softDueDate": "2021-06-25",
                                    "sourceMetricId": "6093fdabd251f200015e8f92",
                                    "target": 100,
                                    "targetMetrics": "Ids",
                                    "targetOperator": "at_least",
                                    "tasksCount": 2,
                                    "url": "string value"
                                }
                            ],
                            "sessions": [
                                {
                                    "accountId": "string value",
                                    "cadence": "Cadence",
                                    "cadenceStart": "CadenceStart",
                                    "cadenceTimeZone": "string value",
                                    "color": "string value",
                                    "currentUserAllowedActions": [
                                        "string value 1",
                                        "string value 2"
                                    ],
                                    "demo": false,
                                    "dynamicValueType": "string value",
                                    "end": "string value",
                                    "id": "string value",
                                    "inherits": false,
                                    "isSelfApproveAllowed": false,
                                    "parentId": "string value",
                                    "permissions": [
                                        "Permission"
                                    ],
                                    "settings": "planningSessionSettings",
                                    "start": "string value",
                                    "status": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "title": "string value",
                                    "workflow": "SessionWorkflowResponse"
                                }
                            ]
                        }
                    },
                    "manualType": "double",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": {},
                    "richTextDescription": "string value",
                    "sessionId": "6093fdabd251f200015e8f92",
                    "settings": [
                        {
                            "dynamicValues": [
                                {
                                    "teamId": "string",
                                    "type": "string"
                                }
                            ],
                            "name": "string value",
                            "value": "string value",
                            "valueDisplayName": "string value"
                        }
                    ],
                    "softDueDate": "2021-06-25",
                    "sourceMetricId": "6093fdabd251f200015e8f92",
                    "target": 100,
                    "targetMetrics": {},
                    "targetOperator": "at_least",
                    "tasksCount": 2,
                    "url": "string value"
                }
            ],
            "metricsCount": 2,
            "modifiedById": "string value",
            "name": "string value",
            "nonArchivedTasksCount": 2,
            "numberOfOwners": 2,
            "obfuscated": false,
            "orderId": 2,
            "ownerId": "string value",
            "ownerIds": [
                "string value 1",
                "string value 2"
            ],
            "parentGoalSessionId": "string value",
            "parentId": "string value",
            "parentType": "string value",
            "private": false,
            "richTextDescription": "string value",
            "sessionId": "string value",
            "subTreeCount": 2,
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "tasks": [
                {
                    "access": {
                        "inherits": false,
                        "permissions": [
                            {
                                "grant": {
                                    "Subtype": 2
                                },
                                "principalId": "string",
                                "principalKind": "string value"
                            }
                        ]
                    },
                    "accountId": "string value",
                    "archived": false,
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            {
                                "createdBy": "string",
                                "dateCreated": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "title": "string value"
                            }
                        ],
                        "type": "string value"
                    },
                    "createdById": "string value",
                    "dateCreated": "string value",
                    "dateModified": "string value",
                    "description": "string value",
                    "dueDate": "string value",
                    "externalId": "string value",
                    "externalSystem": "string value",
                    "id": "string value",
                    "lastComment": {
                        "createdById": "string value",
                        "text": "string value"
                    },
                    "modifiedById": "string value",
                    "name": "string value",
                    "ownerId": "string value",
                    "parentId": "string value",
                    "parentName": "string value",
                    "parentType": "string value",
                    "priority": 2,
                    "richTextDescription": "string value",
                    "sessionId": "string value",
                    "snapshots": [
                        {
                            "id": "string value",
                            "modifiedAt": "string value",
                            "modifiedBy": "string value",
                            "newStatus": "string value",
                            "oldStatus": "string value",
                            "previouslyModifiedAt": "string value"
                        }
                    ],
                    "status": "string value",
                    "taskType": "string value"
                }
            ],
            "tasksCount": 2,
            "url": "string value",
            "watchers": [
                "string value 1",
                "string value 2"
            ],
            "workflow": {
                "approvedAt": "string value",
                "reviewers": [
                    2
                ],
                "reviewersNeeded": 2,
                "status": "string value"
            }
        }
    ],
    "totalCount": 2
}
🔗
get
/sessions/{sessionId}
Gets a session by its unique identifier (id) in the current Gtmhub account.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
Expected response codes
200planningSessionResponse
401unauthorized

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{sessionId}' \ -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/sessions/{sessionId}", "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/sessions/{sessionId}"



requests.get(url, headers = headers)
{
    "accountId": "string value",
    "cadence": {
        "ranges": [
            {
                "cadenceOrder": 2,
                "end": "string value",
                "start": "string value"
            }
        ],
        "totalCadences": 2,
        "type": "string value"
    },
    "cadenceStart": {
        "dayOfMonth": 2,
        "periodOfMonth": "string",
        "weekday": 2
    },
    "cadenceTimeZone": "string value",
    "color": "string value",
    "currentUserAllowedActions": [
        "string value 1",
        "string value 2"
    ],
    "demo": false,
    "dynamicValueType": "string value",
    "end": "string value",
    "id": "string value",
    "inherits": false,
    "isSelfApproveAllowed": false,
    "parentId": "string value",
    "permissions": [
        {
            "grant": {
                "Subtype": 2
            },
            "principalId": "string",
            "principalKind": "string value"
        }
    ],
    "settings": {
        "assignGoalPermissions": "string value",
        "assignMetricPermissions": "string value",
        "goalsPerOwnerLimit": 2,
        "metricsPerGoalLimit": 2,
        "multipleOwners": {
            "disabledForGoals": false,
            "disabledForMetrics": false
        },
        "progressAggregationDisabled": false
    },
    "start": "string value",
    "status": "string value",
    "tags": [
        {
            "createdBy": "string",
            "dateCreated": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "title": "string value"
        }
    ],
    "title": "string value",
    "workflow": {
        "editableKrFields": [
            "string value 1",
            "string value 2"
        ],
        "editableOkrFields": [
            "string value 1",
            "string value 2"
        ],
        "reviewers": 2,
        "target": [
            "string value 1",
            "string value 2"
        ]
    }
}
🔗
get
/sessions/{sessionId}/stats
Gets the stats for a planning session.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
assigneeId
*
stringSpecifies the unique identifier (id) of the of the assignee. It could be a single user unique identifier or a team unique identifier.
expected in query, sample value:
string
tagsstringA comma separated list of tag names/titles to filter by. The filter is inclusive (union). For example specifying tag names as "tag1,tag2" will return all items that have a tag1 or tag2 assigned.
expected in query, sample value:
string
Expected response codes
200planningSessionStatsResponse
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{sessionId}/stats?assigneeId=string&tags=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/v1/sessions/{sessionId}/stats?assigneeId=string&tags=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/v1/sessions/{sessionId}/stats"



requests.get(url, headers = headers)
{
    "badMetricsCount": 2,
    "daysToDeadline": 2,
    "dynamicMetricCount": 2,
    "goalCount": 2,
    "goalsMetCount": 2,
    "goodMetricsCount": 2,
    "lastChange": 2,
    "lastChangeAt": "string value",
    "lastChangePercentage": 2,
    "lastPeriodDelta": 2,
    "lastPeriodDeltaPercentage": 2,
    "manualMetricCount": 2,
    "metricsCount": 2,
    "metricsMetCount": 2,
    "orphanedGoalCount": 2,
    "peopleWithoutGoals": 2,
    "periodName": "string value",
    "progress": 2,
    "report": {
        "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"
    },
    "sessionCount": 2,
    "teamsWithoutGoals": 2,
    "timePassedProgress": 2
}
🔗
get
/sessions/{sessionId}/stats/assignees
Gets the stats for a planning session.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
assigneeIds
*
stringThe IDs of the assignees. Can be either team or user id.
expected in query, sample value:
string
tagsstringA comma separated list of tag names/titles to filter by. The filter is inclusive (union). For example specifying tag names as "tag1,tag2" will return all items that have a tag1 or tag2 assigned.
expected in query, sample value:
string
Expected response codes
200assigneesPlanningSessionStatsResponse
400bad request
403forbidden
404not found
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{sessionId}/stats/assignees?assigneeIds=string&tags=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/v1/sessions/{sessionId}/stats/assignees?assigneeIds=string&tags=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/v1/sessions/{sessionId}/stats/assignees"



requests.get(url, headers = headers)
{
    "assigneeId": "string value",
    "planningSessionStats": {
        "badMetricsCount": 2,
        "daysToDeadline": 2,
        "dynamicMetricCount": 2,
        "goalCount": 2,
        "goalsMetCount": 2,
        "goodMetricsCount": 2,
        "lastChange": 2,
        "lastChangeAt": "string value",
        "lastChangePercentage": 2,
        "lastPeriodDelta": 2,
        "lastPeriodDeltaPercentage": 2,
        "manualMetricCount": 2,
        "metricsCount": 2,
        "metricsMetCount": 2,
        "orphanedGoalCount": 2,
        "peopleWithoutGoals": 2,
        "periodName": "string value",
        "progress": 2,
        "report": {
            "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"
        },
        "sessionCount": 2,
        "teamsWithoutGoals": 2,
        "timePassedProgress": 2
    }
}
🔗
get
/sessions/{sessionId}/stats/badMetrics
Gets the metrics with bad progress (less than 60% of the projected for the current date).
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
tagsstringA comma separated list of tag names/titles to filter by. The filter is inclusive (union). For example specifying tag names as "tag1,tag2" will return all items that have a tag1 or tag2 assigned.
expected in query, sample value:
string
Expected response codes
200metricsResponse
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{sessionId}/stats/badMetrics?tags=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/v1/sessions/{sessionId}/stats/badMetrics?tags=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/v1/sessions/{sessionId}/stats/badMetrics"



requests.get(url, headers = headers)
{
    "items": [
        {
            "actual": 6,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "assignees": [
                {
                    "accountId": "string value",
                    "avatar": "string value",
                    "color": "string value",
                    "dynamicValueType": "string value",
                    "email": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "picture": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "type": "string value"
                }
            ],
            "cascadeType": "absolute_value",
            "critical": 50,
            "description": "My Description",
            "dueDate": "2021-06-30",
            "dynamic": true,
            "fieldName": "count",
            "format": {
                "fractionSize": 2,
                "prefix": "string value",
                "suffix": "string value"
            },
            "goalClosedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "goalDescription": "My Description",
            "goalId": "string value",
            "goalName": "string value",
            "goalOwnerId": "string value",
            "goalOwnerIds": {},
            "initialValue": 2,
            "insightName": "1k42vv2z24",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": {
                                "inherits": false,
                                "permissions": [
                                    "Permission"
                                ]
                            },
                            "accountId": "string value",
                            "aggregatedAttainment": 2,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "childrenAggregatedAttainment": 2,
                            "childrenCount": 2,
                            "closedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "designScore": {
                                "policies": [
                                    "PolicyResultResponse"
                                ],
                                "totalPoints": 2
                            },
                            "duration": 2,
                            "fullAggregatedAttainment": 2,
                            "fullSubTreeCount": 2,
                            "id": "string value",
                            "locked": false,
                            "metricsCount": 2,
                            "modifiedById": "string value",
                            "name": "string value",
                            "nonArchivedTasksCount": 2,
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "orderId": 2,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "subTreeCount": 2,
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "tasksCount": 2,
                            "url": "string value",
                            "watchers": [
                                "string value 1",
                                "string value 2"
                            ],
                            "workflow": {
                                "approvedAt": "string value",
                                "reviewers": "ReviewersResponse",
                                "reviewersNeeded": 2,
                                "status": "string value"
                            }
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "cascadeType": "absolute_value",
                            "critical": 50,
                            "description": "My Description",
                            "dueDate": "2021-06-30",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": {
                                "fractionSize": 2,
                                "prefix": "string value",
                                "suffix": "string value"
                            },
                            "goalClosedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "goalDescription": "My Description",
                            "goalId": "string value",
                            "goalName": "string value",
                            "goalOwnerId": "string value",
                            "goalOwnerIds": {},
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "links": {
                                "expanded": "sessionsGoalsMetricsResponse"
                            },
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": {},
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "settings": [
                                {
                                    "dynamicValues": [
                                        "DashboardDynamicValue"
                                    ],
                                    "name": "string value",
                                    "value": "string value",
                                    "valueDisplayName": "string value"
                                }
                            ],
                            "softDueDate": "2021-06-25",
                            "sourceMetricId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetMetrics": {},
                            "targetOperator": "at_least",
                            "tasksCount": 2,
                            "url": "string value"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "cadence": {
                                "ranges": [
                                    "CadenceRange"
                                ],
                                "totalCadences": 2,
                                "type": "string value"
                            },
                            "cadenceStart": {
                                "dayOfMonth": 2,
                                "periodOfMonth": "MonthPeriod",
                                "weekday": "Weekday"
                            },
                            "cadenceTimeZone": "string value",
                            "color": "string value",
                            "currentUserAllowedActions": [
                                "string value 1",
                                "string value 2"
                            ],
                            "demo": false,
                            "dynamicValueType": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "isSelfApproveAllowed": false,
                            "parentId": "string value",
                            "permissions": [
                                {
                                    "grant": "Binary",
                                    "principalId": "ID",
                                    "principalKind": "string value"
                                }
                            ],
                            "settings": {
                                "assignGoalPermissions": "string value",
                                "assignMetricPermissions": "string value",
                                "goalsPerOwnerLimit": 2,
                                "metricsPerGoalLimit": 2,
                                "multipleOwners": "multipleOwnersSetting",
                                "progressAggregationDisabled": false
                            },
                            "start": "string value",
                            "status": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "title": "string value",
                            "workflow": {
                                "editableKrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "editableOkrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "reviewers": 2,
                                "target": [
                                    "string value 1",
                                    "string value 2"
                                ]
                            }
                        }
                    ]
                }
            },
            "manualType": "double",
            "name": "string value",
            "numberOfOwners": 2,
            "obfuscated": false,
            "ownerId": "string value",
            "ownerIds": {},
            "richTextDescription": "string value",
            "sessionId": "6093fdabd251f200015e8f92",
            "settings": [
                {
                    "dynamicValues": [
                        {
                            "teamId": "string",
                            "type": "string"
                        }
                    ],
                    "name": "string value",
                    "value": "string value",
                    "valueDisplayName": "string value"
                }
            ],
            "softDueDate": "2021-06-25",
            "sourceMetricId": "6093fdabd251f200015e8f92",
            "target": 100,
            "targetMetrics": {},
            "targetOperator": "at_least",
            "tasksCount": 2,
            "url": "string value"
        }
    ],
    "totalCount": 2
}
🔗
get
/sessions/{sessionId}/stats/dynamicMetrics
Gets the dynamic metrics for the specified planning session.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
tagsstringA comma separated list of tag names/titles to filter by. The filter is inclusive (union). For example specifying tag names as "tag1,tag2" will return all items that have a tag1 or tag2 assigned.
expected in query, sample value:
string
Expected response codes
200metricsResponse
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{sessionId}/stats/dynamicMetrics?tags=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/v1/sessions/{sessionId}/stats/dynamicMetrics?tags=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/v1/sessions/{sessionId}/stats/dynamicMetrics"



requests.get(url, headers = headers)
{
    "items": [
        {
            "actual": 6,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "assignees": [
                {
                    "accountId": "string value",
                    "avatar": "string value",
                    "color": "string value",
                    "dynamicValueType": "string value",
                    "email": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "picture": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "type": "string value"
                }
            ],
            "cascadeType": "absolute_value",
            "critical": 50,
            "description": "My Description",
            "dueDate": "2021-06-30",
            "dynamic": true,
            "fieldName": "count",
            "format": {
                "fractionSize": 2,
                "prefix": "string value",
                "suffix": "string value"
            },
            "goalClosedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "goalDescription": "My Description",
            "goalId": "string value",
            "goalName": "string value",
            "goalOwnerId": "string value",
            "goalOwnerIds": {},
            "initialValue": 2,
            "insightName": "1k42vv2z24",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": {
                                "inherits": false,
                                "permissions": [
                                    "Permission"
                                ]
                            },
                            "accountId": "string value",
                            "aggregatedAttainment": 2,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "childrenAggregatedAttainment": 2,
                            "childrenCount": 2,
                            "closedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "designScore": {
                                "policies": [
                                    "PolicyResultResponse"
                                ],
                                "totalPoints": 2
                            },
                            "duration": 2,
                            "fullAggregatedAttainment": 2,
                            "fullSubTreeCount": 2,
                            "id": "string value",
                            "locked": false,
                            "metricsCount": 2,
                            "modifiedById": "string value",
                            "name": "string value",
                            "nonArchivedTasksCount": 2,
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "orderId": 2,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "subTreeCount": 2,
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "tasksCount": 2,
                            "url": "string value",
                            "watchers": [
                                "string value 1",
                                "string value 2"
                            ],
                            "workflow": {
                                "approvedAt": "string value",
                                "reviewers": "ReviewersResponse",
                                "reviewersNeeded": 2,
                                "status": "string value"
                            }
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "cascadeType": "absolute_value",
                            "critical": 50,
                            "description": "My Description",
                            "dueDate": "2021-06-30",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": {
                                "fractionSize": 2,
                                "prefix": "string value",
                                "suffix": "string value"
                            },
                            "goalClosedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "goalDescription": "My Description",
                            "goalId": "string value",
                            "goalName": "string value",
                            "goalOwnerId": "string value",
                            "goalOwnerIds": {},
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "links": {
                                "expanded": "sessionsGoalsMetricsResponse"
                            },
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": {},
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "settings": [
                                {
                                    "dynamicValues": [
                                        "DashboardDynamicValue"
                                    ],
                                    "name": "string value",
                                    "value": "string value",
                                    "valueDisplayName": "string value"
                                }
                            ],
                            "softDueDate": "2021-06-25",
                            "sourceMetricId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetMetrics": {},
                            "targetOperator": "at_least",
                            "tasksCount": 2,
                            "url": "string value"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "cadence": {
                                "ranges": [
                                    "CadenceRange"
                                ],
                                "totalCadences": 2,
                                "type": "string value"
                            },
                            "cadenceStart": {
                                "dayOfMonth": 2,
                                "periodOfMonth": "MonthPeriod",
                                "weekday": "Weekday"
                            },
                            "cadenceTimeZone": "string value",
                            "color": "string value",
                            "currentUserAllowedActions": [
                                "string value 1",
                                "string value 2"
                            ],
                            "demo": false,
                            "dynamicValueType": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "isSelfApproveAllowed": false,
                            "parentId": "string value",
                            "permissions": [
                                {
                                    "grant": "Binary",
                                    "principalId": "ID",
                                    "principalKind": "string value"
                                }
                            ],
                            "settings": {
                                "assignGoalPermissions": "string value",
                                "assignMetricPermissions": "string value",
                                "goalsPerOwnerLimit": 2,
                                "metricsPerGoalLimit": 2,
                                "multipleOwners": "multipleOwnersSetting",
                                "progressAggregationDisabled": false
                            },
                            "start": "string value",
                            "status": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "title": "string value",
                            "workflow": {
                                "editableKrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "editableOkrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "reviewers": 2,
                                "target": [
                                    "string value 1",
                                    "string value 2"
                                ]
                            }
                        }
                    ]
                }
            },
            "manualType": "double",
            "name": "string value",
            "numberOfOwners": 2,
            "obfuscated": false,
            "ownerId": "string value",
            "ownerIds": {},
            "richTextDescription": "string value",
            "sessionId": "6093fdabd251f200015e8f92",
            "settings": [
                {
                    "dynamicValues": [
                        {
                            "teamId": "string",
                            "type": "string"
                        }
                    ],
                    "name": "string value",
                    "value": "string value",
                    "valueDisplayName": "string value"
                }
            ],
            "softDueDate": "2021-06-25",
            "sourceMetricId": "6093fdabd251f200015e8f92",
            "target": 100,
            "targetMetrics": {},
            "targetOperator": "at_least",
            "tasksCount": 2,
            "url": "string value"
        }
    ],
    "totalCount": 2
}
🔗
get
/sessions/{sessionId}/stats/goodMetrics
Gets the metrics with good progress (more than 60% of the projected for the current date).
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
tagsstringA comma separated list of tag names/titles to filter by. The filter is inclusive (union). For example specifying tag names as "tag1,tag2" will return all items that have a tag1 or tag2 assigned.
expected in query, sample value:
string
Expected response codes
200metricsResponse
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{sessionId}/stats/goodMetrics?tags=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/v1/sessions/{sessionId}/stats/goodMetrics?tags=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/v1/sessions/{sessionId}/stats/goodMetrics"



requests.get(url, headers = headers)
{
    "items": [
        {
            "actual": 6,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "assignees": [
                {
                    "accountId": "string value",
                    "avatar": "string value",
                    "color": "string value",
                    "dynamicValueType": "string value",
                    "email": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "picture": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "type": "string value"
                }
            ],
            "cascadeType": "absolute_value",
            "critical": 50,
            "description": "My Description",
            "dueDate": "2021-06-30",
            "dynamic": true,
            "fieldName": "count",
            "format": {
                "fractionSize": 2,
                "prefix": "string value",
                "suffix": "string value"
            },
            "goalClosedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "goalDescription": "My Description",
            "goalId": "string value",
            "goalName": "string value",
            "goalOwnerId": "string value",
            "goalOwnerIds": {},
            "initialValue": 2,
            "insightName": "1k42vv2z24",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": {
                                "inherits": false,
                                "permissions": [
                                    "Permission"
                                ]
                            },
                            "accountId": "string value",
                            "aggregatedAttainment": 2,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "childrenAggregatedAttainment": 2,
                            "childrenCount": 2,
                            "closedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "designScore": {
                                "policies": [
                                    "PolicyResultResponse"
                                ],
                                "totalPoints": 2
                            },
                            "duration": 2,
                            "fullAggregatedAttainment": 2,
                            "fullSubTreeCount": 2,
                            "id": "string value",
                            "locked": false,
                            "metricsCount": 2,
                            "modifiedById": "string value",
                            "name": "string value",
                            "nonArchivedTasksCount": 2,
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "orderId": 2,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "subTreeCount": 2,
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "tasksCount": 2,
                            "url": "string value",
                            "watchers": [
                                "string value 1",
                                "string value 2"
                            ],
                            "workflow": {
                                "approvedAt": "string value",
                                "reviewers": "ReviewersResponse",
                                "reviewersNeeded": 2,
                                "status": "string value"
                            }
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "cascadeType": "absolute_value",
                            "critical": 50,
                            "description": "My Description",
                            "dueDate": "2021-06-30",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": {
                                "fractionSize": 2,
                                "prefix": "string value",
                                "suffix": "string value"
                            },
                            "goalClosedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "goalDescription": "My Description",
                            "goalId": "string value",
                            "goalName": "string value",
                            "goalOwnerId": "string value",
                            "goalOwnerIds": {},
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "links": {
                                "expanded": "sessionsGoalsMetricsResponse"
                            },
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": {},
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "settings": [
                                {
                                    "dynamicValues": [
                                        "DashboardDynamicValue"
                                    ],
                                    "name": "string value",
                                    "value": "string value",
                                    "valueDisplayName": "string value"
                                }
                            ],
                            "softDueDate": "2021-06-25",
                            "sourceMetricId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetMetrics": {},
                            "targetOperator": "at_least",
                            "tasksCount": 2,
                            "url": "string value"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "cadence": {
                                "ranges": [
                                    "CadenceRange"
                                ],
                                "totalCadences": 2,
                                "type": "string value"
                            },
                            "cadenceStart": {
                                "dayOfMonth": 2,
                                "periodOfMonth": "MonthPeriod",
                                "weekday": "Weekday"
                            },
                            "cadenceTimeZone": "string value",
                            "color": "string value",
                            "currentUserAllowedActions": [
                                "string value 1",
                                "string value 2"
                            ],
                            "demo": false,
                            "dynamicValueType": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "isSelfApproveAllowed": false,
                            "parentId": "string value",
                            "permissions": [
                                {
                                    "grant": "Binary",
                                    "principalId": "ID",
                                    "principalKind": "string value"
                                }
                            ],
                            "settings": {
                                "assignGoalPermissions": "string value",
                                "assignMetricPermissions": "string value",
                                "goalsPerOwnerLimit": 2,
                                "metricsPerGoalLimit": 2,
                                "multipleOwners": "multipleOwnersSetting",
                                "progressAggregationDisabled": false
                            },
                            "start": "string value",
                            "status": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "title": "string value",
                            "workflow": {
                                "editableKrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "editableOkrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "reviewers": 2,
                                "target": [
                                    "string value 1",
                                    "string value 2"
                                ]
                            }
                        }
                    ]
                }
            },
            "manualType": "double",
            "name": "string value",
            "numberOfOwners": 2,
            "obfuscated": false,
            "ownerId": "string value",
            "ownerIds": {},
            "richTextDescription": "string value",
            "sessionId": "6093fdabd251f200015e8f92",
            "settings": [
                {
                    "dynamicValues": [
                        {
                            "teamId": "string",
                            "type": "string"
                        }
                    ],
                    "name": "string value",
                    "value": "string value",
                    "valueDisplayName": "string value"
                }
            ],
            "softDueDate": "2021-06-25",
            "sourceMetricId": "6093fdabd251f200015e8f92",
            "target": 100,
            "targetMetrics": {},
            "targetOperator": "at_least",
            "tasksCount": 2,
            "url": "string value"
        }
    ],
    "totalCount": 2
}
🔗
get
/sessions/{sessionId}/stats/manualMetrics
Gets the manual metrics for the specified planning session.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
tagsstringA comma separated list of tag names/titles to filter by. The filter is inclusive (union). For example specifying tag names as "tag1,tag2" will return all items that have a tag1 or tag2 assigned.
expected in query, sample value:
string
Expected response codes
200metricsResponse
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{sessionId}/stats/manualMetrics?tags=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/v1/sessions/{sessionId}/stats/manualMetrics?tags=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/v1/sessions/{sessionId}/stats/manualMetrics"



requests.get(url, headers = headers)
{
    "items": [
        {
            "actual": 6,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "assignees": [
                {
                    "accountId": "string value",
                    "avatar": "string value",
                    "color": "string value",
                    "dynamicValueType": "string value",
                    "email": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "picture": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "type": "string value"
                }
            ],
            "cascadeType": "absolute_value",
            "critical": 50,
            "description": "My Description",
            "dueDate": "2021-06-30",
            "dynamic": true,
            "fieldName": "count",
            "format": {
                "fractionSize": 2,
                "prefix": "string value",
                "suffix": "string value"
            },
            "goalClosedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "goalDescription": "My Description",
            "goalId": "string value",
            "goalName": "string value",
            "goalOwnerId": "string value",
            "goalOwnerIds": {},
            "initialValue": 2,
            "insightName": "1k42vv2z24",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": {
                                "inherits": false,
                                "permissions": [
                                    "Permission"
                                ]
                            },
                            "accountId": "string value",
                            "aggregatedAttainment": 2,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "childrenAggregatedAttainment": 2,
                            "childrenCount": 2,
                            "closedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "designScore": {
                                "policies": [
                                    "PolicyResultResponse"
                                ],
                                "totalPoints": 2
                            },
                            "duration": 2,
                            "fullAggregatedAttainment": 2,
                            "fullSubTreeCount": 2,
                            "id": "string value",
                            "locked": false,
                            "metricsCount": 2,
                            "modifiedById": "string value",
                            "name": "string value",
                            "nonArchivedTasksCount": 2,
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "orderId": 2,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "subTreeCount": 2,
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "tasksCount": 2,
                            "url": "string value",
                            "watchers": [
                                "string value 1",
                                "string value 2"
                            ],
                            "workflow": {
                                "approvedAt": "string value",
                                "reviewers": "ReviewersResponse",
                                "reviewersNeeded": 2,
                                "status": "string value"
                            }
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "cascadeType": "absolute_value",
                            "critical": 50,
                            "description": "My Description",
                            "dueDate": "2021-06-30",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": {
                                "fractionSize": 2,
                                "prefix": "string value",
                                "suffix": "string value"
                            },
                            "goalClosedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "goalDescription": "My Description",
                            "goalId": "string value",
                            "goalName": "string value",
                            "goalOwnerId": "string value",
                            "goalOwnerIds": {},
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "links": {
                                "expanded": "sessionsGoalsMetricsResponse"
                            },
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": {},
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "settings": [
                                {
                                    "dynamicValues": [
                                        "DashboardDynamicValue"
                                    ],
                                    "name": "string value",
                                    "value": "string value",
                                    "valueDisplayName": "string value"
                                }
                            ],
                            "softDueDate": "2021-06-25",
                            "sourceMetricId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetMetrics": {},
                            "targetOperator": "at_least",
                            "tasksCount": 2,
                            "url": "string value"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "cadence": {
                                "ranges": [
                                    "CadenceRange"
                                ],
                                "totalCadences": 2,
                                "type": "string value"
                            },
                            "cadenceStart": {
                                "dayOfMonth": 2,
                                "periodOfMonth": "MonthPeriod",
                                "weekday": "Weekday"
                            },
                            "cadenceTimeZone": "string value",
                            "color": "string value",
                            "currentUserAllowedActions": [
                                "string value 1",
                                "string value 2"
                            ],
                            "demo": false,
                            "dynamicValueType": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "isSelfApproveAllowed": false,
                            "parentId": "string value",
                            "permissions": [
                                {
                                    "grant": "Binary",
                                    "principalId": "ID",
                                    "principalKind": "string value"
                                }
                            ],
                            "settings": {
                                "assignGoalPermissions": "string value",
                                "assignMetricPermissions": "string value",
                                "goalsPerOwnerLimit": 2,
                                "metricsPerGoalLimit": 2,
                                "multipleOwners": "multipleOwnersSetting",
                                "progressAggregationDisabled": false
                            },
                            "start": "string value",
                            "status": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "title": "string value",
                            "workflow": {
                                "editableKrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "editableOkrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "reviewers": 2,
                                "target": [
                                    "string value 1",
                                    "string value 2"
                                ]
                            }
                        }
                    ]
                }
            },
            "manualType": "double",
            "name": "string value",
            "numberOfOwners": 2,
            "obfuscated": false,
            "ownerId": "string value",
            "ownerIds": {},
            "richTextDescription": "string value",
            "sessionId": "6093fdabd251f200015e8f92",
            "settings": [
                {
                    "dynamicValues": [
                        {
                            "teamId": "string",
                            "type": "string"
                        }
                    ],
                    "name": "string value",
                    "value": "string value",
                    "valueDisplayName": "string value"
                }
            ],
            "softDueDate": "2021-06-25",
            "sourceMetricId": "6093fdabd251f200015e8f92",
            "target": 100,
            "targetMetrics": {},
            "targetOperator": "at_least",
            "tasksCount": 2,
            "url": "string value"
        }
    ],
    "totalCount": 2
}
🔗
get
/sessions/{sessionId}/stats/metricsMet
Gets the metrics which target values have been reached in the specified planning session.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
tagsstringA comma separated list of tag names/titles to filter by. The filter is inclusive (union). For example specifying tag names as "tag1,tag2" will return all items that have a tag1 or tag2 assigned.
expected in query, sample value:
string
Expected response codes
200metricsResponse
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/sessions/{sessionId}/stats/metricsMet?tags=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/v1/sessions/{sessionId}/stats/metricsMet?tags=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/v1/sessions/{sessionId}/stats/metricsMet"



requests.get(url, headers = headers)
{
    "items": [
        {
            "actual": 6,
            "assignee": {
                "accountId": "string value",
                "avatar": "string value",
                "color": "string value",
                "dynamicValueType": "string value",
                "email": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "picture": "string value",
                "tags": [
                    {
                        "createdBy": "string",
                        "dateCreated": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "title": "string value"
                    }
                ],
                "type": "string value"
            },
            "assignees": [
                {
                    "accountId": "string value",
                    "avatar": "string value",
                    "color": "string value",
                    "dynamicValueType": "string value",
                    "email": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "picture": "string value",
                    "tags": [
                        {
                            "createdBy": "string",
                            "dateCreated": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "title": "string value"
                        }
                    ],
                    "type": "string value"
                }
            ],
            "cascadeType": "absolute_value",
            "critical": 50,
            "description": "My Description",
            "dueDate": "2021-06-30",
            "dynamic": true,
            "fieldName": "count",
            "format": {
                "fractionSize": 2,
                "prefix": "string value",
                "suffix": "string value"
            },
            "goalClosedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "goalDescription": "My Description",
            "goalId": "string value",
            "goalName": "string value",
            "goalOwnerId": "string value",
            "goalOwnerIds": {},
            "initialValue": 2,
            "insightName": "1k42vv2z24",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": {
                                "inherits": false,
                                "permissions": [
                                    "Permission"
                                ]
                            },
                            "accountId": "string value",
                            "aggregatedAttainment": 2,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "childrenAggregatedAttainment": 2,
                            "childrenCount": 2,
                            "closedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "designScore": {
                                "policies": [
                                    "PolicyResultResponse"
                                ],
                                "totalPoints": 2
                            },
                            "duration": 2,
                            "fullAggregatedAttainment": 2,
                            "fullSubTreeCount": 2,
                            "id": "string value",
                            "locked": false,
                            "metricsCount": 2,
                            "modifiedById": "string value",
                            "name": "string value",
                            "nonArchivedTasksCount": 2,
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "orderId": 2,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "subTreeCount": 2,
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "tasksCount": 2,
                            "url": "string value",
                            "watchers": [
                                "string value 1",
                                "string value 2"
                            ],
                            "workflow": {
                                "approvedAt": "string value",
                                "reviewers": "ReviewersResponse",
                                "reviewersNeeded": 2,
                                "status": "string value"
                            }
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "assignee": {
                                "accountId": "string value",
                                "avatar": "string value",
                                "color": "string value",
                                "dynamicValueType": "string value",
                                "email": "string value",
                                "id": "string value",
                                "isActive": false,
                                "name": "string value",
                                "picture": "string value",
                                "tags": [
                                    "tagResponse"
                                ],
                                "type": "string value"
                            },
                            "assignees": [
                                {
                                    "accountId": "string value",
                                    "avatar": "string value",
                                    "color": "string value",
                                    "dynamicValueType": "string value",
                                    "email": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "picture": "string value",
                                    "tags": [
                                        "tagResponse"
                                    ],
                                    "type": "string value"
                                }
                            ],
                            "cascadeType": "absolute_value",
                            "critical": 50,
                            "description": "My Description",
                            "dueDate": "2021-06-30",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": {
                                "fractionSize": 2,
                                "prefix": "string value",
                                "suffix": "string value"
                            },
                            "goalClosedStatus": {
                                "reason": "string value",
                                "status": "string value"
                            },
                            "goalDescription": "My Description",
                            "goalId": "string value",
                            "goalName": "string value",
                            "goalOwnerId": "string value",
                            "goalOwnerIds": {},
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "links": {
                                "expanded": "sessionsGoalsMetricsResponse"
                            },
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": {},
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "settings": [
                                {
                                    "dynamicValues": [
                                        "DashboardDynamicValue"
                                    ],
                                    "name": "string value",
                                    "value": "string value",
                                    "valueDisplayName": "string value"
                                }
                            ],
                            "softDueDate": "2021-06-25",
                            "sourceMetricId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetMetrics": {},
                            "targetOperator": "at_least",
                            "tasksCount": 2,
                            "url": "string value"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "cadence": {
                                "ranges": [
                                    "CadenceRange"
                                ],
                                "totalCadences": 2,
                                "type": "string value"
                            },
                            "cadenceStart": {
                                "dayOfMonth": 2,
                                "periodOfMonth": "MonthPeriod",
                                "weekday": "Weekday"
                            },
                            "cadenceTimeZone": "string value",
                            "color": "string value",
                            "currentUserAllowedActions": [
                                "string value 1",
                                "string value 2"
                            ],
                            "demo": false,
                            "dynamicValueType": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "isSelfApproveAllowed": false,
                            "parentId": "string value",
                            "permissions": [
                                {
                                    "grant": "Binary",
                                    "principalId": "ID",
                                    "principalKind": "string value"
                                }
                            ],
                            "settings": {
                                "assignGoalPermissions": "string value",
                                "assignMetricPermissions": "string value",
                                "goalsPerOwnerLimit": 2,
                                "metricsPerGoalLimit": 2,
                                "multipleOwners": "multipleOwnersSetting",
                                "progressAggregationDisabled": false
                            },
                            "start": "string value",
                            "status": "string value",
                            "tags": [
                                {
                                    "createdBy": "ID",
                                    "dateCreated": "string value",
                                    "id": "string value",
                                    "isActive": false,
                                    "name": "string value",
                                    "title": "string value"
                                }
                            ],
                            "title": "string value",
                            "workflow": {
                                "editableKrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "editableOkrFields": [
                                    "string value 1",
                                    "string value 2"
                                ],
                                "reviewers": 2,
                                "target": [
                                    "string value 1",
                                    "string value 2"
                                ]
                            }
                        }
                    ]
                }
            },
            "manualType": "double",
            "name": "string value",
            "numberOfOwners": 2,
            "obfuscated": false,
            "ownerId": "string value",
            "ownerIds": {},
            "richTextDescription": "string value",
            "sessionId": "6093fdabd251f200015e8f92",
            "settings": [
                {
                    "dynamicValues": [
                        {
                            "teamId": "string",
                            "type": "string"
                        }
                    ],
                    "name": "string value",
                    "value": "string value",
                    "valueDisplayName": "string value"
                }
            ],
            "softDueDate": "2021-06-25",
            "sourceMetricId": "6093fdabd251f200015e8f92",
            "target": 100,
            "targetMetrics": {},
            "targetOperator": "at_least",
            "tasksCount": 2,
            "url": "string value"
        }
    ],
    "totalCount": 2
}
🔗
post
/sessions
Creates a session in the current Gtmhub account.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringSpecifies additional parameters in the request header.
expected in header
planningSession
*
object
expected in body, sample value:
{
    "cadenceStart": {
        "dayOfMonth": 2,
        "periodOfMonth": "string",
        "weekday": 2
    },
    "cadenceTimeZone": "Europe/Sofia",
    "cadenceType": "WEEKLY",
    "color": "#C9DBD7",
    "end": "2021-06-12T00:00:00Z",
    "isSelfApproveAllowed": false,
    "parentId": "6065c702b97d1200017306b1",
    "settings": {
        "assignGoalPermissions": "string value",
        "assignMetricPermissions": "string value",
        "goalsPerOwnerLimit": 2,
        "metricsPerGoalLimit": 2,
        "multipleOwners": {
            "disabledForGoals": false,
            "disabledForMetrics": false
        },
        "progressAggregationDisabled": false
    },
    "start": "2021-04-12T00:00:00Z",
    "status": "open",
    "title": "My new title"
}
Expected response codes
201planningSessionResponse
401unauthorized

curl -X POST 'https://app.gtmhub.com/api/v1/sessions' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \
-d '{"cadenceStart":{"dayOfMonth":2,"periodOfMonth":"string","weekday":2},"cadenceTimeZone":"Europe/Sofia","cadenceType":"WEEKLY","color":"#C9DBD7","end":"2021-06-12T00:00:00Z","isSelfApproveAllowed":false,"parentId":"6065c702b97d1200017306b1","settings":{"assignGoalPermissions":"string value","assignMetricPermissions":"string value","goalsPerOwnerLimit":2,"metricsPerGoalLimit":2,"multipleOwners":{"disabledForGoals":false,"disabledForMetrics":false},"progressAggregationDisabled":false},"start":"2021-04-12T00:00:00Z","status":"open","title":"My new title"}'

var body ={ "cadenceStart": { "dayOfMonth": 2, "periodOfMonth": "string", "weekday": 2 }, "cadenceTimeZone": "Europe/Sofia", "cadenceType": "WEEKLY", "color": "#C9DBD7", "end": "2021-06-12T00:00:00Z", "isSelfApproveAllowed": false, "parentId": "6065c702b97d1200017306b1", "settings": { "assignGoalPermissions": "string value", "assignMetricPermissions": "string value", "goalsPerOwnerLimit": 2, "metricsPerGoalLimit": 2, "multipleOwners": { "disabledForGoals": false, "disabledForMetrics": false }, "progressAggregationDisabled": false }, "start": "2021-04-12T00:00:00Z", "status": "open", "title": "My new title" };

var settings = { "url": "https://app.gtmhub.com/api/v1/sessions", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
},
"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/sessions"

body = { "cadenceStart": { "dayOfMonth": 2, "periodOfMonth": "string", "weekday": 2 }, "cadenceTimeZone": "Europe/Sofia", "cadenceType": "WEEKLY", "color": "#C9DBD7", "end": "2021-06-12T00:00:00Z", "isSelfApproveAllowed": false, "parentId": "6065c702b97d1200017306b1", "settings": { "assignGoalPermissions": "string value", "assignMetricPermissions": "string value", "goalsPerOwnerLimit": 2, "metricsPerGoalLimit": 2, "multipleOwners": { "disabledForGoals": false, "disabledForMetrics": false }, "progressAggregationDisabled": false }, "start": "2021-04-12T00:00:00Z", "status": "open", "title": "My new title" };

requests.post(url, data=json.dumps(body), headers = headers)
{
    "accountId": "string value",
    "cadence": {
        "ranges": [
            {
                "cadenceOrder": 2,
                "end": "string value",
                "start": "string value"
            }
        ],
        "totalCadences": 2,
        "type": "string value"
    },
    "cadenceStart": {
        "dayOfMonth": 2,
        "periodOfMonth": "string",
        "weekday": 2
    },
    "cadenceTimeZone": "string value",
    "color": "string value",
    "currentUserAllowedActions": [
        "string value 1",
        "string value 2"
    ],
    "demo": false,
    "dynamicValueType": "string value",
    "end": "string value",
    "id": "string value",
    "inherits": false,
    "isSelfApproveAllowed": false,
    "parentId": "string value",
    "permissions": [
        {
            "grant": {
                "Subtype": 2
            },
            "principalId": "string",
            "principalKind": "string value"
        }
    ],
    "settings": {
        "assignGoalPermissions": "string value",
        "assignMetricPermissions": "string value",
        "goalsPerOwnerLimit": 2,
        "metricsPerGoalLimit": 2,
        "multipleOwners": {
            "disabledForGoals": false,
            "disabledForMetrics": false
        },
        "progressAggregationDisabled": false
    },
    "start": "string value",
    "status": "string value",
    "tags": [
        {
            "createdBy": "string",
            "dateCreated": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "title": "string value"
        }
    ],
    "title": "string value",
    "workflow": {
        "editableKrFields": [
            "string value 1",
            "string value 2"
        ],
        "editableOkrFields": [
            "string value 1",
            "string value 2"
        ],
        "reviewers": 2,
        "target": [
            "string value 1",
            "string value 2"
        ]
    }
}
🔗
put
/sessions/{sessionId}
Updates an existing session.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
gtmhub-additional-paramsstringSpecifies additional parameters in the request header.
expected in header
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
planningSession
*
object
expected in body, sample value:
{
    "cadenceStart": {
        "dayOfMonth": 2,
        "periodOfMonth": "string",
        "weekday": 2
    },
    "cadenceTimeZone": "Europe/Sofia",
    "cadenceType": "WEEKLY",
    "color": "#C9DBD7",
    "end": "2021-06-12T00:00:00Z",
    "isSelfApproveAllowed": false,
    "parentId": "6065c702b97d1200017306b1",
    "settings": {
        "assignGoalPermissions": "string value",
        "assignMetricPermissions": "string value",
        "goalsPerOwnerLimit": 2,
        "metricsPerGoalLimit": 2,
        "multipleOwners": {
            "disabledForGoals": false,
            "disabledForMetrics": false
        },
        "progressAggregationDisabled": false
    },
    "start": "2021-04-12T00:00:00Z",
    "status": "open",
    "title": "My new title"
}
Expected response codes
200planningSessionResponse
401unauthorized

curl -X PUT 'https://app.gtmhub.com/api/v1/sessions/{sessionId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-H 'gtmhub-additional-params: ' \
-d '{"cadenceStart":{"dayOfMonth":2,"periodOfMonth":"string","weekday":2},"cadenceTimeZone":"Europe/Sofia","cadenceType":"WEEKLY","color":"#C9DBD7","end":"2021-06-12T00:00:00Z","isSelfApproveAllowed":false,"parentId":"6065c702b97d1200017306b1","settings":{"assignGoalPermissions":"string value","assignMetricPermissions":"string value","goalsPerOwnerLimit":2,"metricsPerGoalLimit":2,"multipleOwners":{"disabledForGoals":false,"disabledForMetrics":false},"progressAggregationDisabled":false},"start":"2021-04-12T00:00:00Z","status":"open","title":"My new title"}'

var body ={ "cadenceStart": { "dayOfMonth": 2, "periodOfMonth": "string", "weekday": 2 }, "cadenceTimeZone": "Europe/Sofia", "cadenceType": "WEEKLY", "color": "#C9DBD7", "end": "2021-06-12T00:00:00Z", "isSelfApproveAllowed": false, "parentId": "6065c702b97d1200017306b1", "settings": { "assignGoalPermissions": "string value", "assignMetricPermissions": "string value", "goalsPerOwnerLimit": 2, "metricsPerGoalLimit": 2, "multipleOwners": { "disabledForGoals": false, "disabledForMetrics": false }, "progressAggregationDisabled": false }, "start": "2021-04-12T00:00:00Z", "status": "open", "title": "My new title" };

var settings = { "url": "https://app.gtmhub.com/api/v1/sessions/{sessionId}", "method": "PUT", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
"gtmhub-additional-params": "",
},
"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/sessions/{sessionId}"

body = { "cadenceStart": { "dayOfMonth": 2, "periodOfMonth": "string", "weekday": 2 }, "cadenceTimeZone": "Europe/Sofia", "cadenceType": "WEEKLY", "color": "#C9DBD7", "end": "2021-06-12T00:00:00Z", "isSelfApproveAllowed": false, "parentId": "6065c702b97d1200017306b1", "settings": { "assignGoalPermissions": "string value", "assignMetricPermissions": "string value", "goalsPerOwnerLimit": 2, "metricsPerGoalLimit": 2, "multipleOwners": { "disabledForGoals": false, "disabledForMetrics": false }, "progressAggregationDisabled": false }, "start": "2021-04-12T00:00:00Z", "status": "open", "title": "My new title" };

requests.put(url, data=json.dumps(body), headers = headers)
{
    "accountId": "string value",
    "cadence": {
        "ranges": [
            {
                "cadenceOrder": 2,
                "end": "string value",
                "start": "string value"
            }
        ],
        "totalCadences": 2,
        "type": "string value"
    },
    "cadenceStart": {
        "dayOfMonth": 2,
        "periodOfMonth": "string",
        "weekday": 2
    },
    "cadenceTimeZone": "string value",
    "color": "string value",
    "currentUserAllowedActions": [
        "string value 1",
        "string value 2"
    ],
    "demo": false,
    "dynamicValueType": "string value",
    "end": "string value",
    "id": "string value",
    "inherits": false,
    "isSelfApproveAllowed": false,
    "parentId": "string value",
    "permissions": [
        {
            "grant": {
                "Subtype": 2
            },
            "principalId": "string",
            "principalKind": "string value"
        }
    ],
    "settings": {
        "assignGoalPermissions": "string value",
        "assignMetricPermissions": "string value",
        "goalsPerOwnerLimit": 2,
        "metricsPerGoalLimit": 2,
        "multipleOwners": {
            "disabledForGoals": false,
            "disabledForMetrics": false
        },
        "progressAggregationDisabled": false
    },
    "start": "string value",
    "status": "string value",
    "tags": [
        {
            "createdBy": "string",
            "dateCreated": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "title": "string value"
        }
    ],
    "title": "string value",
    "workflow": {
        "editableKrFields": [
            "string value 1",
            "string value 2"
        ],
        "editableOkrFields": [
            "string value 1",
            "string value 2"
        ],
        "reviewers": 2,
        "target": [
            "string value 1",
            "string value 2"
        ]
    }
}
🔗
delete
/sessions/{sessionId}
Deletes a session by its unique identifier (id).
No request object required.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
sessionId
*
stringSpecifies the unique identifier (id) of the session.
expected in path
Expected response codes
401unauthorized

curl -X DELETE 'https://app.gtmhub.com/api/v1/sessions/{sessionId}' \ -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/sessions/{sessionId}", "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/sessions/{sessionId}"



requests.delete(url, headers = headers)