Key Results endpoints

In the Gtmhub REST API Metrics is the programmatic name of Key Results. All endpoints listed in this section enable you to perform CRUD operations with Key Results.

🔗
get
/metrics
Gets all metrics in the current Gtmhub account.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
fieldsstringList of fields to be retrieved, separated by comas (,).
expected in query, sample value:
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

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

var settings = { "url": "https://app.gtmhub.com/api/v2/metrics?fields=name,description&sort=-name,dateCreated&filter={name: {$in: ["sales", "marketing"]}}&skip=5&limit=10&formatting=plainText", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v2/metrics"



requests.get(url, headers = headers)
🔗
get
/metrics/checkin/{checkinId}
Gets a metric update (check-in) by checkin identifier (id).
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
checkinId
*
stringThe metric checkin identifier (id) / snapshot identifier (id).
expected in path
Expected response codes
200metricDto
401unauthorized

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



requests.get(url, headers = headers)
{
    "actual": 6,
    "assignee": {
        "accountId": "string value",
        "avatar": "string value",
        "color": "string value",
        "dynamicValueType": "string value",
        "email": "string value",
        "id": "string value",
        "isActive": false,
        "name": "string value",
        "picture": "string value",
        "tags": [
            {
                "createdBy": "string",
                "dateCreated": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "title": "string value"
            }
        ],
        "type": "string value"
    },
    "assignees": [
        {
            "accountId": "string value",
            "avatar": "string value",
            "color": "string value",
            "dynamicValueType": "string value",
            "email": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "picture": "string value",
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "type": "string value"
        }
    ],
    "cascadeType": "absolute_value",
    "critical": 50,
    "description": "My Description",
    "dueDate": "2021-06-30",
    "dynamic": true,
    "fieldName": "count",
    "format": {
        "ID": "string",
        "fractionSize": 2,
        "prefix": "string value",
        "suffix": "string value"
    },
    "goalClosedStatus": {
        "reason": "string value",
        "status": "string value"
    },
    "goalDescription": "My Description",
    "goalId": "string value",
    "goalName": "string value",
    "goalOwnerId": "6093fdabd251f200015e8f92",
    "goalOwnerIds": {},
    "initialValue": 2,
    "insightName": "1k42vv2z24",
    "links": {
        "expanded": {
            "goals": [
                {
                    "access": {
                        "inherits": false,
                        "permissions": [
                            "Permission"
                        ]
                    },
                    "accountId": "string value",
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            "tagResponse"
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                "tagResponse"
                            ],
                            "type": "string value"
                        }
                    ],
                    "attainment": 2,
                    "attainmentTypeString": "string value",
                    "createdById": "string value",
                    "dateCreated": "string value",
                    "dateFrom": "string value",
                    "dateTo": "string value",
                    "description": "string value",
                    "id": "string value",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": [
                        "string value 1",
                        "string value 2"
                    ],
                    "parentGoalSessionId": "string value",
                    "parentId": "string value",
                    "parentType": "string value",
                    "private": false,
                    "richTextDescription": "string value",
                    "sessionId": "string value",
                    "url": "string value"
                }
            ],
            "metrics": [
                {
                    "actual": 6,
                    "cascadeType": "absolute_value",
                    "description": "My Description",
                    "dynamic": true,
                    "fieldName": "count",
                    "format": {
                        "ID": "ID",
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalId": "string value",
                    "goalName": "string value",
                    "initialValue": 2,
                    "insightName": "1k42vv2z24",
                    "manualType": "double",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": {},
                    "richTextDescription": "string value",
                    "sessionId": "6093fdabd251f200015e8f92",
                    "target": 100,
                    "targetOperator": "at_least"
                }
            ],
            "sessions": [
                {
                    "accountId": "string value",
                    "end": "string value",
                    "id": "string value",
                    "inherits": false,
                    "parentId": "string value",
                    "permissions": [
                        {
                            "deny": "Binary",
                            "grant": "Binary",
                            "principalId": "ObjectId",
                            "principalKind": "string value"
                        }
                    ],
                    "start": "string value",
                    "status": "string value",
                    "title": "string value"
                }
            ]
        }
    },
    "manualType": "double",
    "name": "string value",
    "numberOfOwners": 2,
    "obfuscated": false,
    "ownerId": "6093fdabd251f200015e8f92",
    "ownerIds": {},
    "richTextDescription": "string value",
    "sessionId": "6093fdabd251f200015e8f92",
    "settings": [
        {
            "dynamicValues": [
                {
                    "teamId": "string",
                    "type": "string"
                }
            ],
            "name": "string value",
            "value": "string value",
            "valueDisplayName": "string value"
        }
    ],
    "softDueDate": "2021-06-25",
    "sourceMetricId": "6093fdabd251f200015e8f92",
    "target": 100,
    "targetMetrics": {},
    "targetOperator": "at_least",
    "tasksCount": 2,
    "url": "string value"
}
DEPRECATED
🔗
get
/metrics/owner/{ownerId}
Gets metrics (key results) by a specified owner identifier (id).
This method is deprecated. Use GET Key Results with ownerIds filter instead.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
ownerId
*
stringThe unique identifier of the owner (id).
expected in path
formattingstringThe formatting used for the description and custom fields of type text area. By default returned as 'mentionsMarkup' (Ex: "@[Mariya Velikova:[email protected]:602a65efc05575000123291b]"). Use 'plainText' if you need the response to be returned without markdown and special markup (Ex: "@Mariya Velikova").
expected in query, sample value:
string
Expected response codes
200metricsResponse
401unauthorized

curl -X GET 'https://app.gtmhub.com/api/v1/metrics/owner/{ownerId}?formatting=string' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v1/metrics/owner/{ownerId}?formatting=string", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/metrics/owner/{ownerId}"



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": {
                "ID": "string",
                "fractionSize": 2,
                "prefix": "string value",
                "suffix": "string value"
            },
            "goalClosedStatus": {
                "reason": "string value",
                "status": "string value"
            },
            "goalDescription": "My Description",
            "goalId": "string value",
            "goalName": "string value",
            "goalOwnerId": "6093fdabd251f200015e8f92",
            "goalOwnerIds": {},
            "initialValue": 2,
            "insightName": "1k42vv2z24",
            "links": {
                "expanded": {
                    "goals": [
                        {
                            "access": "defaultAccess",
                            "accountId": "string value",
                            "assignee": "assigneeResponse",
                            "assignees": [
                                "assigneeResponse"
                            ],
                            "attainment": 2,
                            "attainmentTypeString": "string value",
                            "createdById": "string value",
                            "dateCreated": "string value",
                            "dateFrom": "string value",
                            "dateTo": "string value",
                            "description": "string value",
                            "id": "string value",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": [
                                "string value 1",
                                "string value 2"
                            ],
                            "parentGoalSessionId": "string value",
                            "parentId": "string value",
                            "parentType": "string value",
                            "private": false,
                            "richTextDescription": "string value",
                            "sessionId": "string value",
                            "url": "string value"
                        }
                    ],
                    "metrics": [
                        {
                            "actual": 6,
                            "cascadeType": "absolute_value",
                            "description": "My Description",
                            "dynamic": true,
                            "fieldName": "count",
                            "format": "MetricFormat",
                            "goalId": "string value",
                            "goalName": "string value",
                            "initialValue": 2,
                            "insightName": "1k42vv2z24",
                            "manualType": "double",
                            "name": "string value",
                            "numberOfOwners": 2,
                            "obfuscated": false,
                            "ownerId": "string value",
                            "ownerIds": "Ids",
                            "richTextDescription": "string value",
                            "sessionId": "6093fdabd251f200015e8f92",
                            "target": 100,
                            "targetOperator": "at_least"
                        }
                    ],
                    "sessions": [
                        {
                            "accountId": "string value",
                            "end": "string value",
                            "id": "string value",
                            "inherits": false,
                            "parentId": "string value",
                            "permissions": [
                                "Permission"
                            ],
                            "start": "string value",
                            "status": "string value",
                            "title": "string value"
                        }
                    ]
                }
            },
            "manualType": "double",
            "name": "string value",
            "numberOfOwners": 2,
            "obfuscated": false,
            "ownerId": "6093fdabd251f200015e8f92",
            "ownerIds": {},
            "richTextDescription": "string value",
            "sessionId": "6093fdabd251f200015e8f92",
            "settings": [
                {
                    "dynamicValues": [
                        {
                            "teamId": "string",
                            "type": "string"
                        }
                    ],
                    "name": "string value",
                    "value": "string value",
                    "valueDisplayName": "string value"
                }
            ],
            "softDueDate": "2021-06-25",
            "sourceMetricId": "6093fdabd251f200015e8f92",
            "target": 100,
            "targetMetrics": {},
            "targetOperator": "at_least",
            "tasksCount": 2,
            "url": "string value"
        }
    ],
    "totalCount": 2
}
🔗
get
/metrics/{metricId}
Gets a metric (key result) by its unique identifier (id).
If the specified unique identifier is invalid, a 400 Bad Request Error occurs.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
metricId
*
stringThe unique identifier (id) of the metric.
expected in path
formattingstringThe formatting used for the description and custom fields of type text area. By default returned as 'mentionsMarkup' (Ex: "@[Mariya Velikova:[email protected]:602a65efc05575000123291b]"). Use 'plainText' if you need the response to be returned without markdown and special markup (Ex: "@Mariya Velikova").
expected in query, sample value:
string
Expected response codes
200metricDto
401unauthorized

