Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents
excludeTable of Contents

...

Code Block
languagejs
titleResult
collapsetrue
 {

   "statusFact":{

      "success":true

   }

}

 

 

Fetch Devices By Workspace

 

This operation is used to  fetch all available Devices with associated Assignments for a given workspace id.

Parameters

Base URL: /organizations/{organization}/workspaces/{workspace}/getDevices

Request Type: GET

Name
Type
Mandatory
Description
{organizationId} StringYesThe id of the Organization.
tokenStringYesSecurity Token obtained before.
userIdStringYesThe id of the logged in user.
{workspaceId} StringYesThe id of the Workspace. 
Note that ALL the parameters of the specified template must be present in the request.

API Sample

Happy Scenario

http://localhost:8080/PresentationServices/organizations/UNC/workspaces/test_nursery/getDevices?token=a578dbf4-1800-4a82-be24-b212ba43b278&userId=A_pod1 

 

 

Code Block
languagejs
titleResult
collapsetrue
 
{"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

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.".