Permissions endpoints

🔗
get
/permissions/actions
Gets all actions that the system protects with
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Quantive Results account.
expected in header, sample value:
5be26318e5274a0007f17f61
Expected response codes
200actionsResponseV2
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v2/permissions/actions' \ -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/v2/permissions/actions", "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/v2/permissions/actions"



requests.get(url, headers = headers)
{
    "items": [
        {
            "childPermissions": [
                "string value 1",
                "string value 2"
            ],
            "descriptionKey": "string value",
            "group": "string value",
            "groupKey": "string value",
            "name": "string value",
            "parentPermission": "string value",
            "prerequisitePermissions": [
                "string value 1",
                "string value 2"
            ],
            "product": "string value",
            "recommendedPermissions": [
                "string value 1",
                "string value 2"
            ],
            "requiredPermissions": [
                "string value 1",
                "string value 2"
            ],
            "subGroup": "string value",
            "titleKey": "string value"
        }
    ]
}
🔗
get
/permissions/allowed-actions/{targetType}
Gets allowed actions of the current user for specified targets. Targets can be metrics, goals, sessions or insight boards
Parameters
NameTypeDescription
Expected response codes
200allowedActionsV2
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v2/permissions/allowed-actions/{targetType}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.quantive.com/results/api/v2/permissions/allowed-actions/{targetType}", "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/permissions/allowed-actions/{targetType}"



requests.get(url, headers = headers)
{}
🔗
get
/permissions/currentUser-allowedActions/{targetId}
Gets allowed actions of the current user for specified target. Targets can be metrics, goals, sessions or insight boards
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Quantive Results account.
expected in header, sample value:
5be26318e5274a0007f17f61
targetId
*
stringSpecifying the ID of the target entity.
expected in path
targetType
*
stringType of the target you want to check permissions for for.Currently supported types are: metric,goal,session,insightBoard
expected in query, sample value:
string
Expected response codes
200allowedActions
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/currentUser-allowedActions/{targetId}?targetType=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/permissions/currentUser-allowedActions/{targetId}?targetType=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/permissions/currentUser-allowedActions/{targetId}"



requests.get(url, headers = headers)
{
    "currentUserActions": [
        "string value 1",
        "string value 2"
    ]
}
🔗
get
/permissions/default-access/{itemType}
Gets the default access permissions for the specified item type. Item type can be session or dashboard
Parameters
NameTypeDescription
Expected response codes
200defaultAccess
400bad request
401unauthorized
402payment required
403forbidden
404not found
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/default-access/{itemType}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.quantive.com/results/api/v1/permissions/default-access/{itemType}", "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/v1/permissions/default-access/{itemType}"



requests.get(url, headers = headers)
{
    "inherits": false,
    "ownerPermissions": {
        "deny": {
            "Subtype": 2
        },
        "grant": {
            "Subtype": 2
        }
    },
    "permissions": [
        {
            "grant": {
                "Subtype": 2
            },
            "principalId": "string",
            "principalKind": "string value"
        }
    ]
}
🔗
get
/permissions/default-access/{itemType}/{itemId}
Gets the default access permissions for the specified item. Item can be session or dashboard
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Quantive Results account.
expected in header, sample value:
5be26318e5274a0007f17f61
itemId
*
stringThe ID of the item whose default permissions set you are querying for.
expected in path
itemType
*
stringThe programmatic name of the item whose default permissions set you are querying for.
expected in path, sample value:
goal
Expected response codes
200defaultAccess
400bad request
401unauthorized
402payment required
403forbidden
404not found
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/default-access/{itemType}/{itemId}' \ -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/permissions/default-access/{itemType}/{itemId}", "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/permissions/default-access/{itemType}/{itemId}"



requests.get(url, headers = headers)
{
    "inherits": false,
    "ownerPermissions": {
        "deny": {
            "Subtype": 2
        },
        "grant": {
            "Subtype": 2
        }
    },
    "permissions": [
        {
            "grant": {
                "Subtype": 2
            },
            "principalId": "string",
            "principalKind": "string value"
        }
    ]
}
🔗
get
/permissions/effective
Gets the actions that are allowed for the current user.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
Expected response codes
200string message returned by the service
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/effective' \ -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/permissions/effective", "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/permissions/effective"



requests.get(url, headers = headers)
🔗
get
/permissions/effective-and-allowed-actions
Gets the actions that are allowed for the current user and allowed actions of the current user for specified targets. Targets can be metrics, goals, sessions or insight boards
Parameters
NameTypeDescription
Expected response codes
200effectivePermissionsAndAllowedActionsResponse
400bad request
401unauthorized
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/effective-and-allowed-actions' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.quantive.com/results/api/v1/permissions/effective-and-allowed-actions", "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/v1/permissions/effective-and-allowed-actions"



requests.get(url, headers = headers)
{
    "currentUserAllowedActions": {},
    "domain": "string value",
    "effectivePermissions": [
        "string value 1",
        "string value 2"
    ]
}
🔗
get
/permissions/principal/{id}
Gets effective permissions for the specified principal that could be either user or role id.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Quantive Results account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringThe ID of the principal (user or role).
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200string message returned by the service
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/principal/{id}' \ -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/permissions/principal/{id}", "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/permissions/principal/{id}"