curl -X GET 'https://app.gtmhub.com/api/v1/metrics/{metricId}?formatting=string' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \

var settings = { "url": "https://app.gtmhub.com/api/v1/metrics/{metricId}?formatting=string", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/metrics/{metricId}"



requests.get(url, headers = headers)
{
    "actual": 6,
    "assignee": {
        "accountId": "string value",
        "avatar": "string value",
        "color": "string value",
        "dynamicValueType": "string value",
        "email": "string value",
        "id": "string value",
        "isActive": false,
        "name": "string value",
        "picture": "string value",
        "tags": [
            {
                "createdBy": "string",
                "dateCreated": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "title": "string value"
            }
        ],
        "type": "string value"
    },
    "assignees": [
        {
            "accountId": "string value",
            "avatar": "string value",
            "color": "string value",
            "dynamicValueType": "string value",
            "email": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "picture": "string value",
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "type": "string value"
        }
    ],
    "cascadeType": "absolute_value",
    "critical": 50,
    "description": "My Description",
    "dueDate": "2021-06-30",
    "dynamic": true,
    "fieldName": "count",
    "format": {
        "ID": "string",
        "fractionSize": 2,
        "prefix": "string value",
        "suffix": "string value"
    },
    "goalClosedStatus": {
        "reason": "string value",
        "status": "string value"
    },
    "goalDescription": "My Description",
    "goalId": "string value",
    "goalName": "string value",
    "goalOwnerId": "6093fdabd251f200015e8f92",
    "goalOwnerIds": {},
    "initialValue": 2,
    "insightName": "1k42vv2z24",
    "links": {
        "expanded": {
            "goals": [
                {
                    "access": {
                        "inherits": false,
                        "permissions": [
                            "Permission"
                        ]
                    },
                    "accountId": "string value",
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            "tagResponse"
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                "tagResponse"
                            ],
                            "type": "string value"
                        }
                    ],
                    "attainment": 2,
                    "attainmentTypeString": "string value",
                    "createdById": "string value",
                    "dateCreated": "string value",
                    "dateFrom": "string value",
                    "dateTo": "string value",
                    "description": "string value",
                    "id": "string value",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": [
                        "string value 1",
                        "string value 2"
                    ],
                    "parentGoalSessionId": "string value",
                    "parentId": "string value",
                    "parentType": "string value",
                    "private": false,
                    "richTextDescription": "string value",
                    "sessionId": "string value",
                    "url": "string value"
                }
            ],
            "metrics": [
                {
                    "actual": 6,
                    "cascadeType": "absolute_value",
                    "description": "My Description",
                    "dynamic": true,
                    "fieldName": "count",
                    "format": {
                        "ID": "ID",
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalId": "string value",
                    "goalName": "string value",
                    "initialValue": 2,
                    "insightName": "1k42vv2z24",
                    "manualType": "double",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": {},
                    "richTextDescription": "string value",
                    "sessionId": "6093fdabd251f200015e8f92",
                    "target": 100,
                    "targetOperator": "at_least"
                }
            ],
            "sessions": [
                {
                    "accountId": "string value",
                    "end": "string value",
                    "id": "string value",
                    "inherits": false,
                    "parentId": "string value",
                    "permissions": [
                        {
                            "deny": "Binary",
                            "grant": "Binary",
                            "principalId": "ObjectId",
                            "principalKind": "string value"
                        }
                    ],
                    "start": "string value",
                    "status": "string value",
                    "title": "string value"
                }
            ]
        }
    },
    "manualType": "double",
    "name": "string value",
    "numberOfOwners": 2,
    "obfuscated": false,
    "ownerId": "6093fdabd251f200015e8f92",
    "ownerIds": {},
    "richTextDescription": "string value",
    "sessionId": "6093fdabd251f200015e8f92",
    "settings": [
        {
            "dynamicValues": [
                {
                    "teamId": "string",
                    "type": "string"
                }
            ],
            "name": "string value",
            "value": "string value",
            "valueDisplayName": "string value"
        }
    ],
    "softDueDate": "2021-06-25",
    "sourceMetricId": "6093fdabd251f200015e8f92",
    "target": 100,
    "targetMetrics": {},
    "targetOperator": "at_least",
    "tasksCount": 2,
    "url": "string value"
}
🔗
post
/metrics
Creates a new metric (key result) and attaches it to a goal.
If the metric is attached to a goal that belongs to a closed session, a 400 Bad Request Error occurs.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
metric
*
objectThe object representing the metric to be created.
expected in body, sample value:
{
    "actual": 6,
    "assignee": {
        "accountId": "string value",
        "avatar": "string value",
        "color": "string value",
        "dynamicValueType": "string value",
        "email": "string value",
        "id": "string value",
        "isActive": false,
        "name": "string value",
        "picture": "string value",
        "tags": [
            {
                "createdBy": "string",
                "dateCreated": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "title": "string value"
            }
        ],
        "type": "string value"
    },
    "assignees": [
        {
            "accountId": "string value",
            "avatar": "string value",
            "color": "string value",
            "dynamicValueType": "string value",
            "email": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "picture": "string value",
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "type": "string value"
        }
    ],
    "cascadeType": "absolute_value",
    "critical": 50,
    "description": "My Description",
    "dueDate": "2021-06-30",
    "dynamic": true,
    "fieldName": "count",
    "format": {
        "ID": "string",
        "fractionSize": 2,
        "prefix": "string value",
        "suffix": "string value"
    },
    "goalClosedStatus": {
        "reason": "string value",
        "status": "string value"
    },
    "goalDescription": "My Description",
    "goalId": "string value",
    "goalName": "string value",
    "goalOwnerId": "6093fdabd251f200015e8f92",
    "goalOwnerIds": {},
    "initialValue": 2,
    "insightName": "1k42vv2z24",
    "links": {
        "expanded": {
            "goals": [
                {
                    "access": {
                        "inherits": false,
                        "permissions": [
                            "Permission"
                        ]
                    },
                    "accountId": "string value",
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            "tagResponse"
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                "tagResponse"
                            ],
                            "type": "string value"
                        }
                    ],
                    "attainment": 2,
                    "attainmentTypeString": "string value",
                    "createdById": "string value",
                    "dateCreated": "string value",
                    "dateFrom": "string value",
                    "dateTo": "string value",
                    "description": "string value",
                    "id": "string value",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": [
                        "string value 1",
                        "string value 2"
                    ],
                    "parentGoalSessionId": "string value",
                    "parentId": "string value",
                    "parentType": "string value",
                    "private": false,
                    "richTextDescription": "string value",
                    "sessionId": "string value",
                    "url": "string value"
                }
            ],
            "metrics": [
                {
                    "actual": 6,
                    "cascadeType": "absolute_value",
                    "description": "My Description",
                    "dynamic": true,
                    "fieldName": "count",
                    "format": {
                        "ID": "ID",
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalId": "string value",
                    "goalName": "string value",
                    "initialValue": 2,
                    "insightName": "1k42vv2z24",
                    "manualType": "double",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": {},
                    "richTextDescription": "string value",
                    "sessionId": "6093fdabd251f200015e8f92",
                    "target": 100,
                    "targetOperator": "at_least"
                }
            ],
            "sessions": [
                {
                    "accountId": "string value",
                    "end": "string value",
                    "id": "string value",
                    "inherits": false,
                    "parentId": "string value",
                    "permissions": [
                        {
                            "deny": "Binary",
                            "grant": "Binary",
                            "principalId": "ObjectId",
                            "principalKind": "string value"
                        }
                    ],
                    "start": "string value",
                    "status": "string value",
                    "title": "string value"
                }
            ]
        }
    },
    "manualType": "double",
    "name": "string value",
    "numberOfOwners": 2,
    "obfuscated": false,
    "ownerId": "6093fdabd251f200015e8f92",
    "ownerIds": {},
    "richTextDescription": "string value",
    "sessionId": "6093fdabd251f200015e8f92",
    "settings": [
        {
            "dynamicValues": [
                {
                    "teamId": "string",
                    "type": "string"
                }
            ],
            "name": "string value",
            "value": "string value",
            "valueDisplayName": "string value"
        }
    ],
    "softDueDate": "2021-06-25",
    "sourceMetricId": "6093fdabd251f200015e8f92",
    "target": 100,
    "targetMetrics": {},
    "targetOperator": "at_least",
    "tasksCount": 2,
    "url": "string value"
}
Expected response codes
201metricDto
401unauthorized

