Este tema contém os padrões MDM para tipos de acessórios e tipos de dispositivos
Tipos de acessórios (accessoryType)
-
Descrição
Esta entidade padroniza os seguintes atributos de tipos de acessórios:- nome
- Id
-
Estrutura dos Campos
Campo Descrição Tipo Link id identificador do tipo de acessório int name nome do tipo de acessório 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": "6408e4812fdf838348471ec5", "entityType": "accessoryType", "revision": 3, "dataIdentifierSetup": [ "name" ], "jsonSchema": { "title": "", "required": [ "entityType", "revision", "data" ], "properties": { "entityType": { "title": "accessoryType", "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": "Name of accessory type.", "$id": "#/properties/data/properties/name", "type": "string", "minLength": 3, "maxLength": 200 }, "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": { "accessoryType": { "create": true, "update": true, "delete": true, "view": true } } }, "sensiblePropertiesPath": [], "effectiveDate": "2023-01-25T19:08:15.318Z", "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": "636ff7b1ce9d5627804cec9f", "entityType": "accessoryType", "revision": 1, "data": { "name": "Antifurto", "dataId": 1, "dataIdentifier": { "name": "Antifurto" } }, "createdAt": "2022-11-12T19:44:49.723Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T19:44:49.723Z" }, { "_id": "636ff7bacff33738b4078da0", "entityType": "accessoryType", "revision": 1, "data": { "name": "Botão de pânico", "dataId": 2, "dataIdentifier": { "name": "Botão de pânico" } }, "createdAt": "2022-11-12T19:44:58.427Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T19:44:58.427Z" } ], "page": 1, "limit": 2, "nextPageURL": "https://dev.nstech.com.br:8080/platform/mdm-stg/platform/api/mdm-stg/entities/accessoryType/queryByTemplate/all?page=2&limit=2" }
Tipos de dispositivos (deviceType)
-
Descrição
Esta entidade padroniza os seguintes atributos de tipos de dispositivos:- Id
- nome
-
Estrutura dos Campos
Campo Descrição Tipo Link dataId identificador do tipo de dispositivo int name nome do tipo de dispositivo 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": "6408e4842fdf838348471ed1", "entityType": "deviceType", "revision": 3, "dataIdentifierSetup": [ "name" ], "jsonSchema": { "title": "", "required": [ "entityType", "revision", "data" ], "properties": { "entityType": { "title": "deviceType", "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": "Name of device type.", "$id": "#/properties/data/properties/name", "type": "string", "minLength": 3, "maxLength": 200 }, "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": { "deviceType": { "create": true, "update": true, "delete": true, "view": true } } }, "sensiblePropertiesPath": [], "effectiveDate": "2023-01-24T19:08:42.372Z", "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": "636ff8afcff33738b4078e80", "entityType": "deviceType", "revision": 1, "data": { "name": "Celular", "dataId": 1, "dataIdentifier": { "name": "Celular" } }, "createdAt": "2022-11-12T19:49:03.328Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T19:49:03.328Z" }, { "_id": "636ff8b7ce9d5627804ced60", "entityType": "deviceType", "revision": 1, "data": { "name": "Rastreador", "dataId": 2, "dataIdentifier": { "name": "Rastreador" } }, "createdAt": "2022-11-12T19:49:11.950Z", "deleted": false, "userCreator": "service-account-mdm", "updatedAt": "2022-11-12T19:49:11.950Z" } ], "page": 1, "limit": 2, "nextPageURL": "Last Page" }
Modelos de rastreadores (deviceModel)
-
Descrição
Esta entidade padroniza os seguintes atributos de tipos de dispositivos:- Id
- nome
- fabricante
-
Estrutura dos Campos
Campo Descrição Tipo Link dataId identificador do modelo de dispositivo int name nome do modelo de dispositivo string companyId data.id (identificador) da empresa fabricante do dispositivo int companyId companyTradeName nome fantasia da empresa fabricante do dispositivo string companyName 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": "6408e4842fdf838348471ed0", "entityType": "deviceModel", "revision": 2, "dataIdentifierSetup": [ "name" ], "jsonSchema": { "title": "Device Model Entity", "required": [ "entityType", "revision", "data" ], "properties": { "entityType": { "title": "Device Model Entity", "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.", "required": [ "name", "company" ], "$id": "#/properties/data", "type": "object", "properties": { "name": { "title": "Name of Device Model.", "$id": "#/properties/data/properties/name", "type": "string", "minLength": 1, "maxLenght": 200 }, "company": { "$id": "#/properties/data/properties/company", "type": "object", "required": [ "companyId", "companyTradeName" ], "properties": { "companyId": { "title": "Value of company Id.", "$id": "#/properties/data/properties/company/properties/companyId", "type": "integer" }, "companyTradeName": { "title": "Company name.", "$id": "#/properties/data/properties/company/properties/companyTradeName", "type": "string", "minLength": 1, "maxLenght": 200 } } }, "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": { "deviceModel": { "create": true, "update": true, "delete": true, "view": true } } }, "sensiblePropertiesPath": [ "name", "company.companyId", "company.companyTradeName" ], "effectiveDate": "2023-01-23T20:38:53.056Z", "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": "63cef1261dde420cf995c387", "entityType": "deviceModel", "revision": 1, "data": { "name": "Spy", "company": { "companyId": 111, "companyTradeName": "Jabursat" }, "dataId": 1, "dataIdentifier": { "name": "Spy" } }, "createdAt": "2023-01-23T20:42:14.235Z", "updatedAt": "2023-01-23T20:42:14.235Z", "deleted": false, "userCreator": "service-account-mdm" }, { "_id": "63cef1261dde420cf995c389", "entityType": "deviceModel", "revision": 1, "data": { "name": "Omnifrota", "company": { "companyId": 184, "companyTradeName": "Omnilink" }, "dataId": 2, "dataIdentifier": { "name": "Omnifrota" } }, "createdAt": "2023-01-23T20:42:14.274Z", "updatedAt": "2023-01-23T20:42:14.274Z", "deleted": false, "userCreator": "service-account-mdm" } ], "page": 1, "limit": 2, "nextPageURL": "https://dev.nstech.com.br:8080/platform/mdm-stg/platform/api/mdm-stg/entities/deviceModel/queryByTemplate/all?page=2&limit=2" }