Skip to main content

Roles Endpoints

This feature includes endpoints related to activities you can perform for Role management (Roles) within the StackSpot EDP Platform.

MethodEndpointDescriptionParametersResponses
GET/scim/RolesGet All RolesX-Tenant-Id: string (header)200: OK
POST/scim/RolesCreate a new roleX-Tenant-Id: string (header), body: Create Role201: Created
PUT/scim/Roles/{id}Update RolesX-Tenant-Id: string (header), body: Update Role200: OK
DELETE/scim/Roles/{id}Delete RoleX-Tenant-Id: string (header)204: No Content
PATCH/scim/Roles/{id}Patch Operation RoleX-Tenant-Id: string (header), body: Patch Operation Role200: OK

Response Definitions

domain.CreateRole

FieldTypeRequired
claim_mapperobject (additionalProperties: string)No
client_idstringNo
descriptionstringNo
idstringNo
namestringYes
permissionsarray of stringNo
statementsarray of object (actions, resource)No

domain.RoleAttributes

FieldTypeRequired
claim_mapperobjectNo
client_idstringNo
created_atstringNo
descriptionstringNo
idstringYes
member_countintegerNo
namestringYes
permissionsarrayNo

domain.RoleDomain

FieldTypeRequired
attributesobjectYes
externalIDobjectNo
idstringYes
metaobjectYes
schemasarrayYes

domain.RolePageDomain

FieldTypeRequired
resourcesarrayYes
totalResultsintegerYes

domain.RolePatchOperation

FieldTypeRequired
OperationsarrayYes
schemasstringYes

domain.UpdateRole

FieldTypeRequired
claim_mapperobjectNo
client_idstringNo
descriptionstringNo
namestringYes
permissionsarrayNo

Example Response

GET /tenant-id/scim/Roles Get all Roles

Here you find an example of the API response for the endpoint GET /tenant-id/scim/Roles Get all Roles.

Request:

GET /tenant-id/scim/Roles Get all Roles

Header:
Authorization: Bearer token

Response:

