{"type":"api","title":"Fetches all devices for policy UI creation","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/f117fa98-ad23-3ca8-adf8-21349b86b3ff","info":{"title":"Crosswork Performance APIs","description":"Performance APIs allow the user to perform CRUD operations on performance service","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"http://www.cisco.com/public/sw-license-agreement.html"},"version":"7.1.0"},"x-parser-conf":{"overview":{"markdownPath":"reference/EMF/performance-api-overview.md"}},"openapi":"3.0.1","servers":[{"url":"http://localhost:8080/crosswork/performance","description":"Generated server url"}]},"spec":{"tags":["monitoring-policy-controller"],"summary":"Fetches all devices for policy UI creation.","description":"Filters can be provided as URL parameters e.g. hostName=<value> for a specific host name, productType=<value> for a specific product type","operationId":"getAllDevices","parameters":[{"name":"hostName","in":"query","description":"Device's hostname","required":false,"schema":{"type":"string"}},{"name":"ipAddress","in":"query","description":"Device's IP address","required":false,"schema":{"type":"string"}},{"name":"productType","in":"query","description":"Device's product type. For example: Cisco ASR 9006 Router","required":false,"schema":{"type":"string"}},{"name":"gatewayName","in":"query","description":"Device's gateway name. For example: EMBEDDED_DEF_POOL-1","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"The attribute by which to sort the response. (-) before the value will sort reversly. for example: -hostname","required":false,"schema":{"type":"string"}},{"name":"pageSize","in":"query","description":"The number of records to fetch","required":false,"schema":{"type":"integer","format":"int32","default":1000}},{"name":"page","in":"query","description":"The page number to fetch","required":false,"schema":{"type":"integer","format":"int32","default":1}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"selected":{"type":"boolean","description":"Used to indicate to the user in the UI whether a device is already selected for the given policy or not.","example":false},"reachabilityState":{"type":"string","description":"Indicated the device's reachability state.","example":"CONN_STATE_REACHABLE","enum":["CONN_STATE_INVALID","CONN_STATE_UNKNOWN","CONN_STATE_REACHABLE","CONN_STATE_UNREACHABLE","CONN_STATE_MAX","CONN_STATE_DEGRADED","UNRECOGNIZED"]},"adminState":{"type":"string","description":"Indicated the device's configured state.","example":"ROBOT_ADMIN_STATE_UP","enum":["ROBOT_ADMIN_STATE_UNKNOWN","ROBOT_ADMIN_STATE_UNMANAGED","ROBOT_ADMIN_STATE_DOWN","ROBOT_ADMIN_STATE_UP","UNRECOGNIZED"]},"hostName":{"type":"string","description":"The device's hostname","example":"Spitfire-8201-57"},"ipAddress":{"type":"string","description":"The device's IP address","example":"10.56.22.57"},"productType":{"type":"string","description":"The device's product type","example":"Cisco ASR 9006 Router"},"collectionStatus":{"type":"string","description":"Indicated the device's collection status in the policy. This parameter is only populated when relevant.","example":"ACTIVE","enum":["ACTIVE","NOTPOLLING"]},"comments":{"uniqueItems":true,"type":"array","description":"Explains the reason the device is in NOTPOLLING collection status. This parameter is only populated when relevant.","example":{"type":"POLLED_BY_ANOTHER_POLICY","argument":"Robot-Interface-health-1549"},"items":{"type":"object","properties":{"type":{"type":"string","description":"The type of comment","example":"POLLED_BY_ANOTHER_POLICY","enum":["POLLED_BY_ANOTHER_POLICY","MISSING_DEVICE_DETAILS","MISSING_DEVICE_PROFILE","UN_MANAGED_DEVICE","SCHEDULING_FAILURE","IN_PROGRESS"]},"argument":{"type":"string","description":"The argument for the comment","example":"Robot-Interface-health-1549"}},"description":"Explains the reason the device is in NOTPOLLING collection status. This parameter is only populated when relevant.","example":{"type":"POLLED_BY_ANOTHER_POLICY","argument":"Robot-Interface-health-1549"},"$$ref":"#/components/schemas/MonitoringPolicyDeviceCommentsDTO"}},"uuid":{"type":"string","description":"The device's UUID","example":"9d43eed8-c0d6-4638-8e82-25085c112315"},"lastUpdateTime":{"type":"integer","description":"The last time in milliseconds the device was updated in Inventory DB","format":"int64","example":1745399865000},"gatewayName":{"type":"string","description":"The data gateway name","example":"EMBEDDED_DEF_POOL-1"}},"$$ref":"#/components/schemas/MonitoringPolicyDeviceDTO"}},"total_count":{"type":"integer","format":"int32"}},"$$ref":"#/components/schemas/MonitoringPolicyDeviceListDTO"}}}},"400":{"description":"Bad Request"},"500":{"description":"Internal Server Error"}},"__originalOperationId":"getAllDevices","method":"get","path":"/v1/policies/inventory-devices"}}