APIs to manage use groups.
- Create role
Access Management API (v3)
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/permissions
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/permissions
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api-ext-sboxmeta.partners.spotnana.com/v3/permissions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK
List of available permissions.
Permission
Description of the permission.
{ "permissions": [ { … } ] }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/companies/{companyId}/permissions
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/companies/{companyId}/permissions
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093947/permissions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK
List of available permissions.
Permission
Description of the permission.
{ "permissions": [ { … } ] }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/companies/{companyId}/roles
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/companies/{companyId}/roles
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093947/roles \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"searchText": "Admin",
"pagination": {
"offset": 0,
"limit": 100
},
"sortParams": {
"sortBy": "NAME",
"sortOrder": "DESC"
},
"filters": [
{
"roleIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"roleProvidedBy": [
"PLATFORM"
]
}
]
}'OK
Roles matching with the request.
A short description of the role mentioning what can it do.
Whether role is platform provided.
Company ID which owns the role.
Permissions granted to the role.
Permission
Date and time when the role was created.
Date and time when the role was last updated.
User who created the role.
{ "roles": [ { … } ], "pagination": { "totalNumResults": 0 } }
A short description of the role mentioning what can it do.
Company ID which owns the role.
Permissions granted to the role.
Permission
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/roles
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/roles
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v3/roles \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "User Admin",
"description": "Manage users for the company.",
"isPlatformRole": false,
"companyId": "1aeef911-44cf-49bb-83c7-e06b0d4e7ac2",
"permissions": [
{
"permission": "COMPANY_MANAGEMENT",
"actions": [
"READ",
"WRITE"
]
}
]
}'{ "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3" }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/roles/{roleId}
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/roles/{roleId}
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api-ext-sboxmeta.partners.spotnana.com/v3/roles/4974a66b-7493-4f41-908c-58ba81093947 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'OK
A short description of the role mentioning what can it do.
Company ID which owns the role.
Permissions granted to the role.
Permission
Date and time when the role was created.
Date and time when the role was last updated.
User who created the role.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "User Admin", "description": "Manage users for the company.", "isPlatformRole": false, "companyId": "1aeef911-44cf-49bb-83c7-e06b0d4e7ac2", "permissions": [ { … } ], "createdAt": { "iso8601": "2017-07-21T17:32Z" }, "updatedAt": { "iso8601": "2017-07-21T17:32Z" }, "createdBy": { "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3", "name": "Name" }, "updatedBy": { "id": "b93dc51f-12dd-46c7-b7d6-1cb12cd3f5b3", "name": "Name" } }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/roles/{roleId}
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/roles/{roleId}
- curl
- JavaScript
- Node.js
- Python
curl -i -X DELETE \
https://api-ext-sboxmeta.partners.spotnana.com/v3/roles/4974a66b-7493-4f41-908c-58ba81093947 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'A short description of the role mentioning what can it do.
Permissions granted to the role.
Permission
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/roles/{roleId}
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/roles/{roleId}
- curl
- JavaScript
- Node.js
- Python
curl -i -X PUT \
https://api-ext-sboxmeta.partners.spotnana.com/v3/roles/4974a66b-7493-4f41-908c-58ba81093947 \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "User Admin",
"description": "Manage users for the company.",
"permissions": [
{
"permission": "COMPANY_MANAGEMENT",
"actions": [
"READ",
"WRITE"
]
}
]
}'Request
Returns the applicable scope predicate types and their permitted values for the selected roles within a company.
List of selected role identifiers.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/companies/{companyId}/roles/applicable-scopes
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/companies/{companyId}/roles/applicable-scopes
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093947/roles/applicable-scopes \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"roleIds": [
"1aeef911-44cf-49bb-83c7-e06b0d4e7ac2"
],
"selectedAudience": {
"predicates": [
{
"type": "PLATFORM",
"value": false
}
]
}
}'{ "applicableScopes": [ { … } ] }
Pagination information for request.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/companies/{companyId}/user-groups/{groupId}/roles
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/companies/{companyId}/user-groups/{groupId}/roles
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093653/user-groups/4974a66b-7493-4f41-908c-58ba81093947/roles \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"searchText": "Admin",
"pagination": {
"offset": 0,
"limit": 100
},
"sortParams": {
"sortBy": "NAME",
"sortOrder": "DESC"
},
"filters": [
{
"roleIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"roleProvidedBy": [
"PLATFORM"
]
}
]
}'OK
Roles assigned to the group matching with the request.
Role information.
A short description of the role mentioning what can it do.
Whether role is platform provided.
Company ID which owns the role.
Permissions granted to the role.
Permission
Date and time when the role was created.
Date and time when the role was last updated.
User who created the role.
The set of resources or the resource group that the role applies to.
{ "roles": [ { … } ], "pagination": { "totalNumResults": 0 } }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/companies/{companyId}/user-groups/{groupId}/roles
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/companies/{companyId}/user-groups/{groupId}/roles
- curl
- JavaScript
- Node.js
- Python
curl -i -X PATCH \
https://api-ext-sboxmeta.partners.spotnana.com/v3/companies/1234a66b-7493-4f41-908c-58ba81093653/user-groups/4974a66b-7493-4f41-908c-58ba81093947/roles \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"rolesToAdd": [],
"rolesToDelete": []
}'- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/users/{userId}/roles
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/users/{userId}/roles
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v3/users/1234a66b-7493-4f41-908c-58ba81093947/roles \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"searchText": "Admin",
"pagination": {
"offset": 0,
"limit": 100
},
"sortParams": {
"sortBy": "NAME",
"sortOrder": "DESC"
},
"filters": [
{
"roleIds": [
"497f6eca-6276-4993-bfeb-53cbbbba6f08"
],
"roleProvidedBy": [
"PLATFORM"
]
}
]
}'OK
Roles assigned to the user matching with the request.
Role information.
A short description of the role mentioning what can it do.
Whether role is platform provided.
Company ID which owns the role.
Permissions granted to the role.
Permission
Date and time when the role was created.
Date and time when the role was last updated.
User who created the role.
The set of resources or the resource group that the role applies to.
{ "roles": [ { … } ], "pagination": { "totalNumResults": 0 } }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/users/{userId}/roles
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/users/{userId}/roles
- curl
- JavaScript
- Node.js
- Python
curl -i -X PATCH \
https://api-ext-sboxmeta.partners.spotnana.com/v3/users/1234a66b-7493-4f41-908c-58ba81093947/roles \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"rolesToAdd": [],
"rolesToDelete": []
}'Unique identifier of the entity.
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/users/{userId}/entity-permissions
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/users/{userId}/entity-permissions
- curl
- JavaScript
- Node.js
- Python
curl -i -X POST \
https://api-ext-sboxmeta.partners.spotnana.com/v3/users/f49d00fe-1eda-4304-ba79-a980f565281d/entity-permissions \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"entityId": "4974a66b-7493-4f41-908c-58ba81093947",
"entityType": "LEGAL_ENTITY"
}'List of permissions user has on the entity.
List of permissions user has on the entity.
Permission
{ "permissions": [ { … } ] }
- Sandbox URLhttps://api-ext-sboxmeta.partners.spotnana.com/v3/users/{userId}/rbac-info
- Spotnana mock serverhttps://developer.spotnana.com/_mock/openapi/rbacapi/v3/users/{userId}/rbac-info
- curl
- JavaScript
- Node.js
- Python
curl -i -X GET \
https://api-ext-sboxmeta.partners.spotnana.com/v3/users/1234a66b-7493-4f41-908c-58ba81093947/rbac-info \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>'RBAC info for the user.
Flag indicating whether user has access to trips of other travelers.
List of permissions with their associated actions for the user.
Permission
{ "hasOthersTripAccess": true, "permissions": [ { … } ] }