Status-Code 200: {
"Resources": [
{
"claim_mapper": null,
"client_id": null,
"description": "This is a sample description",
"id": "3730c727-7da6-4552-8fa1-5872b77923c8",
"meta": {
"resourceType": "Role",
"created": "2024-05-27T17:10:49Z",
"location": "Roles/3730c727-7da6-4552-8fa1-5872b77923c8"
},
"name": "Scim Sample Resource",
"permissions": [
{
"id": "0801065f-e11b-41cc-b4d9-976aa230b8c1",
"name": "custom_cloud_only",
"description": "Auto Generated To rbac.Role custom_cloud_only",
"created_at": "2024-04-18T18:05:30.751155Z"
},
{
"id": "ab3ebad8-ce8f-4504-b1a3-3e7c71757ed9",
"name": "Scim Sample Resource",
"description": "Auto Generated To rbac.Role Scim Sample Resource",
"created_at": "2024-05-27T17:10:49.940873Z"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Roles"
]
}
],
"itemsPerPage": 100,
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"startIndex": 1,
"totalResults": 1
}

POST /tenant-id/scim/Roles Create Roles

Here you find an example of the API response for the endpoint POST /tenant-id/scim/Roles Create Roles.

Request:

POST /tenant-id/scim/Roles Create Roles

Header:
Authorization: Bearer token

Response:

Status-Code 201: {
"claim_mapper": null,
"client_id": null,
"description": "This is a sample description",
"id": "7504c9ec-c3b9-4cc6-90c6-1fe22d64c75e",
"meta": {
"resourceType": "Role",
"created": "2024-05-31T13:25:24Z",
"location": "Roles/7504c9ec-c3b9-4cc6-90c6-1fe22d64c75e"
},
"name": "Scim Sample Resource",
"permissions": [
{
"id": "0801065f-e11b-41cc-b4d9-976aa230b8c1",
"name": "Example Permission",
"description": "Example Description",
"created_at": "2024-05-31T13:25:24.725789182Z"
},
{
"id": "e3c6cd3c-00bc-428c-9840-37bee2cd52bf",
"name": "Example Permission",
"description": "Example Description",
"created_at": "2024-05-31T13:25:24.725789182Z"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Roles"
]
}

GET /tenant-id/scim/Roles/\{id} Get Roles By Id

Here you find an example of the API response for the endpoint GET /tenant-id/scim/Roles/\{id} Get Roles By Id.

Request:

GET /tenant-id/scim/Roles/\{id} Get Roles By Id

Header:
Authorization: Bearer token

Response:

Status-Code 200: {
"claim_mapper": null,
"client_id": null,
"description": "This is a sample description",
"id": "7504c9ec-c3b9-4cc6-90c6-1fe22d64c75e",
"meta": {
"resourceType": "Role",
"created": "2024-05-31T13:25:24Z",
"location": "Roles/7504c9ec-c3b9-4cc6-90c6-1fe22d64c75e"
},
"name": "Scim Sample Resource",
"permissions": [
{
"id": "0801065f-e11b-41cc-b4d9-976aa230b8c1",
"name": "custom_cloud_only",
"description": "Auto Generated To rbac.Role custom_cloud_only",
"statements": [
{
"resource": {
"id": "6cd587eb-fa8a-4397-86b2-6d68a99ca119",
"name": "All",
"slug": "*",
"type": {
"id": "d48d6ebf-4f50-4652-abd4-daf2366937fa",
"name": "example",
"slug": "example",
"actions": null,
"description": "example",
"created_at": "0001-01-01T00:00:00Z"
},
"description": "Allow to perform action on all Workspace resources",
"created_at": "2023-12-28T17:07:51.828206Z"
},
"actions": [
{
"id": "49acdb01-19dc-4d60-bb5b-cba9cc41aba6",
"name": "update",
"description": "Update",
"created_at": "2023-12-28T17:07:51.828206Z"
}
]
}
],
"created_at": "2024-04-18T18:05:30.751155Z"
},
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Roles"
]
}

PUT /tenant-id/scim/Roles/\{id} Update Roles

Here you find an example of the API response for the endpoint PUT /tenant-id/scim/Roles/\{id} Update Roles.

Request:

PUT /tenant-id/scim/Roles/\{id} Update Roles

Header:
Authorization: Bearer token

Response:

Status-Code 200: {
"claim_mapper": null,
"client_id": null,
"description": "This is a sample description",
"id": "7504c9ec-c3b9-4cc6-90c6-1fe22d64c75e",
"meta": {
"resourceType": "Role",
"created": "2024-05-31T13:25:24Z",
"location": "Roles/7504c9ec-c3b9-4cc6-90c6-1fe22d64c75e"
},
"name": "Scim Sample Resource",
"permissions": [
{
"id": "0801065f-e11b-41cc-b4d9-976aa230b8c1",
"name": "custom_cloud_only",
"description": "Auto Generated To rbac.Role custom_cloud_only",
"statements": [
{
"resource": {
"id": "6cd587eb-fa8a-4397-86b2-6d68a99ca119",
"name": "All",
"slug": "*",
"type": {
"id": "d48d6ebf-4f50-4652-abd4-daf2366937fa",
"name": "example",
"slug": "example",
"actions": null,
"description": "example",
"created_at": "0001-01-01T00:00:00Z"
},
"description": "Allow to perform action on all Workspace resources",
"created_at": "2023-12-28T17:07:51.828206Z"
},
"actions": [
{
"id": "49acdb01-19dc-4d60-bb5b-cba9cc41aba6",
"name": "update",
"description": "Update",
"created_at": "2023-12-28T17:07:51.828206Z"
}
]
}
],
"created_at": "2024-04-18T18:05:30.751155Z"
},
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Roles"
]
}

DELETE /tenant-id/scim/Roles/\{id} Remove Roles

Here you find an example of the API response for the endpoint DELETE /tenant-id/scim/Roles/\{id} Remove Roles.

Request:

DELETE /tenant-id/scim/Roles/\{id} Remove Roles

Header:
Authorization: Bearer token

Response:

Status-Code 204: NO BODY RESPONSE

PATCH /tenant-id/scim/Roles/\{id} Update Roles With Patch operation

Here you find an example of the API response for the endpoint PATCH /tenant-id/scim/Roles/\{id} Update Roles With Patch operation.

Request:

PATCH /tenant-id/scim/Roles/\{id} Update Roles With Patch operation

Header:
Authorization: Bearer token

Response:

Status-Code 200: {
"claim_mapper": null,
"client_id": null,
"description": "This is a sample description",
"id": "7504c9ec-c3b9-4cc6-90c6-1fe22d64c75e",
"meta": {
"resourceType": "Role",
"created": "2024-05-31T13:25:24Z",
"location": "Roles/7504c9ec-c3b9-4cc6-90c6-1fe22d64c75e"
},
"name": "Scim Sample Resource",
"permissions": [
{
"id": "0801065f-e11b-41cc-b4d9-976aa230b8c1",
"name": "custom_cloud_only",
"description": "Auto Generated To rbac.Role custom_cloud_only",
"statements": [
{
"resource": {
"id": "6cd587eb-fa8a-4397-86b2-6d68a99ca119",
"name": "All",
"slug": "*",
"type": {
"id": "d48d6ebf-4f50-4652-abd4-daf2366937fa",
"name": "example",
"slug": "example",
"actions": null,
"description": "example",
"created_at": "0001-01-01T00:00:00Z"
},
"description": "Allow to perform action on all Workspace resources",
"created_at": "2023-12-28T17:07:51.828206Z"
},
"actions": [
{
"id": "49acdb01-19dc-4d60-bb5b-cba9cc41aba6",
"name": "update",
"description": "Update",
"created_at": "2023-12-28T17:07:51.828206Z"
}
]
}
],
"created_at": "2024-04-18T18:05:30.751155Z"
},
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Roles"
]
}