Pular para o conteúdo principal

Endpoints de Recursos

Este recurso possui endpoints relacionados à atividades que você pode fazer de gerenciamento de Tipos de Recurso dentro da Plataforma StackSpot EDP.

MétodoEndpointDescriçãoParâmetrosRespostas
GET/scim/Resource-TypesGet All resource-typesX-Tenant-Id: string (header)200: OK
POST/scim/Resource-TypesCreate a new resource-typeX-Tenant-Id: string (header), body: Create Resource (body, required, schema: domain.CreateResourceType)201: Created
GET/scim/Resource-Types/{id}Get resource-type by idX-Tenant-Id: string (header)200: OK
GET/scim/ResourcesGet resourceX-Tenant-Id: string (header)200: OK
POST/scim/ResourcesCreate a new resourceX-Tenant-Id: string (header), body: Create Resource (body, required, schema: domain.CreateResource)201: Created
PUT/scim/Resources-Types/{id}Replace resource-typesX-Tenant-Id: string (header), body: Create Resource (body, required, schema: domain.UpdateResourceType)200: OK
PATCH/scim/Resources-Types/{id}Patch Operation resource-typesX-Tenant-Id: string (header), body: Update Resource (body, required, schema: domain.ResourceTypePatchOperation)200: OK
DELETE/scim/Resources-Types{id}Remove resource-typesX-Tenant-Id: string (header)204: No Content
GET/scim/Resources/{id}Get resource by idX-Tenant-Id: string (header)200: OK
PUT/scim/Resources/{id}Replace resourceX-Tenant-Id: string (header), body: Update Resource (body, required, schema: domain.UpdateResource)200: OK
DELETE/scim/Resources/{id}Remove resource by idX-Tenant-Id: string (header)204: No Content
PATCH/scim/Resources/{id}Patch Operation a new resourceX-Tenant-Id: string (header), body: Update Resource (body, required, schema: domain.ResourcePatchOperation)200: OK

Definições de Resposta

domain.CreateResource

CampoTipoObrigatório
client_idstringNão
descriptionstringNão
namestringSim
slugstringNão
typestringSim

domain.CreateResourceType

CampoTipoObrigatório
actionsarraySim
client_idstringNão
descriptionstringNão
namestringSim
slugstringNão

domain.Resource

CampoTipoObrigatório
client_idstringNão
created_atstringNão
descriptionstringNão
idstringNão
namestringSim
slugstringNão

domain.ResourceAttributes

CampoTipoObrigatório
client_idstringNão
descriptionstringNão
namestringSim
slugstringNão
typeobjectSim

domain.ResourceDomain

CampoTipoObrigatório
attributesobjectSim
externalIDobjectNão
idstringSim
metaobjectSim
schemasarraySim

domain.ResourcePageDomain

CampoTipoObrigatório
resourcesarraySim
totalResultsintegerSim

domain.ResourcePatchOperation

CampoTipoObrigatório
OperationsarraySim
schemasstringSim

domain.ResourceTypeDomain

CampoTipoObrigatório
attributesobjectSim
externalIDobjectNão
idstringSim
metaobjectSim
schemasarraySim

domain.ResourceTypePageDomain

CampoTipoObrigatório
resourcesarraySim
totalResultsintegerSim

domain.ResourceTypePatchOperation

CampoTipoObrigatório
operationsarraySim
schemasstringSim

Exemplo de resposta de Resource Type

GET /tenant-id/scim/Resource-Types Get all Resource Type

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

Requisição:

GET /tenant-id/scim/Resource-Types Get all Resource Type

Header:
Authorization: Bearer token

Resposta:

Status-Code 200: {
"Resources": [
{
"actions": [],
"clientId": null,
"description": "Resource-Type description",
"id": "cb1401c4-3628-47a9-811d-1558c93863ad",
"meta": {
"resourceType": "Resource Type",
"created": "2024-05-24T21:43:21Z",
"location": "Resource-Types/cb1401c4-3628-47a9-811d-1558c93863ad"
},
"name": "example-resource-type",
"resources": null,
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:ResourceType"
],
"slug": "resource-type-slug"
},
],
"itemsPerPage": 100,
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"startIndex": 1,
"totalResults": 1
}

Exemplo de resposta de Resource Type

POST /tenant-id/scim/Resource-Types Create Resource Type

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