curl -X POST 'https://app.gtmhub.com/api/v1/metrics' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"actual":6,"assignee":{"accountId":"string value","avatar":"string value","color":"string value","dynamicValueType":"string value","email":"string value","id":"string value","isActive":false,"name":"string value","picture":"string value","tags":[{"createdBy":"string","dateCreated":"string value","id":"string value","isActive":false,"name":"string value","title":"string value"}],"type":"string value"},"assignees":[{"accountId":"string value","avatar":"string value","color":"string value","dynamicValueType":"string value","email":"string value","id":"string value","isActive":false,"name":"string value","picture":"string value","tags":[{"createdBy":"string","dateCreated":"string value","id":"string value","isActive":false,"name":"string value","title":"string value"}],"type":"string value"}],"cascadeType":"absolute_value","critical":50,"description":"My Description","dueDate":"2021-06-30","dynamic":true,"fieldName":"count","format":{"ID":"string","fractionSize":2,"prefix":"string value","suffix":"string value"},"goalClosedStatus":{"reason":"string value","status":"string value"},"goalDescription":"My Description","goalId":"string value","goalName":"string value","goalOwnerId":"6093fdabd251f200015e8f92","goalOwnerIds":{},"initialValue":2,"insightName":"1k42vv2z24","links":{"expanded":{"goals":[{"access":{"inherits":false,"permissions":["Permission"]},"accountId":"string value","assignee":{"accountId":"string value","avatar":"string value","color":"string value","dynamicValueType":"string value","email":"string value","id":"string value","isActive":false,"name":"string value","picture":"string value","tags":["tagResponse"],"type":"string value"},"assignees":[{"accountId":"string value","avatar":"string value","color":"string value","dynamicValueType":"string value","email":"string value","id":"string value","isActive":false,"name":"string value","picture":"string value","tags":["tagResponse"],"type":"string value"}],"attainment":2,"attainmentTypeString":"string value","createdById":"string value","dateCreated":"string value","dateFrom":"string value","dateTo":"string value","description":"string value","id":"string value","name":"string value","numberOfOwners":2,"obfuscated":false,"ownerId":"string value","ownerIds":["string value 1","string value 2"],"parentGoalSessionId":"string value","parentId":"string value","parentType":"string value","private":false,"richTextDescription":"string value","sessionId":"string value","url":"string value"}],"metrics":[{"actual":6,"cascadeType":"absolute_value","description":"My Description","dynamic":true,"fieldName":"count","format":{"ID":"ID","fractionSize":2,"prefix":"string value","suffix":"string value"},"goalId":"string value","goalName":"string value","initialValue":2,"insightName":"1k42vv2z24","manualType":"double","name":"string value","numberOfOwners":2,"obfuscated":false,"ownerId":"string value","ownerIds":{},"richTextDescription":"string value","sessionId":"6093fdabd251f200015e8f92","target":100,"targetOperator":"at_least"}],"sessions":[{"accountId":"string value","end":"string value","id":"string value","inherits":false,"parentId":"string value","permissions":[{"deny":"Binary","grant":"Binary","principalId":"ObjectId","principalKind":"string value"}],"start":"string value","status":"string value","title":"string value"}]}},"manualType":"double","name":"string value","numberOfOwners":2,"obfuscated":false,"ownerId":"6093fdabd251f200015e8f92","ownerIds":{},"richTextDescription":"string value","sessionId":"6093fdabd251f200015e8f92","settings":[{"dynamicValues":[{"teamId":"string","type":"string"}],"name":"string value","value":"string value","valueDisplayName":"string value"}],"softDueDate":"2021-06-25","sourceMetricId":"6093fdabd251f200015e8f92","target":100,"targetMetrics":{},"targetOperator":"at_least","tasksCount":2,"url":"string value"}'

