Versions Compared
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Table of Contents
...
Fetch Devices By Workspace
This operation is used to fetch all available Devices with associated Assignments for a given workspace.
Parameters
Base URL: /organizations/{organization}/workspaces/{workspace}/getDevices
Request Type: GET
Name | Type | Mandatory | Description |
---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{workspaceId} | String | Yes | The id of the Workspace. |
API Sample
Happy Scenario
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{"data":[{"workspaceId":"ne_nursery","assignment":"podg","model":"Nexus 5","status":"ACTIVE","stockNumber":4,"imei":"Cognitive-106","serialNumber":"04a4edd425230a17","macAddress":"cc:fa:00:ab:1e:bd"}],"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'list_devices' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Fetch Devices By Facility
This operation is used to fetch all available Devices with associated Assignments for a given facility.
Parameters
Base URL: /organizations/{organization}/facility/{facility}/getDevices
Request Type: GET
Name | Type | Mandatory | Description |
---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{facilityId} | String | Yes | The id of the Facility. |
API Sample
Happy Scenario
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{"data":[{"workspaceId":"ne_nursery","assignment":"podg","model":"Nexus 5","status":"ACTIVE","stockNumber":4,"imei":"Cognitive-106","serialNumber":"04a4edd425230a17","macAddress":"cc:fa:00:ab:1e:bd"}],"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'list_devices' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Fetch Devices By Organization
This operation is used to fetch all available Devices with associated Assignments for a given organization.
Parameters
Base URL: /organizations/{organization}/getDevices
Request Type: GET
Name | Type | Mandatory | Description |
---|---|---|---|
{organizationId} | String | Yes | The id of the Organization. |
token | String | Yes | Security Token obtained before. |
userId | String | Yes | The id of the logged in user. |
{workspaceId} | String | Yes | The id of the Workspace. |
API Sample
Happy Scenario
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{"data":[{"workspaceId":"ne_nursery","assignment":"podg","model":"Nexus 5","status":"ACTIVE","stockNumber":4,"imei":"Cognitive-106","serialNumber":"04a4edd425230a17","macAddress":"cc:fa:00:ab:1e:bd"}],"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'list_devices' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Delete Device
This operation is used to delete devices and associated assignments from the database for a particular device id.
This Delete supports only soft delete that is just updates status to In-Active in Devices table.
Parameters
Base URL: /organizations/{organization}/deleteDevice
Request Type: POST
Name | Type | Mandatory | Description |
---|---|---|---|
organization | String | Yes | The id of the organization. |
roomId | String | Yes | The room id to create |
deviceId | String | Yes | The id of the device. |
token | String | Yes | Security Token obtained before. |
Note : 1) ALL the parameters of the specified template must be present in the request.
API Sample
Happy Scenario
http://localhost:8080/PresentationServices/organizations/Another1/deleteDevice?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'delete_devices' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".
Create or Update Device
This operation is used to add or update devices and associated device assignments.
Parameters
Base URL: /organizations/{organization}/workspaces/{workspace}/CreateOrUpdateDevices
Request Type: POST
Name | Type | Mandatory | Description |
---|---|---|---|
organizationId | String | Yes | The id of the Organization. |
roomId | String | No | The room id to create |
userId | String | Yes | The id of the logged in user. |
token | String | Yes | Security Token obtained before. |
workspace | String | Yes | The id of the workspace. |
deviceId | String | Yes | The id of the device. |
macAddress | String | Yes | The mac address of device. |
model | String | Yes | The model of device. |
serialNum | String | Yes | The serial number of device. |
status | String | Yes | The status of device. |
API Sample
Happy Scenario
http://localhost:8080/PresentationServices//organizations/UNC/workspaces/test_nursery/CreateOrUpdateDevices?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
{"statusFact":{"success":true}} |
Not enough Permissions
In the case userId doesn't have 'modify_devices' permission, the operation returns a 403 (Forbidden) error with the body "Not enough permissions.".