Requisição:

POST /tenant-id/scim/Resource-Types Create Resource Type

Header:
Authorization: Bearer token

Resposta:

Status-Code 201: {
"actions": [
{
"id": "8fb5d7bd-de19-441b-98cd-ff679cced4f3",
"name": "Action Example",
"description": "Action description",
"created_at": "2024-05-31T13:12:51.879932071Z"
}
],
"clientId": null,
"description": "Resource-Type Example",
"id": "05285763-c30d-46d7-993b-b2097596de28",
"meta": {
"resourceType": "Resource Type",
"created": "2024-05-31T13:12:51Z",
"location": "Resource-Types/05285763-c30d-46d7-993b-b2097596de28"
},
"name": "scim-resource-type",
"resources": null,
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:ResourceType"
],
"slug": "scim-resource-type"
}

GET /tenant-id/scim/Resource-Types/\{id} Get Resource-Type By Id

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

Requisição:

GET /tenant-id/scim/Resource-Types/\{id} Get Resource-Type By Id

Header:
Authorization: Bearer token

Resposta:

Status-Code 201: {
"actions": [
{
"id": "8fb5d7bd-de19-441b-98cd-ff679cced4f3",
"name": "scim-action",
"description": "Action description",
"created_at": "2024-04-30T20:30:03.899548Z"
}
],
"clientId": null,
"description": "Example description",
"id": "b20556dc-cad3-40d7-891f-db5d50581382",
"meta": {
"resourceType": "Resource Type",
"created": "2024-05-06T20:06:49Z",
"location": "Resource-Types/b20556dc-cad3-40d7-891f-db5d50581382"
},
"name": "scim-resource-type",
"resources": [
{
"id": "0ebee203-14d6-449b-9ad3-3c308a98d1be",
"name": "scim-resource-type",
"slug": "scim-resource-type",
"description": "This is a test to scim api",
"created_at": "2024-05-20T19:38:52.135599Z"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:ResourceType"
],
"slug": "scim-resource-type-test-patch"
}

PUT /tenant-id/scim/Resource-Types/\{id} Update Resource-Type

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

Requisição:

PUT /tenant-id/scim/Resource-Types/\{id} Update Resource-Type

Header:
Authorization: Bearer token

Resposta:

Status-Code 200: {
"actions": [
{
"id": "8fb5d7bd-de19-441b-98cd-ff679cced4f3",
"name": "scim-action",
"description": "Action description",
"created_at": "2024-04-30T20:30:03.899548Z"
}
],
"clientId": null,
"description": "Example description",
"id": "b20556dc-cad3-40d7-891f-db5d50581382",
"meta": {
"resourceType": "Resource Type",
"created": "2024-05-06T20:06:49Z",
"location": "Resource-Types/b20556dc-cad3-40d7-891f-db5d50581382"
},
"name": "scim-resource-type",
"resources": [
{
"id": "0ebee203-14d6-449b-9ad3-3c308a98d1be",
"name": "scim-resource-type",
"slug": "scim-resource-type",
"description": "This is a test to scim api",
"created_at": "2024-05-20T19:38:52.135599Z"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:ResourceType"
],
"slug": "scim-resource-type-test-patch"
}

PUT /tenant-id/scim/Resource-Types/\{id} Update Resource-Type

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

Requisição:

PATCH /tenant-id/scim/Resource-Types/{id} Update Resourece-Type With Patch operation

Header:
Authorization: Bearer token

Resposta:

Status-Code 200: {
"actions": [
{
"id": "8fb5d7bd-de19-441b-98cd-ff679cced4f3",
"name": "scim-action",
"description": "Action description",
"created_at": "2024-04-30T20:30:03.899548Z"
}
],
"clientId": null,
"description": "Example description",
"id": "b20556dc-cad3-40d7-891f-db5d50581382",
"meta": {
"resourceType": "Resource Type",
"created": "2024-05-06T20:06:49Z",
"location": "Resource-Types/b20556dc-cad3-40d7-891f-db5d50581382"
},
"name": "scim-resource-type",
"resources": [
{
"id": "0ebee203-14d6-449b-9ad3-3c308a98d1be",
"name": "scim-resource-type",
"slug": "scim-resource-type",
"description": "This is a test to scim api",
"created_at": "2024-05-20T19:38:52.135599Z"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:ResourceType"
],
"slug": "scim-resource-type-test-patch"
}

Exemplos de resposta de Resource

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

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

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

Status-Code 200: {
"Resources": [
{
"clientId": null,
"description": "Example description",
"id": "0ebee203-14d6-449b-9ad3-3c308a98d1be",
"meta": {
"resourceType": "Resource",
"created": "2024-05-20T19:38:52Z",
"location": "Resources/0ebee203-14d6-449b-9ad3-3c308a98d1be"
},
"name": "scim-resource",
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Resource"
],
"slug": "scim-resource",
"type": {
"id": "b20556dc-cad3-40d7-891f-db5d50581382",
"name": "scim-resource-type",
"slug": "scim-resource-type",
"actions": [
{
"id": "8fb5d7bd-de19-441b-98cd-ff679cced4f3",
"name": "scim-action-",
"description": "This is an example",
"created_at": "2024-04-30T20:30:03.899548Z"
}
],
"description": "This is my example",
"created_at": "2024-05-06T20:06:49.051251Z"
}
}
],
"itemsPerPage": 100,
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:ListResponse"
],
"startIndex": 1,
"totalResults": 1
}

POST /tenant-id/scim/Resources Create Resources

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

Requisição:

POST /tenant-id/scim/Resources Create Resources

Header:
Authorization: Bearer token

Resposta:

Status-Code 201: {
"clientId": null,
"description": "Resource Example",
"id": "c7bce64f-0e09-42a2-b85b-f12d41d65752",
"meta": {
"resourceType": "Resource",
"created": "2024-05-31T13:19:43Z",
"location": "Resources/c7bce64f-0e09-42a2-b85b-f12d41d65752"
},
"name": "scim-resource",
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Resource"
],
"slug": "scim-resource",
"type": {
"id": "b20556dc-cad3-40d7-891f-db5d50581382",
"name": "Resource-Type example",
"slug": "resource-type-slug",
"actions": null,
"description": "Description Example",
"created_at": "0001-01-01T00:00:00Z"
}
}

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

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

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

