smart_device

Smart Device

Smart Devices are the devices which are connected to the APs. It can be user’s phone, tab, gaming console or anything which is referred to as smart device. Using this template type we can fetch details about the devices connected to the APs like device name, ID, and if it is manual type or not.

JSON Table

Attribute Data Type Description
sdTypeName String Type of smart device used. Takes up string value.
sdTypeID integer This assigns a particular integer value to each type of smart device.
isManualType Boolean This displays if the device is manual type.

Copy Sample JSON
Sample JSON
[
  {
    "sdTypeName": "Unknown",
    "sdTypeID": 0,
    "isManualType": false
  },
  {
    "sdTypeName": "iPhone",
    "sdTypeID": 1,
    "isManualType": false
  },  
  {
    "sdTypeName": "iPod-Touch",
    "sdTypeID": 2,
    "isManualType": false
  },
  {
    "sdTypeName": "iPad",
    "sdTypeID": 3,
    "isManualType": false
  },
  {
    "sdTypeName": "Blackberry",
    "sdTypeID": 4,
    "isManualType": false
  },
  {
    "sdTypeName": "Android",
    "sdTypeID": 5,
    "isManualType": false
  },
  {
    "sdTypeName": "Nokia",
    "sdTypeID": 6,
    "isManualType": false
  },
  {
    "sdTypeName": "Motorola",
    "sdTypeID": 7,
    "isManualType": false
  },
  {
    "sdTypeName": "Samsung",
    "sdTypeID": 8,
    "isManualType": false
  },
  {
    "sdTypeName": "HTC",
    "sdTypeID": 9,
    "isManualType": false
  },
  {
    "sdTypeName": "Potential Apple Smart Device",
    "sdTypeID": 10,
    "isManualType": false
  },
  {
    "sdTypeName": "Windows-Mobile",
    "sdTypeID": 11,
    "isManualType": false
  },
  {
    "sdTypeName": "iOS",
    "sdTypeID": 12,
    "isManualType": false
  },
  {
    "sdTypeName": "Gaming Consoles",
    "sdTypeID": 13,
    "isManualType": false
  }
]
API Calls

/V5/devices/smartdevicetypes

/V5/devices/smartdevicetypes/{type}

/V5/devices/smartdevicetypes/{id}

Get Smart Device Types

Description This API is used to fetch the types of smart devices from the Mojo Server or the Arista Cloud Services.
Users with the following roles can call this API: superuser, administrator, and operator.
Syntax
GET  <Base_URL>/devices/smartdevicetypes
Sample code
GET https://training.mojonetworks.com/new/webservice/V5/devices/smartdevicetypes
Request Body  This API call does not require any request body parameters.
Response Body  If the API call is successful, the HTTP response status is 200.
The response body contains a list of smart devices fetched in the application/json format.

Add Smart Device Type

Description This API is used to add a custom smart device type to the Mojo Server or the Arista Cloud Services.
Users with the following roles can call this API: superuser, administrator, and operator.
Syntax
PUT <Base_URL>/devices/smartdevicetypes/{type}

Here,

  • type

    It is a string value specifying the type of smart device which needs to be fetched.

Sample code
PUT https://training.mojonetworks.com/new/webservice/v5/smartdevicetypes/HandHeld
Request Body This API call does not require any request body parameters.
Response Body If the API call is successful, the HTTP response status is 204.
The response body does not contain any other information.

Delete Smart Device

Description This API is used to delete a specified smart device.
Users with the following roles can call this API: superuser, administrator, and operator.
Syntax
DELETE  <Base_URL>/devices/smartdevicetypes/{id}

Here,

  • id

    It is the id of the smart device type. It takes an Integer value.

Sample code
DELETE https://training.mojonetworks.com/new/webservice/v5/devices/smartdevicetypes/5001
Request Body  This API does not require any request body parameters.
Response Body  If the API call is successful, the HTTP response status is 204.
The response body does not contain any other information.