var body ={ "actual": 6, "assignee": { "accountId": "string value", "avatar": "string value", "color": "string value", "dynamicValueType": "string value", "email": "string value", "id": "string value", "isActive": false, "name": "string value", "picture": "string value", "tags": [ { "createdBy": "string", "dateCreated": "string value", "id": "string value", "isActive": false, "name": "string value", "title": "string value" } ], "type": "string value" }, "assignees": [ { "accountId": "string value", "avatar": "string value", "color": "string value", "dynamicValueType": "string value", "email": "string value", "id": "string value", "isActive": false, "name": "string value", "picture": "string value", "tags": [ { "createdBy": "string", "dateCreated": "string value", "id": "string value", "isActive": false, "name": "string value", "title": "string value" } ], "type": "string value" } ], "cascadeType": "absolute_value", "critical": 50, "description": "My Description", "dueDate": "2021-06-30", "dynamic": true, "fieldName": "count", "format": { "ID": "string", "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "goalClosedStatus": { "reason": "string value", "status": "string value" }, "goalDescription": "My Description", "goalId": "string value", "goalName": "string value", "goalOwnerId": "6093fdabd251f200015e8f92", "goalOwnerIds": {}, "initialValue": 2, "insightName": "1k42vv2z24", "links": { "expanded": { "goals": [ { "access": { "inherits": false, "permissions": [ "Permission" ] }, "accountId": "string value", "assignee": { "accountId": "string value", "avatar": "string value", "color": "string value", "dynamicValueType": "string value", "email": "string value", "id": "string value", "isActive": false, "name": "string value", "picture": "string value", "tags": [ "tagResponse" ], "type": "string value" }, "assignees": [ { "accountId": "string value", "avatar": "string value", "color": "string value", "dynamicValueType": "string value", "email": "string value", "id": "string value", "isActive": false, "name": "string value", "picture": "string value", "tags": [ "tagResponse" ], "type": "string value" } ], "attainment": 2, "attainmentTypeString": "string value", "createdById": "string value", "dateCreated": "string value", "dateFrom": "string value", "dateTo": "string value", "description": "string value", "id": "string value", "name": "string value", "numberOfOwners": 2, "obfuscated": false, "ownerId": "string value", "ownerIds": [ "string value 1", "string value 2" ], "parentGoalSessionId": "string value", "parentId": "string value", "parentType": "string value", "private": false, "richTextDescription": "string value", "sessionId": "string value", "url": "string value" } ], "metrics": [ { "actual": 6, "cascadeType": "absolute_value", "description": "My Description", "dynamic": true, "fieldName": "count", "format": { "ID": "ID", "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "goalId": "string value", "goalName": "string value", "initialValue": 2, "insightName": "1k42vv2z24", "manualType": "double", "name": "string value", "numberOfOwners": 2, "obfuscated": false, "ownerId": "string value", "ownerIds": {}, "richTextDescription": "string value", "sessionId": "6093fdabd251f200015e8f92", "target": 100, "targetOperator": "at_least" } ], "sessions": [ { "accountId": "string value", "end": "string value", "id": "string value", "inherits": false, "parentId": "string value", "permissions": [ { "deny": "Binary", "grant": "Binary", "principalId": "ObjectId", "principalKind": "string value" } ], "start": "string value", "status": "string value", "title": "string value" } ] } }, "manualType": "double", "name": "string value", "numberOfOwners": 2, "obfuscated": false, "ownerId": "6093fdabd251f200015e8f92", "ownerIds": {}, "richTextDescription": "string value", "sessionId": "6093fdabd251f200015e8f92", "settings": [ { "dynamicValues": [ { "teamId": "string", "type": "string" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value" } ], "softDueDate": "2021-06-25", "sourceMetricId": "6093fdabd251f200015e8f92", "target": 100, "targetMetrics": {}, "targetOperator": "at_least", "tasksCount": 2, "url": "string value" };

var settings = { "url": "https://app.gtmhub.com/api/v1/metrics", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/metrics"

body = { "actual": 6, "assignee": { "accountId": "string value", "avatar": "string value", "color": "string value", "dynamicValueType": "string value", "email": "string value", "id": "string value", "isActive": false, "name": "string value", "picture": "string value", "tags": [ { "createdBy": "string", "dateCreated": "string value", "id": "string value", "isActive": false, "name": "string value", "title": "string value" } ], "type": "string value" }, "assignees": [ { "accountId": "string value", "avatar": "string value", "color": "string value", "dynamicValueType": "string value", "email": "string value", "id": "string value", "isActive": false, "name": "string value", "picture": "string value", "tags": [ { "createdBy": "string", "dateCreated": "string value", "id": "string value", "isActive": false, "name": "string value", "title": "string value" } ], "type": "string value" } ], "cascadeType": "absolute_value", "critical": 50, "description": "My Description", "dueDate": "2021-06-30", "dynamic": true, "fieldName": "count", "format": { "ID": "string", "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "goalClosedStatus": { "reason": "string value", "status": "string value" }, "goalDescription": "My Description", "goalId": "string value", "goalName": "string value", "goalOwnerId": "6093fdabd251f200015e8f92", "goalOwnerIds": {}, "initialValue": 2, "insightName": "1k42vv2z24", "links": { "expanded": { "goals": [ { "access": { "inherits": false, "permissions": [ "Permission" ] }, "accountId": "string value", "assignee": { "accountId": "string value", "avatar": "string value", "color": "string value", "dynamicValueType": "string value", "email": "string value", "id": "string value", "isActive": false, "name": "string value", "picture": "string value", "tags": [ "tagResponse" ], "type": "string value" }, "assignees": [ { "accountId": "string value", "avatar": "string value", "color": "string value", "dynamicValueType": "string value", "email": "string value", "id": "string value", "isActive": false, "name": "string value", "picture": "string value", "tags": [ "tagResponse" ], "type": "string value" } ], "attainment": 2, "attainmentTypeString": "string value", "createdById": "string value", "dateCreated": "string value", "dateFrom": "string value", "dateTo": "string value", "description": "string value", "id": "string value", "name": "string value", "numberOfOwners": 2, "obfuscated": false, "ownerId": "string value", "ownerIds": [ "string value 1", "string value 2" ], "parentGoalSessionId": "string value", "parentId": "string value", "parentType": "string value", "private": false, "richTextDescription": "string value", "sessionId": "string value", "url": "string value" } ], "metrics": [ { "actual": 6, "cascadeType": "absolute_value", "description": "My Description", "dynamic": true, "fieldName": "count", "format": { "ID": "ID", "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "goalId": "string value", "goalName": "string value", "initialValue": 2, "insightName": "1k42vv2z24", "manualType": "double", "name": "string value", "numberOfOwners": 2, "obfuscated": false, "ownerId": "string value", "ownerIds": {}, "richTextDescription": "string value", "sessionId": "6093fdabd251f200015e8f92", "target": 100, "targetOperator": "at_least" } ], "sessions": [ { "accountId": "string value", "end": "string value", "id": "string value", "inherits": false, "parentId": "string value", "permissions": [ { "deny": "Binary", "grant": "Binary", "principalId": "ObjectId", "principalKind": "string value" } ], "start": "string value", "status": "string value", "title": "string value" } ] } }, "manualType": "double", "name": "string value", "numberOfOwners": 2, "obfuscated": false, "ownerId": "6093fdabd251f200015e8f92", "ownerIds": {}, "richTextDescription": "string value", "sessionId": "6093fdabd251f200015e8f92", "settings": [ { "dynamicValues": [ { "teamId": "string", "type": "string" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value" } ], "softDueDate": "2021-06-25", "sourceMetricId": "6093fdabd251f200015e8f92", "target": 100, "targetMetrics": {}, "targetOperator": "at_least", "tasksCount": 2, "url": "string value" };

requests.post(url, data=json.dumps(body), headers = headers)
{
    "actual": 6,
    "assignee": {
        "accountId": "string value",
        "avatar": "string value",
        "color": "string value",
        "dynamicValueType": "string value",
        "email": "string value",
        "id": "string value",
        "isActive": false,
        "name": "string value",
        "picture": "string value",
        "tags": [
            {
                "createdBy": "string",
                "dateCreated": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "title": "string value"
            }
        ],
        "type": "string value"
    },
    "assignees": [
        {
            "accountId": "string value",
            "avatar": "string value",
            "color": "string value",
            "dynamicValueType": "string value",
            "email": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "picture": "string value",
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "type": "string value"
        }
    ],
    "cascadeType": "absolute_value",
    "critical": 50,
    "description": "My Description",
    "dueDate": "2021-06-30",
    "dynamic": true,
    "fieldName": "count",
    "format": {
        "ID": "string",
        "fractionSize": 2,
        "prefix": "string value",
        "suffix": "string value"
    },
    "goalClosedStatus": {
        "reason": "string value",
        "status": "string value"
    },
    "goalDescription": "My Description",
    "goalId": "string value",
    "goalName": "string value",
    "goalOwnerId": "6093fdabd251f200015e8f92",
    "goalOwnerIds": {},
    "initialValue": 2,
    "insightName": "1k42vv2z24",
    "links": {
        "expanded": {
            "goals": [
                {
                    "access": {
                        "inherits": false,
                        "permissions": [
                            "Permission"
                        ]
                    },
                    "accountId": "string value",
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            "tagResponse"
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                "tagResponse"
                            ],
                            "type": "string value"
                        }
                    ],
                    "attainment": 2,
                    "attainmentTypeString": "string value",
                    "createdById": "string value",
                    "dateCreated": "string value",
                    "dateFrom": "string value",
                    "dateTo": "string value",
                    "description": "string value",
                    "id": "string value",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": [
                        "string value 1",
                        "string value 2"
                    ],
                    "parentGoalSessionId": "string value",
                    "parentId": "string value",
                    "parentType": "string value",
                    "private": false,
                    "richTextDescription": "string value",
                    "sessionId": "string value",
                    "url": "string value"
                }
            ],
            "metrics": [
                {
                    "actual": 6,
                    "cascadeType": "absolute_value",
                    "description": "My Description",
                    "dynamic": true,
                    "fieldName": "count",
                    "format": {
                        "ID": "ID",
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalId": "string value",
                    "goalName": "string value",
                    "initialValue": 2,
                    "insightName": "1k42vv2z24",
                    "manualType": "double",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": {},
                    "richTextDescription": "string value",
                    "sessionId": "6093fdabd251f200015e8f92",
                    "target": 100,
                    "targetOperator": "at_least"
                }
            ],
            "sessions": [
                {
                    "accountId": "string value",
                    "end": "string value",
                    "id": "string value",
                    "inherits": false,
                    "parentId": "string value",
                    "permissions": [
                        {
                            "deny": "Binary",
                            "grant": "Binary",
                            "principalId": "ObjectId",
                            "principalKind": "string value"
                        }
                    ],
                    "start": "string value",
                    "status": "string value",
                    "title": "string value"
                }
            ]
        }
    },
    "manualType": "double",
    "name": "string value",
    "numberOfOwners": 2,
    "obfuscated": false,
    "ownerId": "6093fdabd251f200015e8f92",
    "ownerIds": {},
    "richTextDescription": "string value",
    "sessionId": "6093fdabd251f200015e8f92",
    "settings": [
        {
            "dynamicValues": [
                {
                    "teamId": "string",
                    "type": "string"
                }
            ],
            "name": "string value",
            "value": "string value",
            "valueDisplayName": "string value"
        }
    ],
    "softDueDate": "2021-06-25",
    "sourceMetricId": "6093fdabd251f200015e8f92",
    "target": 100,
    "targetMetrics": {},
    "targetOperator": "at_least",
    "tasksCount": 2,
    "url": "string value"
}
🔗
post
/metrics/checkins
Bulk create metric snapshots.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
snapshots
*
objectA list of objects representing the metric snapshots to be created.
expected in body, sample value:
{
    "snapshots": [
        {
            "metricID": "string value",
            "snapshot": {
                "actual": 3.5,
                "changedBy": "string value",
                "checkInDate": "2018-09-22T19:42:31+07:00",
                "comment": "This is my second update for this quarter.",
                "confidence": 0.7,
                "createdAt": "string value",
                "customFields": "customFieldTextArea: abc",
                "gif": {
                    "id": "string value",
                    "searchQuery": "string value"
                },
                "richTextComment": "

This is my second update for this quarter.

", "richTextCustomFields": "customFieldTextArea: abc", "simulateAutomaticCheckin": false } } ] }
Expected response codes
200bulkCreateCheckinMetricResponse
401unauthorized

curl -X POST 'https://app.gtmhub.com/api/v1/metrics/checkins' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"snapshots":[{"metricID":"string value","snapshot":{"actual":3.5,"changedBy":"string value","checkInDate":"2018-09-22T19:42:31+07:00","comment":"This is my second update for this quarter.","confidence":0.7,"createdAt":"string value","customFields":"customFieldTextArea: abc","gif":{"id":"string value","searchQuery":"string value"},"richTextComment":"

This is my second update for this quarter.

","richTextCustomFields":"customFieldTextArea: abc","simulateAutomaticCheckin":false}}]}'

var body ={ "snapshots": [ { "metricID": "string value", "snapshot": { "actual": 3.5, "changedBy": "string value", "checkInDate": "2018-09-22T19:42:31+07:00", "comment": "This is my second update for this quarter.", "confidence": 0.7, "createdAt": "string value", "customFields": "customFieldTextArea: abc", "gif": { "id": "string value", "searchQuery": "string value" }, "richTextComment": "

This is my second update for this quarter.

", "richTextCustomFields": "customFieldTextArea: abc", "simulateAutomaticCheckin": false } } ] };

var settings = { "url": "https://app.gtmhub.com/api/v1/metrics/checkins", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/metrics/checkins"

body = { "snapshots": [ { "metricID": "string value", "snapshot": { "actual": 3.5, "changedBy": "string value", "checkInDate": "2018-09-22T19:42:31+07:00", "comment": "This is my second update for this quarter.", "confidence": 0.7, "createdAt": "string value", "customFields": "customFieldTextArea: abc", "gif": { "id": "string value", "searchQuery": "string value" }, "richTextComment": "

This is my second update for this quarter.

", "richTextCustomFields": "customFieldTextArea: abc", "simulateAutomaticCheckin": false } } ] };

requests.post(url, data=json.dumps(body), headers = headers)
{
    "hasFailures": false,
    "items": [
        {
            "failureReason": "string value",
            "isSuccessful": false,
            "metricID": "string value"
        }
    ]
}
🔗
post
/metrics/{metricId}/checkin
Updates the value of the manual metric (key result) specified in the url.
When trying to update a metric after its due date, a 400 Bad Request Error occurs.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
metricId
*
stringThe unique identifier (id) of the metric.
expected in path
checkIn
*
objectThe object representing all metric attributes that can be updated when a metric is checked in.
expected in body, sample value:
{
    "actual": 3.5,
    "changedBy": "string value",
    "checkInDate": "2018-09-22T19:42:31+07:00",
    "comment": "This is my second update for this quarter.",
    "confidence": 0.7,
    "createdAt": "string value",
    "customFields": "customFieldTextArea: abc",
    "gif": {
        "id": "string value",
        "searchQuery": "string value"
    },
    "richTextComment": "

This is my second update for this quarter.

", "richTextCustomFields": "customFieldTextArea: abc", "simulateAutomaticCheckin": false }
Expected response codes
201snapshotResponse
401unauthorized

curl -X POST 'https://app.gtmhub.com/api/v1/metrics/{metricId}/checkin' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"actual":3.5,"changedBy":"string value","checkInDate":"2018-09-22T19:42:31+07:00","comment":"This is my second update for this quarter.","confidence":0.7,"createdAt":"string value","customFields":"customFieldTextArea: abc","gif":{"id":"string value","searchQuery":"string value"},"richTextComment":"

This is my second update for this quarter.

","richTextCustomFields":"customFieldTextArea: abc","simulateAutomaticCheckin":false}'

var body ={ "actual": 3.5, "changedBy": "string value", "checkInDate": "2018-09-22T19:42:31+07:00", "comment": "This is my second update for this quarter.", "confidence": 0.7, "createdAt": "string value", "customFields": "customFieldTextArea: abc", "gif": { "id": "string value", "searchQuery": "string value" }, "richTextComment": "

This is my second update for this quarter.

", "richTextCustomFields": "customFieldTextArea: abc", "simulateAutomaticCheckin": false };

var settings = { "url": "https://app.gtmhub.com/api/v1/metrics/{metricId}/checkin", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/metrics/{metricId}/checkin"

body = { "actual": 3.5, "changedBy": "string value", "checkInDate": "2018-09-22T19:42:31+07:00", "comment": "This is my second update for this quarter.", "confidence": 0.7, "createdAt": "string value", "customFields": "customFieldTextArea: abc", "gif": { "id": "string value", "searchQuery": "string value" }, "richTextComment": "

This is my second update for this quarter.

", "richTextCustomFields": "customFieldTextArea: abc", "simulateAutomaticCheckin": false };

requests.post(url, data=json.dumps(body), headers = headers)
{
    "attainment": 2,
    "comment": "string value",
    "confidence": 2,
    "createdAt": {},
    "date": "string value",
    "id": "string value",
    "modifiedBy": "string value",
    "rawComment": "string value",
    "value": 2,
    "confidenceValue": 2
}
🔗
put
/goals/{id}/status
Updates a goal closed status.
Parameters
NameTypeDescription
Expected response codes
204no content

curl -X PUT 'https://app.gtmhub.com/api/v1/goals/{id}/status' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{id}/status", "method": "PUT", "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/v1/goals/{id}/status"



requests.put(url, headers = headers)
🔗
put
/metrics/{metricId}
Fully updates a metric (key result) in the current Gtmhub account.
Updates all metric's attributes with their corresponding values in metric request body.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
metricId
*
stringThe unique identifier (id) of the metric.
expected in path
metric
*
objectThe values to update the metric with. If any of metric's attributes is missing from the request body the attribute is set to the zero value of its type.
expected in body, sample value:
{
    "actual": 6,
    "cascadeType": "string value",
    "critical": 15,
    "customFields": "customFieldUsersDropdownMenu: [ 602b8d7b55c9d30001d2c219,602b8e8704f94000010dac6a]",
    "description": "My Description",
    "dueDate": "2021-06-30",
    "fieldName": "count",
    "format": {
        "ID": "string",
        "fractionSize": 2,
        "prefix": "string value",
        "suffix": "string value"
    },
    "goalId": "string value",
    "initialValue": 2,
    "insightName": "1k42vv2z24",
    "manualType": "boolean",
    "name": "string value",
    "ownerId": "6093fdabd251f200015e8f92",
    "ownerIds": {},
    "reminderSchedule": {
        "active": false,
        "day": "string value",
        "email": "string value",
        "type": "string value"
    },
    "softDueDate": "2021-06-25",
    "target": 100,
    "targetOperator": "string value"
}
Expected response codes
200metricDto
401unauthorized

curl -X PUT 'https://app.gtmhub.com/api/v1/metrics/{metricId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"actual":6,"cascadeType":"string value","critical":15,"customFields":"customFieldUsersDropdownMenu: [ 602b8d7b55c9d30001d2c219,602b8e8704f94000010dac6a]","description":"My Description","dueDate":"2021-06-30","fieldName":"count","format":{"ID":"string","fractionSize":2,"prefix":"string value","suffix":"string value"},"goalId":"string value","initialValue":2,"insightName":"1k42vv2z24","manualType":"boolean","name":"string value","ownerId":"6093fdabd251f200015e8f92","ownerIds":{},"reminderSchedule":{"active":false,"day":"string value","email":"string value","type":"string value"},"softDueDate":"2021-06-25","target":100,"targetOperator":"string value"}'

var body ={ "actual": 6, "cascadeType": "string value", "critical": 15, "customFields": "customFieldUsersDropdownMenu: [ 602b8d7b55c9d30001d2c219,602b8e8704f94000010dac6a]", "description": "My Description", "dueDate": "2021-06-30", "fieldName": "count", "format": { "ID": "string", "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "goalId": "string value", "initialValue": 2, "insightName": "1k42vv2z24", "manualType": "boolean", "name": "string value", "ownerId": "6093fdabd251f200015e8f92", "ownerIds": {}, "reminderSchedule": { "active": false, "day": "string value", "email": "string value", "type": "string value" }, "softDueDate": "2021-06-25", "target": 100, "targetOperator": "string value" };

var settings = { "url": "https://app.gtmhub.com/api/v1/metrics/{metricId}", "method": "PUT", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/metrics/{metricId}"

body = { "actual": 6, "cascadeType": "string value", "critical": 15, "customFields": "customFieldUsersDropdownMenu: [ 602b8d7b55c9d30001d2c219,602b8e8704f94000010dac6a]", "description": "My Description", "dueDate": "2021-06-30", "fieldName": "count", "format": { "ID": "string", "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "goalId": "string value", "initialValue": 2, "insightName": "1k42vv2z24", "manualType": "boolean", "name": "string value", "ownerId": "6093fdabd251f200015e8f92", "ownerIds": {}, "reminderSchedule": { "active": false, "day": "string value", "email": "string value", "type": "string value" }, "softDueDate": "2021-06-25", "target": 100, "targetOperator": "string value" };

requests.put(url, data=json.dumps(body), headers = headers)
{
    "actual": 6,
    "assignee": {
        "accountId": "string value",
        "avatar": "string value",
        "color": "string value",
        "dynamicValueType": "string value",
        "email": "string value",
        "id": "string value",
        "isActive": false,
        "name": "string value",
        "picture": "string value",
        "tags": [
            {
                "createdBy": "string",
                "dateCreated": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "title": "string value"
            }
        ],
        "type": "string value"
    },
    "assignees": [
        {
            "accountId": "string value",
            "avatar": "string value",
            "color": "string value",
            "dynamicValueType": "string value",
            "email": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "picture": "string value",
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "type": "string value"
        }
    ],
    "cascadeType": "absolute_value",
    "critical": 50,
    "description": "My Description",
    "dueDate": "2021-06-30",
    "dynamic": true,
    "fieldName": "count",
    "format": {
        "ID": "string",
        "fractionSize": 2,
        "prefix": "string value",
        "suffix": "string value"
    },
    "goalClosedStatus": {
        "reason": "string value",
        "status": "string value"
    },
    "goalDescription": "My Description",
    "goalId": "string value",
    "goalName": "string value",
    "goalOwnerId": "6093fdabd251f200015e8f92",
    "goalOwnerIds": {},
    "initialValue": 2,
    "insightName": "1k42vv2z24",
    "links": {
        "expanded": {
            "goals": [
                {
                    "access": {
                        "inherits": false,
                        "permissions": [
                            "Permission"
                        ]
                    },
                    "accountId": "string value",
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            "tagResponse"
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                "tagResponse"
                            ],
                            "type": "string value"
                        }
                    ],
                    "attainment": 2,
                    "attainmentTypeString": "string value",
                    "createdById": "string value",
                    "dateCreated": "string value",
                    "dateFrom": "string value",
                    "dateTo": "string value",
                    "description": "string value",
                    "id": "string value",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": [
                        "string value 1",
                        "string value 2"
                    ],
                    "parentGoalSessionId": "string value",
                    "parentId": "string value",
                    "parentType": "string value",
                    "private": false,
                    "richTextDescription": "string value",
                    "sessionId": "string value",
                    "url": "string value"
                }
            ],
            "metrics": [
                {
                    "actual": 6,
                    "cascadeType": "absolute_value",
                    "description": "My Description",
                    "dynamic": true,
                    "fieldName": "count",
                    "format": {
                        "ID": "ID",
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalId": "string value",
                    "goalName": "string value",
                    "initialValue": 2,
                    "insightName": "1k42vv2z24",
                    "manualType": "double",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": {},
                    "richTextDescription": "string value",
                    "sessionId": "6093fdabd251f200015e8f92",
                    "target": 100,
                    "targetOperator": "at_least"
                }
            ],
            "sessions": [
                {
                    "accountId": "string value",
                    "end": "string value",
                    "id": "string value",
                    "inherits": false,
                    "parentId": "string value",
                    "permissions": [
                        {
                            "deny": "Binary",
                            "grant": "Binary",
                            "principalId": "ObjectId",
                            "principalKind": "string value"
                        }
                    ],
                    "start": "string value",
                    "status": "string value",
                    "title": "string value"
                }
            ]
        }
    },
    "manualType": "double",
    "name": "string value",
    "numberOfOwners": 2,
    "obfuscated": false,
    "ownerId": "6093fdabd251f200015e8f92",
    "ownerIds": {},
    "richTextDescription": "string value",
    "sessionId": "6093fdabd251f200015e8f92",
    "settings": [
        {
            "dynamicValues": [
                {
                    "teamId": "string",
                    "type": "string"
                }
            ],
            "name": "string value",
            "value": "string value",
            "valueDisplayName": "string value"
        }
    ],
    "softDueDate": "2021-06-25",
    "sourceMetricId": "6093fdabd251f200015e8f92",
    "target": 100,
    "targetMetrics": {},
    "targetOperator": "at_least",
    "tasksCount": 2,
    "url": "string value"
}
🔗
patch
/metrics/checkin/{checkinId}
Updates a metric checkin's comment. Does not update the check-in value.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
checkinId
*
stringThe metric checkin identifier (id) / snapshot identifier (id).
expected in path
snapshot
*
objectThis object represents the attributes of a metric snapshot to be updated. In order to prevent metric history abuse, the only metric snapshot's attribute that can be updated is snapshot's comment.
expected in body, sample value:
{
    "Gif": {
        "id": "string value",
        "searchQuery": "string value"
    },
    "comment": "My new comment",
    "customFields": "customFieldDatePickerType: 2021-06-22T00:00:00.000Z",
    "richTextComment": "

My new comment

" }
Expected response codes
204no content
401unauthorized

curl -X PATCH 'https://app.gtmhub.com/api/v1/metrics/checkin/{checkinId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"Gif":{"id":"string value","searchQuery":"string value"},"comment":"My new comment","customFields":"customFieldDatePickerType: 2021-06-22T00:00:00.000Z","richTextComment":"

My new comment

"}'

var body ={ "Gif": { "id": "string value", "searchQuery": "string value" }, "comment": "My new comment", "customFields": "customFieldDatePickerType: 2021-06-22T00:00:00.000Z", "richTextComment": "

My new comment

" };

var settings = { "url": "https://app.gtmhub.com/api/v1/metrics/checkin/{checkinId}", "method": "PATCH", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/metrics/checkin/{checkinId}"

body = { "Gif": { "id": "string value", "searchQuery": "string value" }, "comment": "My new comment", "customFields": "customFieldDatePickerType: 2021-06-22T00:00:00.000Z", "richTextComment": "

My new comment

" };

requests.patch(url, data=json.dumps(body), headers = headers)
🔗
patch
/metrics/{metricId}
Partially updates a metric in the current Gtmhub account.
Updates the metrics attributes that are specified in the metric request only. Any attributes that are not specified in the metric request will not be updated.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
metricId
*
stringThe unique identifier (id) of the metric.
expected in path
metric
*
objectThe object representing the updated metric.
expected in body, sample value:
{
    "actual": 3,
    "cascadeType": "string value",
    "confidence": {
        "date": "string value",
        "gif": {
            "id": "string value",
            "searchQuery": "string value"
        },
        "reason": "string value",
        "userId": "string",
        "value": 2
    },
    "critical": {
        "Set": false,
        "Valid": false,
        "Value": 2
    },
    "customFields": "customFieldTextArea: abc",
    "description": "string value",
    "dueDate": "2021-06-30",
    "fieldName": "count",
    "format": {
        "ID": "string",
        "fractionSize": 2,
        "prefix": "string value",
        "suffix": "string value"
    },
    "goalId": "6093fdabd251f200015e8f92",
    "initialValue": 2,
    "insightName": "1k42vv2z24",
    "manualType": "double",
    "mentions": {},
    "name": "Track effort, fix bottlenecks and improve velocity",
    "ownerId": "6093fdabd251f200015e8f92",
    "ownerIds": {},
    "reminderSchedule": {
        "active": false,
        "day": "string value",
        "email": "string value",
        "type": "string value"
    },
    "richTextCustomFields": "customFieldTextArea: abc",
    "richTextDescription": "string value",
    "settings": [
        {
            "dynamicValues": [
                {
                    "teamId": "string",
                    "type": "string"
                }
            ],
            "name": "string value",
            "value": "string value",
            "valueDisplayName": "string value"
        }
    ],
    "softDueDate": "2021-06-25",
    "sourceMetricId": "string value",
    "target": 100,
    "targetOperator": "string value"
}
Expected response codes
200metricDto
401unauthorized

curl -X PATCH 'https://app.gtmhub.com/api/v1/metrics/{metricId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"actual":3,"cascadeType":"string value","confidence":{"date":"string value","gif":{"id":"string value","searchQuery":"string value"},"reason":"string value","userId":"string","value":2},"critical":{"Set":false,"Valid":false,"Value":2},"customFields":"customFieldTextArea: abc","description":"string value","dueDate":"2021-06-30","fieldName":"count","format":{"ID":"string","fractionSize":2,"prefix":"string value","suffix":"string value"},"goalId":"6093fdabd251f200015e8f92","initialValue":2,"insightName":"1k42vv2z24","manualType":"double","mentions":{},"name":"Track effort, fix bottlenecks and improve velocity","ownerId":"6093fdabd251f200015e8f92","ownerIds":{},"reminderSchedule":{"active":false,"day":"string value","email":"string value","type":"string value"},"richTextCustomFields":"customFieldTextArea: abc","richTextDescription":"string value","settings":[{"dynamicValues":[{"teamId":"string","type":"string"}],"name":"string value","value":"string value","valueDisplayName":"string value"}],"softDueDate":"2021-06-25","sourceMetricId":"string value","target":100,"targetOperator":"string value"}'

var body ={ "actual": 3, "cascadeType": "string value", "confidence": { "date": "string value", "gif": { "id": "string value", "searchQuery": "string value" }, "reason": "string value", "userId": "string", "value": 2 }, "critical": { "Set": false, "Valid": false, "Value": 2 }, "customFields": "customFieldTextArea: abc", "description": "string value", "dueDate": "2021-06-30", "fieldName": "count", "format": { "ID": "string", "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "goalId": "6093fdabd251f200015e8f92", "initialValue": 2, "insightName": "1k42vv2z24", "manualType": "double", "mentions": {}, "name": "Track effort, fix bottlenecks and improve velocity", "ownerId": "6093fdabd251f200015e8f92", "ownerIds": {}, "reminderSchedule": { "active": false, "day": "string value", "email": "string value", "type": "string value" }, "richTextCustomFields": "customFieldTextArea: abc", "richTextDescription": "string value", "settings": [ { "dynamicValues": [ { "teamId": "string", "type": "string" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value" } ], "softDueDate": "2021-06-25", "sourceMetricId": "string value", "target": 100, "targetOperator": "string value" };

var settings = { "url": "https://app.gtmhub.com/api/v1/metrics/{metricId}", "method": "PATCH", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
},
"data": body
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };

url = "https://app.gtmhub.com/api/v1/metrics/{metricId}"

body = { "actual": 3, "cascadeType": "string value", "confidence": { "date": "string value", "gif": { "id": "string value", "searchQuery": "string value" }, "reason": "string value", "userId": "string", "value": 2 }, "critical": { "Set": false, "Valid": false, "Value": 2 }, "customFields": "customFieldTextArea: abc", "description": "string value", "dueDate": "2021-06-30", "fieldName": "count", "format": { "ID": "string", "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "goalId": "6093fdabd251f200015e8f92", "initialValue": 2, "insightName": "1k42vv2z24", "manualType": "double", "mentions": {}, "name": "Track effort, fix bottlenecks and improve velocity", "ownerId": "6093fdabd251f200015e8f92", "ownerIds": {}, "reminderSchedule": { "active": false, "day": "string value", "email": "string value", "type": "string value" }, "richTextCustomFields": "customFieldTextArea: abc", "richTextDescription": "string value", "settings": [ { "dynamicValues": [ { "teamId": "string", "type": "string" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value" } ], "softDueDate": "2021-06-25", "sourceMetricId": "string value", "target": 100, "targetOperator": "string value" };

requests.patch(url, data=json.dumps(body), headers = headers)
{
    "actual": 6,
    "assignee": {
        "accountId": "string value",
        "avatar": "string value",
        "color": "string value",
        "dynamicValueType": "string value",
        "email": "string value",
        "id": "string value",
        "isActive": false,
        "name": "string value",
        "picture": "string value",
        "tags": [
            {
                "createdBy": "string",
                "dateCreated": "string value",
                "id": "string value",
                "isActive": false,
                "name": "string value",
                "title": "string value"
            }
        ],
        "type": "string value"
    },
    "assignees": [
        {
            "accountId": "string value",
            "avatar": "string value",
            "color": "string value",
            "dynamicValueType": "string value",
            "email": "string value",
            "id": "string value",
            "isActive": false,
            "name": "string value",
            "picture": "string value",
            "tags": [
                {
                    "createdBy": "string",
                    "dateCreated": "string value",
                    "id": "string value",
                    "isActive": false,
                    "name": "string value",
                    "title": "string value"
                }
            ],
            "type": "string value"
        }
    ],
    "cascadeType": "absolute_value",
    "critical": 50,
    "description": "My Description",
    "dueDate": "2021-06-30",
    "dynamic": true,
    "fieldName": "count",
    "format": {
        "ID": "string",
        "fractionSize": 2,
        "prefix": "string value",
        "suffix": "string value"
    },
    "goalClosedStatus": {
        "reason": "string value",
        "status": "string value"
    },
    "goalDescription": "My Description",
    "goalId": "string value",
    "goalName": "string value",
    "goalOwnerId": "6093fdabd251f200015e8f92",
    "goalOwnerIds": {},
    "initialValue": 2,
    "insightName": "1k42vv2z24",
    "links": {
        "expanded": {
            "goals": [
                {
                    "access": {
                        "inherits": false,
                        "permissions": [
                            "Permission"
                        ]
                    },
                    "accountId": "string value",
                    "assignee": {
                        "accountId": "string value",
                        "avatar": "string value",
                        "color": "string value",
                        "dynamicValueType": "string value",
                        "email": "string value",
                        "id": "string value",
                        "isActive": false,
                        "name": "string value",
                        "picture": "string value",
                        "tags": [
                            "tagResponse"
                        ],
                        "type": "string value"
                    },
                    "assignees": [
                        {
                            "accountId": "string value",
                            "avatar": "string value",
                            "color": "string value",
                            "dynamicValueType": "string value",
                            "email": "string value",
                            "id": "string value",
                            "isActive": false,
                            "name": "string value",
                            "picture": "string value",
                            "tags": [
                                "tagResponse"
                            ],
                            "type": "string value"
                        }
                    ],
                    "attainment": 2,
                    "attainmentTypeString": "string value",
                    "createdById": "string value",
                    "dateCreated": "string value",
                    "dateFrom": "string value",
                    "dateTo": "string value",
                    "description": "string value",
                    "id": "string value",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": [
                        "string value 1",
                        "string value 2"
                    ],
                    "parentGoalSessionId": "string value",
                    "parentId": "string value",
                    "parentType": "string value",
                    "private": false,
                    "richTextDescription": "string value",
                    "sessionId": "string value",
                    "url": "string value"
                }
            ],
            "metrics": [
                {
                    "actual": 6,
                    "cascadeType": "absolute_value",
                    "description": "My Description",
                    "dynamic": true,
                    "fieldName": "count",
                    "format": {
                        "ID": "ID",
                        "fractionSize": 2,
                        "prefix": "string value",
                        "suffix": "string value"
                    },
                    "goalId": "string value",
                    "goalName": "string value",
                    "initialValue": 2,
                    "insightName": "1k42vv2z24",
                    "manualType": "double",
                    "name": "string value",
                    "numberOfOwners": 2,
                    "obfuscated": false,
                    "ownerId": "string value",
                    "ownerIds": {},
                    "richTextDescription": "string value",
                    "sessionId": "6093fdabd251f200015e8f92",
                    "target": 100,
                    "targetOperator": "at_least"
                }
            ],
            "sessions": [
                {
                    "accountId": "string value",
                    "end": "string value",
                    "id": "string value",
                    "inherits": false,
                    "parentId": "string value",
                    "permissions": [
                        {
                            "deny": "Binary",
                            "grant": "Binary",
                            "principalId": "ObjectId",
                            "principalKind": "string value"
                        }
                    ],
                    "start": "string value",
                    "status": "string value",
                    "title": "string value"
                }
            ]
        }
    },
    "manualType": "double",
    "name": "string value",
    "numberOfOwners": 2,
    "obfuscated": false,
    "ownerId": "6093fdabd251f200015e8f92",
    "ownerIds": {},
    "richTextDescription": "string value",
    "sessionId": "6093fdabd251f200015e8f92",
    "settings": [
        {
            "dynamicValues": [
                {
                    "teamId": "string",
                    "type": "string"
                }
            ],
            "name": "string value",
            "value": "string value",
            "valueDisplayName": "string value"
        }
    ],
    "softDueDate": "2021-06-25",
    "sourceMetricId": "6093fdabd251f200015e8f92",
    "target": 100,
    "targetMetrics": {},
    "targetOperator": "at_least",
    "tasksCount": 2,
    "url": "string value"
}
🔗
delete
/goals/{id}/status
Deletes a goal closed status.
Parameters
NameTypeDescription
Expected response codes
204no content

curl -X DELETE 'https://app.gtmhub.com/api/v1/goals/{id}/status' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.gtmhub.com/api/v1/goals/{id}/status", "method": "DELETE", "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/v1/goals/{id}/status"



requests.delete(url, headers = headers)
🔗
delete
/metrics/checkin/{checkinId}
Deletes a metric update (also referred to as a snapshot or check-in).
This endpoint could be used by account admins only. No request object required.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
checkinId
*
stringThe metric checkin identifier (id) / snapshot identifier (id).
expected in path
Expected response codes
204no content
401unauthorized

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



requests.delete(url, headers = headers)
🔗
delete
/metrics/{metricId}
Deletes the metric specified in the url from the current Gtmhub account.
No request object required.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
metricId
*
stringThe unique identifier (id) of the metric.
expected in path
Expected response codes
204no content
401unauthorized

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



requests.delete(url, headers = headers)