Dashboards endpoints

Dashboards is the programmatic name of Gtmhub Insightboards. All endpoints in this group enable you to work programmatically with the insightboards in your account. Note that the Perfromance and Process reports are also dashboards, and are covered by this API as well.

🔗
get
/dashboards
Loads all dashboards using filter, sort and projection expressions coming from the request body
Parameters
NameTypeDescription
Expected response codes
200dashboardsResponse
400bad request error message.
401unauthorized
402payment required
403forbidden
500internal server error message.

curl -X GET 'https://app.gtmhub.com/api/v2/dashboards' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

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



import requests, json

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

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



requests.get(url, headers = headers)
{}
🔗
get
/dashboards/reports
Gets Performance and Process reports in the specified account.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
Expected response codes
200reportDashboardResponse
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

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



requests.get(url, headers = headers)
{}
🔗
get
/dashboards/tag/{tag}
Gets all dashboards with the specified tag.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
tag
*
stringSpecifies the tag of the dashboard that is to be retrieved.
expected in path
Expected response codes
200dashboardResponse
400bad request
401unauthorized
402payment required
403forbidden
404not found
500internal server error

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



requests.get(url, headers = headers)
{}
🔗
get
/dashboards/tags/usages
Gets a list of tags applied to dashboards (Insightboards) and the corresponding dashboard IDs for each tag.
Dashboard tags that are not accessible for the current user are excluded from the list.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
fieldsstringIf you provide the fields parameter with a list of fields for the resource you are interested in separated by comas, only those fields will be returned in the document The 'id' and 'accountId' fields are needed to identify an object so they are always included. If any of the fields is a complex object with sub-fields you can specify which set to include using the 'parent-field-name{sub-field-names}' syntax.
expected in query, sample value:
name,createdById,metrics{name,attainment}
Expected response codes
200dashboardsTagsResponse
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.gtmhub.com/api/v1/dashboards/tags/usages?fields=name,createdById,metrics{name,attainment}' \ -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/dashboards/tags/usages?fields=name,createdById,metrics{name,attainment}", "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/dashboards/tags/usages"



requests.get(url, headers = headers)
{}
🔗
get
/dashboards/{dashboardId}
Gets a dashboard by its unique identifier (id).
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
dashboardId
*
stringSpecifies the unique identifier (id) of the dashboard.
expected in path
Expected response codes
200dashboardResponse
400bad request
401unauthorized
402payment required
403forbidden
404not found
500internal server error

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



requests.get(url, headers = headers)
{}
🔗
post
/dashboards
Creates a new dashboard.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
dashboard
*
Specifies the object representing a dashboard.
expected in body
Expected response codes
201dashboardResponse
400bad request
401unauthorized
402payment required
403forbidden
409conflict
500internal server error

curl -X POST 'https://app.gtmhub.com/api/v1/dashboards' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"dashboard":undefined}'

var body ='{"dashboard":undefined}'

var settings = { "url": "https://app.gtmhub.com/api/v1/dashboards", "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/dashboards"

body = undefined;

requests.post(url, data=json.dumps(body), headers = headers)
{}
🔗
post
/dashboards/{dashboardId}/clone
Clones an already existing dashboard.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
dashboardId
*
stringSpecifies the unique identifier (id) of the dashboard.
expected in path
tag
*
Specifies the dashboard tag for the cloned dashboard.
expected in body
Expected response codes
201dashboardResponse
400bad request
401unauthorized
402payment required
403forbidden
404not found
500internal server error

curl -X POST 'https://app.gtmhub.com/api/v1/dashboards/{dashboardId}/clone' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"tag":undefined}'

var body ='{"tag":undefined}'

var settings = { "url": "https://app.gtmhub.com/api/v1/dashboards/{dashboardId}/clone", "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/dashboards/{dashboardId}/clone"

body = undefined;

requests.post(url, data=json.dumps(body), headers = headers)
{}
🔗
put
/dashboards/items/{id}
Saves an insight (dashboardItem) on an insightboard (dashboard)
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
dashboardId
*
stringSpecifies the unique identifier (id) of the dashboard.
expected in path
dashboard
*
Specifies the object representing a dashboard.
expected in body
Expected response codes
204no content
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X PUT 'https://app.gtmhub.com/api/v1/dashboards/items/{id}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"dashboard":undefined}'

var body ='{"dashboard":undefined}'

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



import requests, json

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

url = "https://app.gtmhub.com/api/v1/dashboards/items/{id}"

body = undefined;

requests.put(url, data=json.dumps(body), headers = headers)
🔗
put
/dashboards/{dashboardId}
Updates the dashboard with the specified unique identifier (id).
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
dashboardId
*
stringSpecifies the unique identifier (id) of the dashboard.
expected in path
dashboard
*
Specifies the object representing a dashboard.
expected in body
Expected response codes
200dashboardResponse
400bad request
401unauthorized
402payment required
403forbidden
404not found
500internal server error

curl -X PUT 'https://app.gtmhub.com/api/v1/dashboards/{dashboardId}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"dashboard":undefined}'

var body ='{"dashboard":undefined}'

var settings = { "url": "https://app.gtmhub.com/api/v1/dashboards/{dashboardId}", "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/dashboards/{dashboardId}"

body = undefined;

requests.put(url, data=json.dumps(body), headers = headers)
{}
🔗
delete
/dashboards/{dashboardId}
Deletes the dashboard with the specified unique identifier (id).
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
dashboardId
*
stringSpecifies the unique identifier (id) of the dashboard.
expected in path
Expected response codes
204no content
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

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



requests.delete(url, headers = headers)