Status-Code 200: {
"clientId": null,
"description": "Description example",
"id": "c7bce64f-0e09-42a2-b85b-f12d41d65752",
"meta": {
"resourceType": "Resource",
"created": "2024-05-31T13:19:43Z",
"location": "Resources/c7bce64f-0e09-42a2-b85b-f12d41d65752"
},
"name": "scim-resource",
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Resource"
],
"slug": "scim-resource",
"type": {
"id": "b20556dc-cad3-40d7-891f-db5d50581382",
"name": "scim-resource-type",
"slug": "scim-resource-type",
"actions": [],
"description": "This is my example",
"created_at": "2024-05-06T20:06:49.051251Z"
}
}

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

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

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

Status-Code 200: {
"clientId": null,
"description": "Description example",
"id": "c7bce64f-0e09-42a2-b85b-f12d41d65752",
"meta": {
"resourceType": "Resource",
"created": "2024-05-31T13:19:43Z",
"location": "Resources/c7bce64f-0e09-42a2-b85b-f12d41d65752"
},
"name": "scim-resource",
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Resource"
],
"slug": "scim-resource",
"type": {
"id": "b20556dc-cad3-40d7-891f-db5d50581382",
"name": "scim-resource-type",
"slug": "scim-resource-type",
"actions": [],
"description": "This is my example",
"created_at": "2024-05-06T20:06:49.051251Z"
}
}

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

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

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

Status-Code 204: NO BODY RESPONSE

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

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

Requisição:

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

Header:
Authorization: Bearer token

Resposta:

Status-Code 200: {
"clientId": null,
"description": "Description example",
"id": "c7bce64f-0e09-42a2-b85b-f12d41d65752",
"meta": {
"resourceType": "Resource",
"created": "2024-05-31T13:19:43Z",
"location": "Resources/c7bce64f-0e09-42a2-b85b-f12d41d65752"
},
"name": "scim-resource",
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Resource"
],
"slug": "scim-resource",
"type": {
"id": "b20556dc-cad3-40d7-891f-db5d50581382",
"name": "scim-resource-type",
"slug": "scim-resource-type",
"actions": [],
"description": "This is my example",
"created_at": "2024-05-06T20:06:49.051251Z"
}
}