ADD a new device model
This API allows adding a device model to the SAM database:
Verb | POST |
Resource | /api/datamanagement/v1/SMDeviceModels |
Content type | application/json |
Body | { “smdmModel”: “<model name>”, “smdmMetricProfile”: 0 } } |
Where:
Field | Description | Required | Size |
smdmModel | Device model name | Yes | 1-32 |
smdmMetricProfile | RFU, always 0. | Yes | 1 |
The response data is a JSON object with the following structure:
{ | Field | Description |
“statusCode”: 200, | Request successful | |
“data”: { | Response data | |
“smdmId”: <new device model id> | New device model id. | |
} | ||
} |
GET all existing devices
This API allows getting information about all existing device models:
Verb | GET |
Resource | /api/datamanagement/v1/SMDeviceModels |
The response data is a JSON object with the following structure:
{ "SMDeviceModels":[ { "smdmId":0, "smdmModel":"Unspecified", "smdmMetricProfile":0, "smdmCreatedAt":"2020-11-20 15:55:35", "smdmUpdatedAt":"2020-11-20 15:55:35", "smdmDeletedAt":null, "SMDevices":[ { "smrdId":0, "smrdTerminalId":"", "smrdIMEI":"000000000000000", "smrdModel":0, "smrdState":1, "smrdCreatedAt":"2020-11-20 15:54:56", "smrdUpdatedAt":"2020-11-20 15:54:56", "smrdDeletedAt":null } ], "SMRuleOverrides":[ ], "SMCriteriaOverrides":[ ] }, ... ] }
GET an existing device model
This API allows retrieving device model data from the SAM database:
Verb | GET |
Resource | /api/datamanagement/v1/SMDeviceModels[/{id}] |
The response data is a JSON object with the following structure:
{ "SMDeviceModels":[ { "smdmId":3, "smdmModel":"Samsung S9", "smdmMetricProfile":0, "smdmCreatedAt":"2022-06-24 13:23:08", "smdmUpdatedAt":"2022-06-24 13:23:08", "smdmDeletedAt":null, "SMDevices":[ ], "SMRuleOverrides":[ ], "SMCriteriaOverrides":[ ] } ] }
UPDATE an existing device model
This API allows to update an existing device model data from the SAM database:
In the “data” section of the body, only the fields that need to be update must be present
Verb | UPDATE |
Resource | /api/datamanagement/v1/SMDeviceModels[/{id}] |
Content type | application/json |
Body | { “smdmModel”: “<model name>”, “smdmMetricProfile”: 0 } |
The response data is a JSON object with the following structure:
{"statusCode":200}
DELETE an existing device model
This API allows to update an existing device model data from the SAM database:
Verb | DELETE |
Resource | /api/datamanagement/v1/SMDeviceModels/{id} |
The response data is a JSON object with the following structure: