Dashboardparameters endpoints

Dashboardparameters is the Gtmhub API representation of Insightboard parameters, also knows as Insightboard filters. For more information about Insightboard parameters refer to our help article Create Insightboard parameters. With the endpoints in this group you can get, update or create new Insightboard parameters, which can then be used in your Gtmhub Insights.

🔗
get
/dashboards/parameters
Gets all dashboard parameters for the specified accountId.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
Expected response codes
200dashboardParameterResponse
401unauthorized

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



requests.get(url, headers = headers)
{
    "defaultValue": "string value",
    "entityName": "string value",
    "entityTitleField": "string value",
    "entityValueField": "string value",
    "id": "string value",
    "key": "string value",
    "predefinedValues": [
        "string value 1",
        "string value 2"
    ],
    "selectorType": "string value",
    "title": "string value"
}
🔗
get
/dashboards/parameters/{parameterId}
Gets a dashboard parameter definition.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
parameterId
*
stringSpecifies the unique identifier (id) of the dashboard parameter.
expected in path
Expected response codes
200dashboardParameterResponse
401unauthorized

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



requests.get(url, headers = headers)
{
    "defaultValue": "string value",
    "entityName": "string value",
    "entityTitleField": "string value",
    "entityValueField": "string value",
    "id": "string value",
    "key": "string value",
    "predefinedValues": [
        "string value 1",
        "string value 2"
    ],
    "selectorType": "string value",
    "title": "string value"
}
🔗
post
/dashboards/parameters
Creates a new dashboard parameter.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
Expected response codes
201dashboardParameterResponse
401unauthorized

curl -X POST 'https://app.gtmhub.com/api/v1/dashboards/parameters' \ -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/parameters", "method": "POST", "timeout": 0, "headers": { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Bearer {token}",
"gtmhub-accountId": "5be26318e5274a0007f17f61",
}
}; $.ajax(settings).done(function (response) { console.log(response); });
 NOTE: You must install the module requests.
In a terminal window do: pip install requests



import requests, json

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

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



requests.post(url, headers = headers)
{
    "defaultValue": "string value",
    "entityName": "string value",
    "entityTitleField": "string value",
    "entityValueField": "string value",
    "id": "string value",
    "key": "string value",
    "predefinedValues": [
        "string value 1",
        "string value 2"
    ],
    "selectorType": "string value",
    "title": "string value"
}
🔗
put
/dashboards/parameters/{parameterId}
Updates an already existing dashboard parameter.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
parameterId
*
stringSpecifies the unique identifier (id) of the dashboard parameter.
expected in path
Expected response codes
200dashboardParameterResponse
401unauthorized

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



requests.put(url, headers = headers)
{
    "defaultValue": "string value",
    "entityName": "string value",
    "entityTitleField": "string value",
    "entityValueField": "string value",
    "id": "string value",
    "key": "string value",
    "predefinedValues": [
        "string value 1",
        "string value 2"
    ],
    "selectorType": "string value",
    "title": "string value"
}
🔗
delete
/dashboards/parameters/{parameterId}
Deletes the specified dashboard parameter.
No request body required.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the ID of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
parameterId
*
stringSpecifies the unique identifier (id) of the dashboard parameter.
expected in path
Expected response codes
204no content
401unauthorized

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



requests.delete(url, headers = headers)