Table of Contents | ||||||||
---|---|---|---|---|---|---|---|---|
|
...
|
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 | {“data”: { “smdmModel”: “<model name>”, “smdmMetricProfile”: 0 } } |
Where:
Field | Description | Required | Size |
smdmModel | Device model name (max 32 chars). | Yes | 1-32 |
smdmMetricProfile | RFU, always 0. | Yes | 1 |
Response code
The expected response code is 200.
Response data
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 |
Response code
The expected response code is 200
Response data
The response data is a JSON object with the following structure:
Code Block |
---|
{ "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}] |
Response code
The expected response code is 200.
Response data
The response data is a JSON object with the following structure:
...
{
...
Field
...
Description
...
“statusCode”: 200,
...
Request successful
...
“data”: {
...
Response data
...
“SMDeviceModels”: [<device model>*]
...
<device model>* is the list of device model records, represented as Json objects. See the SAM database model document for a description of the Json object structure.
If a device model id is specified (e.g. /6) the list will contain only the device model of the specified id (smdmId==id).
...
}
...
Code Block |
---|
{
"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 } |
Response code
The expected response code is 200.
Response data
N/A.
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} |
Response code
The expected response code is 200.
Response data
N/A.