{"type":"api","title":"Get Devices","meta":{"id":"/apps/pubhub/media/edm-api-v2/a2a30bcc9ecab5281b65761ae61df7e0031d5691/f67a4e01-0023-334a-9a4a-7e606c2ef1a2","swagger":"2.0","info":{"contact":{"email":"devmgmt@cisco.com"},"description":"This is the IoT device management core service. The service is responsible for managing the lifecycle of various IoT gateways and endpoints deployed as part of the Field Area Networks","license":{"name":"Licensing is primarily subscription based. Call Andy now!","url":"https://www.cisco.com"},"termsOfService":"http://swagger.io/terms/","title":"IoT Device Lifecycle Management","version":"4.0.0"},"host":"us.ciscoiot.com","basePath":"/nbapi/edm/v1","schemes":["https"],"securityDefinitions":{"bearerAuth":{"description":"This is the bearer Auth token.","in":"header","name":"Authorization","type":"apiKey"}},"security":[{"bearerAuth":[]}],"x-parser-conf":{"apiKeyGenerator":{"$remoteModule":"./config/apikey.js"}}},"spec":{"description":"Returns a list of devices that matches the query conditions (in a paginated way).\u003cbr /\u003e One of the below permissions is needed to invoke this API\u003cbr /\u003e- Tenant Management\u003cbr /\u003e- Troubleshoot Devices\u003cbr /\u003e- Manage Devices\u003cbr /\u003e- Manage Firmware Upgrades\u003cbr /\u003e- Manage Groups\u003cbr /\u003e- Manage Templates\u003cbr /\u003e- View Devices\u003cbr /\u003e- Delete_devices\u003cbr /\u003e- Deactivate Devices\u003cbr /\u003e- Request Device Deactivation/Deletion","operationId":"getDevices","parameters":[{"description":"The uuid of the tenant in whose context we are calling the api.","format":"uuid","in":"header","name":"x-tenant-id","required":true,"type":"string"},{"default":0,"description":"particular page number to return","in":"query","minimum":0,"name":"page","required":false,"type":"integer"},{"default":20,"description":"The numbers of items to return","in":"query","maximum":200,"minimum":1,"name":"size","required":false,"type":"integer"},{"default":1174,"description":"devices list to be returned based on user-view requested","in":"query","name":"userViewId","required":false,"type":"integer"},{"description":"sort criteria for retrieved records","in":"query","name":"sortBy","required":false,"type":"string"},{"description":"order to sorting the retrieved records","in":"query","name":"sortDir","required":false,"type":"string"},{"in":"query","name":"filter","required":false,"type":"string"},{"description":"search criteria can be a regular string or a key:value","in":"query","name":"search","required":false,"type":"string"},{"description":"devices list to be returned based on the device state, whether it is in use or unused","enum":["INUSE","UNUSED"],"in":"query","name":"deviceState","required":false,"type":"string"}],"produces":["application/json"],"responses":{"200":{"description":"successful retrieval","schema":{"discriminator":"objectType","example":{"page":2,"size":2,"total":1,"results":[{"SN":"DHW45500H87","Up Time":"36min ","configGroup":"default-ir1100","configGroupId":5,"deviceCategory":"ROUTER","deviceType":"IR1100","eid":"IR1101-K9+DHW45500H87","function":"","href":"/resource/rest/api/v1/devices/IR1101-K9+DHW45500H87","ip":"10.8.0.33","labels":"","lastHeard":"3 days ago","lat":"Not Defined","lng":"Not Defined","meterId":"","name":"DHW45500H87","openIssues":"","runningFirmwareVersion":"16.12.01","status":"config failure"}]},"properties":{"page":{"description":"Page number","type":"integer"},"size":{"description":"Size of page in the response","type":"integer"},"total":{"description":"Total number of records available","type":"integer"},"results":{"items":{"additionalProperties":{"type":"object"},"type":"object"},"type":"array"}},"required":["page","size","total_count","results"],"type":"object","$$ref":"#/definitions/DeviceListVo"}},"400":{"description":"Bad request","schema":{"description":"Specifies the error that occurred during the request.","example":{"code":"10000","message":"Short message about the error","meta":"more information about that error"},"properties":{"code":{"description":"The error code that occurred in application level.","type":"number"},"message":{"description":"A user readable message that describes the error in details.","type":"string"},"meta":{"description":"Contains more information about the error message. For example when a validation error occurs, this field describes the fields that were invalid and the validation error that occurred. The content of this object can vary based on the type of error.\n","type":"object"}},"required":["code","message"],"type":"object","$$ref":"#/definitions/error"}},"401":{"description":"Unauthorized","schema":{"example":"Unauthorized","type":"string"}},"403":{"description":"Forbidden","schema":{"example":"Permission denied to access the resource","type":"string"}},"404":{"description":"Not found","schema":{"example":"Devices not found","type":"string"}},"500":{"description":"Server failure","schema":{"example":"Could not connect to server","type":"string"}}},"summary":"Find list of device based on certain criteria","tags":["devices"],"__originalOperationId":"getDevices","security":[{"bearerAuth":[]}],"method":"get","path":"/devices"}}