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 | 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 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:
{ | 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. | |
} | ||
} |
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 | { “data”: { “smdmModel”: “<model name>”, “smdmMetricProfile”: 0 } } |
The response data is a JSON object with the following structure:
{ | Field | Description |
“statusCode”: 200, | Request successful | |
} |
DELETE 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 | DELETE |
Resource | /api/datamanagement/v1/SMDeviceModels[/{id}] |
The response data is a JSON object with the following structure:
{ | Field | Description |
“statusCode”: 200, | Request successful | |
} |