requests.get(url, headers = headers)
🔗
get
/permissions/users-actions
Gets the actions that are allowed for the users ids provided.
Parameters
NameTypeDescription
Expected response codes
200usersResponse
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/users-actions' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.quantive.com/results/api/v1/permissions/users-actions", "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/v1/permissions/users-actions"



requests.get(url, headers = headers)
{
    "accessToken": "string value",
    "accountDomain": "string value",
    "edition": "string value",
    "idToken": "string value",
    "planId": "string value",
    "userId": "string value"
}
🔗
get
/permissions/{id}
Gets a permission by its id. A permission is a persistent object that specifies the combination of an allowed action and principal (user or role) id.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the permission id.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200GlobalPermissionDto
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/{id}' \ -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/permissions/{id}", "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/permissions/{id}"



requests.get(url, headers = headers)
{
    "accountId": "string value",
    "action": "string",
    "id": "string value",
    "principals": [
        "string value 1",
        "string value 2"
    ]
}
🔗
get
/permissions/{targetType}/{targetId}/users
Retrieves all users that have the specified action for the specified target
Parameters
NameTypeDescription
Expected response codes
200allUsersWithAction
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X GET 'https://app.quantive.com/results/api/v1/permissions/{targetType}/{targetId}/users' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.quantive.com/results/api/v1/permissions/{targetType}/{targetId}/users", "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/v1/permissions/{targetType}/{targetId}/users"



requests.get(url, headers = headers)
{
    "allUsersHaveTheAction": false,
    "userIds": [
        "string value 1",
        "string value 2"
    ]
}
🔗
post
/permissions
Creates a new permission in the system. A permission is a persistent object that specifies the combination of an allowed action and principal (user or role) id.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the unique identifier (id) of the Quantive Results account.
expected in header, sample value:
5be26318e5274a0007f17f61
permissionDto
*
objectPermission object.
expected in body, sample value:
{
    "accountId": "string value",
    "action": "string",
    "id": "string value",
    "principals": [
        "string value 1",
        "string value 2"
    ]
}
Expected response codes
201GlobalPermissionDto
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X POST 'https://app.quantive.com/results/api/v1/permissions' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"accountId":"string value","action":"string","id":"string value","principals":["string value 1","string value 2"]}'

var body ={ "accountId": "string value", "action": "string", "id": "string value", "principals": [ "string value 1", "string value 2" ] };

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

body = { "accountId": "string value", "action": "string", "id": "string value", "principals": [ "string value 1", "string value 2" ] };

requests.post(url, data=json.dumps(body), headers = headers)
{
    "accountId": "string value",
    "action": "string",
    "id": "string value",
    "principals": [
        "string value 1",
        "string value 2"
    ]
}
🔗
put
/permissions/principal/{id}
Updates the effective permissions for specified principal.
Parameters
NameTypeDescription
id
*
stringThe ID of the principal (user or role).
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
204no content
400bad request
401unauthorized
402payment required
403forbidden
405method not allowed
500internal server error

curl -X PUT 'https://app.quantive.com/results/api/v1/permissions/principal/{id}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \

var settings = { "url": "https://app.quantive.com/results/api/v1/permissions/principal/{id}", "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/permissions/principal/{id}"



requests.put(url, headers = headers)
🔗
put
/permissions/{id}
Updates a permission in the system. A permission is a persistent object that specifies the combination of an allowed action and principal (user or role) id.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the permission id.
expected in path, sample value:
5be26318e5274a0007f17f61
permissionDto
*
objectPermission object.
expected in body, sample value:
{
    "accountId": "string value",
    "action": "string",
    "id": "string value",
    "principals": [
        "string value 1",
        "string value 2"
    ]
}
Expected response codes
200GlobalPermissionDto
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X PUT 'https://app.quantive.com/results/api/v1/permissions/{id}' \ -H 'Content-Type: application/json' \ -H 'Accept: application/json' \ -H 'Authorization: Bearer {token}' \
-H 'gtmhub-accountId: 5be26318e5274a0007f17f61' \
-d '{"accountId":"string value","action":"string","id":"string value","principals":["string value 1","string value 2"]}'

var body ={ "accountId": "string value", "action": "string", "id": "string value", "principals": [ "string value 1", "string value 2" ] };

var settings = { "url": "https://app.quantive.com/results/api/v1/permissions/{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.quantive.com/results/api/v1/permissions/{id}"

body = { "accountId": "string value", "action": "string", "id": "string value", "principals": [ "string value 1", "string value 2" ] };

requests.put(url, data=json.dumps(body), headers = headers)
{
    "accountId": "string value",
    "action": "string",
    "id": "string value",
    "principals": [
        "string value 1",
        "string value 2"
    ]
}
🔗
delete
/permissions/{id}
Deletes a permission from the system. A permission is a persistent object that specifies the combination of an allowed action and principal (user or role) id.
Parameters
NameTypeDescription
gtmhub-accountId
*
stringSpecifies the id of the gtmhub account.
expected in header, sample value:
5be26318e5274a0007f17f61
id
*
stringSpecifies the permission id.
expected in path, sample value:
5be26318e5274a0007f17f61
Expected response codes
200ok
400bad request
401unauthorized
402payment required
403forbidden
500internal server error

curl -X DELETE 'https://app.quantive.com/results/api/v1/permissions/{id}' \ -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/permissions/{id}", "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/permissions/{id}"



requests.delete(url, headers = headers)