Roles Endpoints
This feature includes endpoints related to activities you can perform for Role management (Roles) within the StackSpot EDP Platform.
Method | Endpoint | Description | Parameters | Responses |
---|---|---|---|---|
GET | /scim/Roles | Get All Roles | X-Tenant-Id: string (header) | 200: OK |
POST | /scim/Roles | Create a new role | X-Tenant-Id: string (header), body: Create Role | 201: Created |
PUT | /scim/Roles/{id} | Update Roles | X-Tenant-Id: string (header), body: Update Role | 200: OK |
DELETE | /scim/Roles/{id} | Delete Role | X-Tenant-Id: string (header) | 204: No Content |
PATCH | /scim/Roles/{id} | Patch Operation Role | X-Tenant-Id: string (header), body: Patch Operation Role | 200: OK |
Response Definitions
domain.CreateRole
Field | Type | Required |
---|---|---|
claim_mapper | object (additionalProperties: string) | No |
client_id | string | No |
description | string | No |
id | string | No |
name | string | Yes |
permissions | array of string | No |
statements | array of object (actions, resource) | No |
domain.RoleAttributes
Field | Type | Required |
---|---|---|
claim_mapper | object | No |
client_id | string | No |
created_at | string | No |
description | string | No |
id | string | Yes |
member_count | integer | No |
name | string | Yes |
permissions | array | No |
domain.RoleDomain
Field | Type | Required |
---|---|---|
attributes | object | Yes |
externalID | object | No |
id | string | Yes |
meta | object | Yes |
schemas | array | Yes |
domain.RolePageDomain
Field | Type | Required |
---|---|---|
resources | array | Yes |
totalResults | integer | Yes |
domain.RolePatchOperation
Field | Type | Required |
---|---|---|
Operations | array | Yes |
schemas | string | Yes |
domain.UpdateRole
Field | Type | Required |
---|---|---|
claim_mapper | object | No |
client_id | string | No |
description | string | No |
name | string | Yes |
permissions | array | No |
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"
]
}