Pular para o conteúdo principal

Endpoints de Papel (Role)

Este recurso possui endpoints relacionados à atividades que você pode fazer de gerenciamento de Papéis (Roles) dentro da Plataforma StackSpot EDP.

MétodoEndpointDescriçãoParâmetrosRespostas
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

Definições de Resposta

domain.CreateRole

CampoTipoObrigatório
claim_mapperobject (additionalProperties: string)Não
client_idstringNão
descriptionstringNão
idstringNão
namestringSim
permissionsarray of stringNão
statementsarray of object (actions, resource)Não

domain.RoleAttributes

CampoTipoObrigatório
claim_mapperobjectNão
client_idstringNão
created_atstringNão
descriptionstringNão
idstringSim
member_countintegerNão
namestringSim
permissionsarrayNão

domain.RoleDomain

CampoTipoObrigatório
attributesobjectSim
externalIDobjectNão
idstringSim
metaobjectSim
schemasarraySim

domain.RolePageDomain

CampoTipoObrigatório
resourcesarraySim
totalResultsintegerSim

domain.RolePatchOperation

CampoTipoObrigatório
OperationsarraySim
schemasstringSim

domain.UpdateRole

CampoTipoObrigatório
claim_mapperobjectNão
client_idstringNão
descriptionstringNão
namestringSim
permissionsarrayNão

Exemplo de resposta

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

Aqui você encontra um exemplo de resposta da API para uma chamada com o endpoint GET /tenant-id/scim/Roles Get all Roles.

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

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

Aqui você encontra um exemplo de resposta da API para uma chamada com o endpoint POST /tenant-id/scim/Roles Create Roles.

Requisição:

POST /tenant-id/scim/Roles Create Roles

Header:
Authorization: Bearer token

Resposta:

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

Aqui você encontra um exemplo de resposta da API para uma chamada com o endpoint GET /tenant-id/scim/Roles/\{id} Get Roles By Id.

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

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

Aqui você encontra um exemplo de resposta da API para uma chamada com o endpoint PUT /tenant-id/scim/Roles/\{id} Update Roles.

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

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

Aqui você encontra um exemplo de resposta da API para uma chamada com o endpoint DELETE /tenant-id/scim/Roles/\{id} Remove Roles.

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

Status-Code 204: NO BODY RESPONSE

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

Aqui você encontra um exemplo de resposta da API para uma chamada com o endpoint PATCH /tenant-id/scim/Roles/\{id} Update Roles With Patch operation.

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

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"
]
}