KPIs endpoints
The Kpi endpoints enable you to retrieve, create, update, or delete Quantive Results KPIs. For more information about KPIs check our Create KPIs help article.
Gets all used kpis for the chosen insight
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
200 | ok |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v1/insights/{id}/usages/kpis' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v1/insights/{id}/usages/kpis", "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.quantive.com/results/api/v1/insights/{id}/usages/kpis"
requests.get(url, headers = headers)
Gets KPI snapshots for a given list of KPI unique identifiers (KPI ids).
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
ids | string | A comma-separated list of KPI unique identifiers (ids).
Ex: 5e8c27e3dcdddaa4addbdee8,5e8ed44adcddda0da9eab365 expected in query, sample value: 5e8c27e3dcdddaa4addbdee8,5e8ed44adcddda0da9eab365 |
groupIds | string | A comma-separated list of KPI Groups unique identifiers (ids).
Ex: 5e8c27e3dcdddaa4addbdee8,5e8ed44adcddda0da9eab365 expected in query, sample value: string |
ungrouped | boolean | A true/false value to return all KPIs which the user has access and which don't belong to a group expected in query
|
mykpis | boolean | A true/false value to return all KPIs which the user is an owner expected in query
|
timeZone | string | The time zone for which to calculate snapshot groups. expected in query, sample value: UTC-2 |
groupBy | string | Specifies how the snapshots to be grouped by. expected in query, sample value: string |
from | string | Gets the snapshots that start on this date only.
Date format: YYYY-MM-DD expected in query, sample value: 2020-05-02 |
to | string | Gets the snapshots that end on this date only.
Date format: YYYY-MM-DD expected in query, sample value: 2020-05-02 |
Expected response codes
200 | ok |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v1/kpi-snapshots?ids=5e8c27e3dcdddaa4addbdee8,5e8ed44adcddda0da9eab365&groupIds=string&ungrouped=undefined&mykpis=undefined&timeZone=UTC-2&groupBy=string&from=2020-05-02&to=2020-05-02' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v1/kpi-snapshots?ids=5e8c27e3dcdddaa4addbdee8,5e8ed44adcddda0da9eab365&groupIds=string&ungrouped=undefined&mykpis=undefined&timeZone=UTC-2&groupBy=string&from=2020-05-02&to=2020-05-02", "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.quantive.com/results/api/v1/kpi-snapshots"
requests.get(url, headers = headers)
Loads all kpis using filter, sort and projection expressions coming from the request body
Parameters
Name | Type | Description |
---|
Expected response codes
200 | kpisWithTotalCount |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v2/kpis' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
var settings = { "url": "https://app.quantive.com/results/api/v2/kpis", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.quantive.com/results/api/v2/kpis"
requests.get(url, headers = headers)
{
"count": 2,
"items": [
{
"accountId": "string value",
"aggregation": "string value",
"createdById": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"dateCreated": "string value",
"dateUpdated": "string value",
"description": "string value",
"formatting": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"groups": [
"string value 1",
"string value 2"
],
"id": "string value",
"insightLink": {
"fieldName": "string value",
"insightName": "string value",
"settings": [
{
"dynamicValues": [
{
"teamId": "ID",
"type": "DynamicValueType"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value",
"valueDisplayNameAsArray": [
"string value 1",
"string value 2"
]
}
],
"usedDataSourceBlueprintNames": [
"string value 1",
"string value 2"
]
},
"isOwner": false,
"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,
"sessionId": "string value",
"url": "string value"
}
],
"kpis": [
{
"access": "defaultAccess",
"accountId": "ID",
"aggregation": "string value",
"createdById": "ID",
"dateCreated": "string value",
"dateUpdated": "string value",
"description": "string value",
"groups": "IDs",
"id": "ID",
"mentions": "Mentions",
"modifiedById": "ID",
"name": "string value",
"obfuscated": false,
"ownerId": "ID",
"ownerIds": "IDs",
"targetOperator": "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",
"sessionId": "6093fdabd251f200015e8f92",
"tags": [
"tagResponse"
],
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"ownerPermissions": "OwnerPermission",
"parentId": "string value",
"permissions": [
"Permission"
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"projections": [
{
"createdById": "string",
"date": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"id": "string",
"modifiedById": "string",
"value": 2
}
],
"targetOperator": "string value"
}
],
"totalCount": 2
}
Loads all kpis using filter, sort and projection expressions coming from the request body and then loads the snapshots of these using the from,to,timeZone,groupBy queryParams
Parameters
Name | Type | Description |
---|
Expected response codes
200 | kpiSnapshotGroupsByKpiDto |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v2/kpis/snapshots' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
var settings = { "url": "https://app.quantive.com/results/api/v2/kpis/snapshots", "method": "GET", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
NOTE: You must install the module requests.
In a terminal window do: pip install requests
import requests, json
headers = { "Authorization" : "Bearer {token}", "gtmhub-accountId" : "{accountId}", "Content-Type" : "application/json" };
url = "https://app.quantive.com/results/api/v2/kpis/snapshots"
requests.get(url, headers = headers)
{}
Gets an existing KPI by its unique identifier (id).
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
kpiId * | string | The unique identifier (id) of the KPI. expected in path
|
formatting | string | The formatting used for the description.
By default it is returned as 'mentionsMarkup' and it can contain markdown and special markup for mentioned people.
Use 'plainText' if you want the response without markdown and special markup. expected in query, sample value: string |
Expected response codes
200 | kpi |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v1/kpis/{kpiId}?formatting=string' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}?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.quantive.com/results/api/v1/kpis/{kpiId}"
requests.get(url, headers = headers)
{
"accountId": "string value",
"aggregation": "string value",
"createdById": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"dateCreated": "string value",
"dateUpdated": "string value",
"description": "string value",
"formatting": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"groups": [
"string value 1",
"string value 2"
],
"id": "string value",
"insightLink": {
"fieldName": "string value",
"insightName": "string value",
"settings": [
{
"dynamicValues": [
{
"teamId": "string",
"type": "string"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value",
"valueDisplayNameAsArray": [
"string value 1",
"string value 2"
]
}
],
"usedDataSourceBlueprintNames": [
"string value 1",
"string value 2"
]
},
"isOwner": false,
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"ownerPermissions": "OwnerPermission",
"permissions": [
"Permission"
]
},
"accountId": "string value",
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dateDeactivated": "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",
"dateDeactivated": "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,
"sessionId": "string value",
"url": "string value"
}
],
"kpis": [
{
"access": {
"inherits": false,
"ownerPermissions": "OwnerPermission",
"permissions": [
"Permission"
]
},
"accountId": "string",
"aggregation": "string value",
"createdById": "string",
"dateCreated": "string value",
"dateUpdated": "string value",
"description": "string value",
"groups": [
"ID"
],
"id": "string",
"mentions": {},
"modifiedById": "string",
"name": "string value",
"obfuscated": false,
"ownerId": "string",
"ownerIds": [
"ID"
],
"targetOperator": "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": {},
"sessionId": "6093fdabd251f200015e8f92",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"items": [
"tagResponse"
],
"name": "string value",
"title": "string value"
}
],
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"ownerPermissions": {
"deny": "Binary",
"grant": "Binary"
},
"parentId": "string value",
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"projections": [
{
"createdById": "string",
"date": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"id": "string",
"modifiedById": "string",
"value": 2
}
],
"targetOperator": "string value"
}
Gets all Projections for an existing Kpi.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
200 | KpiProjectionsResponse |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v1/kpis/{kpiId}/projections' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}/projections", "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.quantive.com/results/api/v1/kpis/{kpiId}/projections"
requests.get(url, headers = headers)
{
"items": [
{
"date": "string value",
"id": "string value",
"value": 2
}
],
"totalCount": 2
}
Gets an existing KPI statistics by its unique identifier (id).
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
type * | string | Specifies the period type to be used for the statistics
"week" | "month" | "three-months" | "year" | "all-time" expected in query, sample value: week |
timeZone | string | Specifies timezone offset it defaults to UTC
timeZone format: UTC-X or UTC+X expected in query, sample value: UTC+1 |
Expected response codes
200 | KpiStatisticsDto |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X GET 'https://app.quantive.com/results/api/v1/kpis/{kpiId}/statistics?type=week&timeZone=UTC+1' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}/statistics?type=week&timeZone=UTC+1", "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.quantive.com/results/api/v1/kpis/{kpiId}/statistics"
requests.get(url, headers = headers)
{
"currentPeriod": {
"deltaPercentage": 0.6,
"value": 150
},
"nextProjection": {
"deltaPercentage": 0.6,
"value": 150
},
"previousPeriod": {
"deltaPercentage": 0.6,
"value": 150
}
}
Creates a new KPI.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
createKpiRequest * | object | This object represents the attributes of a KPI to be created. expected in body, sample value: { "aggregation": "average", "description": "The average number of new customers per day in a given time period.", "formatting": { "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "groups": [ "string value 1", "string value 2" ], "groupsOrder": "{'group1_id': 2, 'group2_id': 5}", "insight": { "fieldName": "string value", "insightName": "string value", "insightValue": 2, "settings": [ { "dynamicValues": [ { "teamId": "string", "type": "string" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value", "valueDisplayNameAsArray": [ "string value 1", "string value 2" ] } ], "usedDataSourceBlueprintNames": [ "string value 1", "string value 2" ] }, "name": "New Customers per Day", "ownerId": "5e8ed44adcddda0da9eab365", "ownerIds": [ "5e8ed44adcddda0da9eab365", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "targetOperator": "should_increase" } |
Expected response codes
201 | kpi |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
500 | internal server error |
curl -X POST 'https://app.quantive.com/results/api/v1/kpis' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"aggregation":"average","description":"The average number of new customers per day in a given time period.","formatting":{"fractionSize":2,"prefix":"string value","suffix":"string value"},"groups":["string value 1","string value 2"],"groupsOrder":"{'group1_id': 2, 'group2_id': 5}","insight":{"fieldName":"string value","insightName":"string value","insightValue":2,"settings":[{"dynamicValues":[{"teamId":"string","type":"string"}],"name":"string value","value":"string value","valueDisplayName":"string value","valueDisplayNameAsArray":["string value 1","string value 2"]}],"usedDataSourceBlueprintNames":["string value 1","string value 2"]},"name":"New Customers per Day","ownerId":"5e8ed44adcddda0da9eab365","ownerIds":["5e8ed44adcddda0da9eab365","60b0d2c59bd8a6aff9b639ee","60b0d2de9bd8a6aff9b639f0"],"targetOperator":"should_increase"}'
var body ={ "aggregation": "average", "description": "The average number of new customers per day in a given time period.", "formatting": { "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "groups": [ "string value 1", "string value 2" ], "groupsOrder": "{'group1_id': 2, 'group2_id': 5}", "insight": { "fieldName": "string value", "insightName": "string value", "insightValue": 2, "settings": [ { "dynamicValues": [ { "teamId": "string", "type": "string" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value", "valueDisplayNameAsArray": [ "string value 1", "string value 2" ] } ], "usedDataSourceBlueprintNames": [ "string value 1", "string value 2" ] }, "name": "New Customers per Day", "ownerId": "5e8ed44adcddda0da9eab365", "ownerIds": [ "5e8ed44adcddda0da9eab365", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "targetOperator": "should_increase" };
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis", "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.quantive.com/results/api/v1/kpis"
body = { "aggregation": "average", "description": "The average number of new customers per day in a given time period.", "formatting": { "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "groups": [ "string value 1", "string value 2" ], "groupsOrder": "{'group1_id': 2, 'group2_id': 5}", "insight": { "fieldName": "string value", "insightName": "string value", "insightValue": 2, "settings": [ { "dynamicValues": [ { "teamId": "string", "type": "string" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value", "valueDisplayNameAsArray": [ "string value 1", "string value 2" ] } ], "usedDataSourceBlueprintNames": [ "string value 1", "string value 2" ] }, "name": "New Customers per Day", "ownerId": "5e8ed44adcddda0da9eab365", "ownerIds": [ "5e8ed44adcddda0da9eab365", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "targetOperator": "should_increase" };
requests.post(url, data=json.dumps(body), headers = headers)
{
"accountId": "string value",
"aggregation": "string value",
"createdById": "string value",
"currentUserAllowedActions": [
"string value 1",
"string value 2"
],
"dateCreated": "string value",
"dateUpdated": "string value",
"description": "string value",
"formatting": {
"fractionSize": 2,
"prefix": "string value",
"suffix": "string value"
},
"groups": [
"string value 1",
"string value 2"
],
"id": "string value",
"insightLink": {
"fieldName": "string value",
"insightName": "string value",
"settings": [
{
"dynamicValues": [
{
"teamId": "string",
"type": "string"
}
],
"name": "string value",
"value": "string value",
"valueDisplayName": "string value",
"valueDisplayNameAsArray": [
"string value 1",
"string value 2"
]
}
],
"usedDataSourceBlueprintNames": [
"string value 1",
"string value 2"
]
},
"isOwner": false,
"links": {
"expanded": {
"goals": [
{
"access": {
"inherits": false,
"ownerPermissions": "OwnerPermission",
"permissions": [
"Permission"
]
},
"accountId": "string value",
"assignee": {
"accountId": "string value",
"avatar": "string value",
"color": "string value",
"dateDeactivated": "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",
"dateDeactivated": "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,
"sessionId": "string value",
"url": "string value"
}
],
"kpis": [
{
"access": {
"inherits": false,
"ownerPermissions": "OwnerPermission",
"permissions": [
"Permission"
]
},
"accountId": "string",
"aggregation": "string value",
"createdById": "string",
"dateCreated": "string value",
"dateUpdated": "string value",
"description": "string value",
"groups": [
"ID"
],
"id": "string",
"mentions": {},
"modifiedById": "string",
"name": "string value",
"obfuscated": false,
"ownerId": "string",
"ownerIds": [
"ID"
],
"targetOperator": "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": {},
"sessionId": "6093fdabd251f200015e8f92",
"tags": [
{
"createdBy": "ID",
"dateCreated": "string value",
"id": "string value",
"isActive": false,
"items": [
"tagResponse"
],
"name": "string value",
"title": "string value"
}
],
"target": 100,
"targetOperator": "at_least"
}
],
"sessions": [
{
"accountId": "string value",
"end": "string value",
"id": "string value",
"inherits": false,
"ownerPermissions": {
"deny": "Binary",
"grant": "Binary"
},
"parentId": "string value",
"permissions": [
{
"grant": "Binary",
"principalId": "ID",
"principalKind": "string value"
}
],
"start": "string value",
"status": "string value",
"title": "string value"
}
]
}
},
"modifiedById": "string value",
"name": "string value",
"ownerId": "string value",
"ownerIds": [
"string value 1",
"string value 2"
],
"projections": [
{
"createdById": "string",
"date": "string value",
"dateCreated": "string value",
"dateModified": "string value",
"id": "string",
"modifiedById": "string",
"value": 2
}
],
"targetOperator": "string value"
}
Creates a new Projection for the specified KPI.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
createKpiProjectionRequest * | object | This object represents the attributes of a KPI Projection to be created. expected in body, sample value: { "date": "2006-01-02", "value": 5 } |
Expected response codes
201 | KpiProjectionDto |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
409 | conflict |
500 | internal server error |
curl -X POST 'https://app.quantive.com/results/api/v1/kpis/{kpiId}/projections' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"date":"2006-01-02","value":5}'
var body ={ "date": "2006-01-02", "value": 5 };
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}/projections", "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.quantive.com/results/api/v1/kpis/{kpiId}/projections"
body = { "date": "2006-01-02", "value": 5 };
requests.post(url, data=json.dumps(body), headers = headers)
{
"date": "string value",
"id": "string value",
"value": 2
}
Creates a new snapshot for an existing KPI.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
kpiId * | string | The unique identifier (id) of the KPI. expected in path
|
kpiSnapshotRequest * | object | This object represents the snapshot of the KPI. expected in body, sample value: { "group": "2022-W36", "timeZone": "UTC+3", "value": 5 } |
Expected response codes
200 | resource created response |
201 | created |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X POST 'https://app.quantive.com/results/api/v1/kpis/{kpiId}/snapshots' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"group":"2022-W36","timeZone":"UTC+3","value":5}'
var body ={ "group": "2022-W36", "timeZone": "UTC+3", "value": 5 };
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}/snapshots", "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.quantive.com/results/api/v1/kpis/{kpiId}/snapshots"
body = { "group": "2022-W36", "timeZone": "UTC+3", "value": 5 };
requests.post(url, data=json.dumps(body), headers = headers)
Add/Remove a virtual KPI group to/from favorites of the current user.
Parameters
Name | Type | Description |
---|
Expected response codes
200 | ok |
400 | bad request |
401 | unauthorized |
404 | not found |
500 | internal server error |
curl -X PUT 'https://app.quantive.com/results/api/v1/users/kpi-virtual-group/favorite' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
var settings = { "url": "https://app.quantive.com/results/api/v1/users/kpi-virtual-group/favorite", "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.quantive.com/results/api/v1/users/kpi-virtual-group/favorite"
requests.put(url, headers = headers)
Partially updates the KPI with the specified unique identifier (id).
Updates the KPI's attributes that are specified in the KPI request body only.
The attributes that are not specified in the KPI request body will not be updated.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
kpiId * | string | The unique identifier (id) of the KPI. expected in path
|
updateKpiRequest * | object | This object represents the attributes of a KPI to be updated. expected in body, sample value: { "aggregation": "average", "description": "string value", "formatting": { "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "groups": [ "60b0d2d09bd8a6aff9b639ef", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "groupsOrder": "{'group1_id': 2, 'group2_id': 5}", "insight": { "Present": false, "Value": { "fieldName": "string value", "insightName": "string value", "insightValue": 2, "settings": [ { "dynamicValues": [ { "teamId": "ID", "type": "DynamicValueType" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value", "valueDisplayNameAsArray": [ "string value 1", "string value 2" ] } ], "usedDataSourceBlueprintNames": [ "string value 1", "string value 2" ] } }, "name": "string value", "ownerId": "5e8ed44adcddda0da9eab365", "ownerIds": [ "5e8ed44adcddda0da9eab365", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "targetOperator": "should_increase" } |
Expected response codes
200 | ok |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X PATCH 'https://app.quantive.com/results/api/v1/kpis/{kpiId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"aggregation":"average","description":"string value","formatting":{"fractionSize":2,"prefix":"string value","suffix":"string value"},"groups":["60b0d2d09bd8a6aff9b639ef","60b0d2c59bd8a6aff9b639ee","60b0d2de9bd8a6aff9b639f0"],"groupsOrder":"{'group1_id': 2, 'group2_id': 5}","insight":{"Present":false,"Value":{"fieldName":"string value","insightName":"string value","insightValue":2,"settings":[{"dynamicValues":[{"teamId":"ID","type":"DynamicValueType"}],"name":"string value","value":"string value","valueDisplayName":"string value","valueDisplayNameAsArray":["string value 1","string value 2"]}],"usedDataSourceBlueprintNames":["string value 1","string value 2"]}},"name":"string value","ownerId":"5e8ed44adcddda0da9eab365","ownerIds":["5e8ed44adcddda0da9eab365","60b0d2c59bd8a6aff9b639ee","60b0d2de9bd8a6aff9b639f0"],"targetOperator":"should_increase"}'
var body ={ "aggregation": "average", "description": "string value", "formatting": { "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "groups": [ "60b0d2d09bd8a6aff9b639ef", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "groupsOrder": "{'group1_id': 2, 'group2_id': 5}", "insight": { "Present": false, "Value": { "fieldName": "string value", "insightName": "string value", "insightValue": 2, "settings": [ { "dynamicValues": [ { "teamId": "ID", "type": "DynamicValueType" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value", "valueDisplayNameAsArray": [ "string value 1", "string value 2" ] } ], "usedDataSourceBlueprintNames": [ "string value 1", "string value 2" ] } }, "name": "string value", "ownerId": "5e8ed44adcddda0da9eab365", "ownerIds": [ "5e8ed44adcddda0da9eab365", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "targetOperator": "should_increase" };
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}", "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.quantive.com/results/api/v1/kpis/{kpiId}"
body = { "aggregation": "average", "description": "string value", "formatting": { "fractionSize": 2, "prefix": "string value", "suffix": "string value" }, "groups": [ "60b0d2d09bd8a6aff9b639ef", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "groupsOrder": "{'group1_id': 2, 'group2_id': 5}", "insight": { "Present": false, "Value": { "fieldName": "string value", "insightName": "string value", "insightValue": 2, "settings": [ { "dynamicValues": [ { "teamId": "ID", "type": "DynamicValueType" } ], "name": "string value", "value": "string value", "valueDisplayName": "string value", "valueDisplayNameAsArray": [ "string value 1", "string value 2" ] } ], "usedDataSourceBlueprintNames": [ "string value 1", "string value 2" ] } }, "name": "string value", "ownerId": "5e8ed44adcddda0da9eab365", "ownerIds": [ "5e8ed44adcddda0da9eab365", "60b0d2c59bd8a6aff9b639ee", "60b0d2de9bd8a6aff9b639f0" ], "targetOperator": "should_increase" };
requests.patch(url, data=json.dumps(body), headers = headers)
Partially updates the Projection with the specified unique identifier (id).
Updates the Projection's attributes that are specified in the Projection request body only.
The attributes that are not specified in the Projection request body will not be updated.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
patchKpiProjectionRequest * | object | This object represents the attributes of a KPI Projection to be updated. expected in body, sample value: { "date": "2006-01-02", "value": 5 } |
Expected response codes
204 | no content |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X PATCH 'https://app.quantive.com/results/api/v1/kpis/{kpiId}/projections/{projectionId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"date":"2006-01-02","value":5}'
var body ={ "date": "2006-01-02", "value": 5 };
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}/projections/{projectionId}", "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.quantive.com/results/api/v1/kpis/{kpiId}/projections/{projectionId}"
body = { "date": "2006-01-02", "value": 5 };
requests.patch(url, data=json.dumps(body), headers = headers)
Deletes an existing KPI and its snapshots.
No request object required.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
kpiId * | string | The unique identifier (id) of the KPI. expected in path
|
Expected response codes
204 | no content |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X DELETE 'https://app.quantive.com/results/api/v1/kpis/{kpiId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}", "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.quantive.com/results/api/v1/kpis/{kpiId}"
requests.delete(url, headers = headers)
Deletes an existing Projection.
No request object required.
Parameters
Name | Type | Description |
---|---|---|
gtmhub-accountId * | string | The unique identifier (id) of the Quantive Results account. expected in header, sample value: 5be26318e5274a0007f17f61 |
Expected response codes
204 | no content |
400 | bad request |
401 | unauthorized |
402 | payment required |
403 | forbidden |
404 | not found |
500 | internal server error |
curl -X DELETE 'https://app.quantive.com/results/api/v1/kpis/{kpiId}/projections/{projectionId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}/projections/{projectionId}", "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.quantive.com/results/api/v1/kpis/{kpiId}/projections/{projectionId}"
requests.delete(url, headers = headers)
Delete KPI snapshot for a given KPI .
Parameters
Name | Type | Description |
---|
Expected response codes
curl -X DELETE 'https://app.quantive.com/results/api/v1/kpis/{kpiId}/snapshots/{snapshotId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
var settings = { "url": "https://app.quantive.com/results/api/v1/kpis/{kpiId}/snapshots/{snapshotId}", "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.quantive.com/results/api/v1/kpis/{kpiId}/snapshots/{snapshotId}"
requests.delete(url, headers = headers)
Oops! Looks like there are no API calls of that type for this Endpoint