Amadis
Administration APIs - SMDeviceModels
- 1 ADD a new device model
- 1.1 Response code
- 1.2 Response data
- 2 GET all existing devices
- 2.1 Response code
- 2.2 Response data
- 3 GET an existing device model
- 3.1 Response code
- 3.2 Response data
- 4 UPDATE an existing device model
- 4.1 Response code
- 4.2 Response data
- 5 DELETE an existing device model
- 5.1 Response code
- 5.2 Response data
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 |
Response code
The expected response code is 200.
Response data
The response data is a JSON object with the following structure:
{ | Field | Description |
| “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:
{
"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:
{
"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.