In this article
Get Device Types
Get a list of valid Device Types.
URL
https://{{HOST}}/security/device/devicetypes?v={version}
Method
GET
Required IMS Scopes
- securityapi_all
Versions Supported
- 2.0 (Default)
URL Query Parameters
| Name | Description | Example | Type |
|---|---|---|---|
| v optional |
Version of the api to use | /device?v=2.0 | number |
Request Header Parameters
| Type | Value | Description |
|---|---|---|
| Authorization required |
Bearer {access_token} | IMS access token |
Example
Request
curl -X GET
'https://{{HOST}}/securityapi/device/devicetypes?v=2.0'
-H 'Authorization: Bearer {access_token}'
C#
var client = new RestClient("https://{{BaseURL}}/SecurityAPI/v1/device/devicetypes");
var request = new RestRequest(Method.GET);
NodeJS
var fetch = require('node-fetch');
var API_HOST = {{BaseURL}};
function get_device_types(token) {
return fetch(API_HOST + '/SecurityAPI/v1/device/devicetypes', {
method: 'GET',
headers: {
'content-type': 'application/json',
'Authorization': 'Bearer ' + token
}
}).then(function(res) {
return res.json();
}).then(function(json) {
return json;
}).catch(function(err) {
console.log('Error: ', err);
});
}
get_device_types(token)
.then(function(types){
console.log(types);
});
Response
Json
{
"0": "MEMBox",
"1": "MEMDC",
"2": "SBH",
"3": "SCAP",
"4": "GLAS",
"5": "P18",
"6": "Prototype"
}
Errors
| Error | Description |
|---|---|
| Error Name | Description of Error |
Response Body Parameters
| Name | Description | Schema |
|---|---|---|
| Object Name | Description | object definition |
| 1 | Description | object definition |
| 2 | Description | object definition |
| 3 | Description | object definition |
| 4 | Description | object definition |
| 5 | Description | object definition |
| 6 | Description | object definition |