Este tema contém os padrões MDM para cores
Cores (color)
-
Descrição
Esta entidade padroniza os seguintes atributos de cores:- Id
- nome
-
Estrutura dos Campos
Campo Descrição Tipo Link id Identificador da cor int name nome da cor string dataIdentifier identificador de unicidade da entidade string -
Como consultar ultima versão do schema da entidade
- Exemplo de retorno
Clique em "JSON"
{ "statusCode": 200, "success": true, "message": "Success", "document": { "_id": "6408e4822fdf838348471ec9", "entityType": "color", "revision": 3, "dataIdentifierSetup": [ "name" ], "jsonSchema": { "title": "Color Entity", "required": [ "entityType", "revision", "data" ], "properties": { "entityType": { "title": "This entity provides the default most commom model used at nstech Platform", "pattern": "^(.*)$", "$id": "#/properties/entityType", "type": "string" }, "revision": { "title": "The review of this entity.", "default": 1, "$id": "#/properties/revision", "type": "integer" }, "data": { "title": "The composition of the document object", "$id": "#/properties/data", "type": "object", "required": [ "name" ], "properties": { "name": { "title": "Color name", "$id": "#/properties/data/properties/name", "type": "string", "minLength": 1, "maxLenght": 40 }, "dataId": { "title": "The Unique Key for a document of this entity. If you don't know, don't put this in the document and it will be generated automatically.", "$id": "#/properties/data/properties/dataId", "type": "integer" } } } }, "$id": "http://example.org/root.json#", "type": "object", "definitions": {}, "$schema": "http://json-schema.org/draft-07/schema#" }, "authDefinition": { "resources": { "color": { "create": true, "update": true, "delete": true, "view": true } } }, "sensiblePropertiesPath": [], "effectiveDate": "2023-01-24T19:06:51.845Z", "status": true, "deleted": false } }
- Exemplo de retorno
-
Exemplo de chamada ao endpoint (GET) pela API get records by queryTemplate
-
Exemplo de chamada ao endpoint (GET) usando “data id”
-
Exemplo de chamada ao endpoint (GET) usando “updatedAt”
-
Exemplo de retorno
Clique em "JSON"
{ "statusCode": 200, "success": true, "message": "Success", "document": [ { "_id": "636fba48dd04eb0288a17d9b", "entityType": "color", "revision": 1, "data": { "name": "Amarelo", "dataId": 1, "dataIdentifier": { "name": "Amarelo" } }, "createdAt": "2022-11-12T15:22:48.964Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T15:22:48.964Z" }, { "_id": "636fba53dd04eb0288a17d9d", "entityType": "color", "revision": 1, "data": { "name": "Azul", "dataId": 2, "dataIdentifier": { "name": "Azul" } }, "createdAt": "2022-11-12T15:22:59.686Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T15:22:59.686Z" } ], "page": 1, "limit": 2, "nextPageURL": "https://dev.nstech.com.br:8080/platform/mdm-stg/platform/api/mdm-stg/entities/color/queryByTemplate/all?page=2&limit=2" }