{"type":"api","title":"Get device details","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-2/76fd4bb9d069fd2530d7a02f0b3a4ca00eccfd35/1c070d4e-8870-3df3-a541-e46a890a47cb","info":{"title":"Crosswork Workflow Manager Solutions - Inventory","description":"The Crosswork Workflow Manager Solutions Inventory API is a comprehensive inventory collection service that enables users to retrieve, query, and refresh network device information. It serves as a centralized repository for device metadata, connectivity details, software versions, and product information across multiple vendor platforms.\n\nThe CWMS Inventory fetchs the device related details like hostname, IP, Product details, Package versions as well as provide list of product types to be supported.\n\nIt will fetch device product details as well as include filters parameters to get specific device related details.","contact":{"name":"Crosswork Team, Cisco","email":"support@cisco.com"},"license":{"name":"Cisco Software License Agreement","url":"https://www.cisco.com/public/sw-license-agreement.html"},"version":"7.2.0"},"x-parser-conf":{"overview":{"markdownPath":"reference/CWM-SOLUTIONS/inventory-api.overview.md"}},"openapi":"3.0.1","servers":[{"url":"https://crosswork-ip:12345/crosswork/cwms/inventory/v1"}],"securitySchemes":{"Bearer":{"type":"apiKey","description":"Type \"Bearer\" followed by a space and JWT token.","name":"Authorization","in":"header"}}},"spec":{"tags":["Devices"],"summary":"Get device details","description":"Get Device details based on filter params.","operationId":"fetchDeviceDetails","requestBody":{"description":"Devices Get Request","x-codegen-request-body-name":"request","content":{"application/json":{"schema":{"type":"object","properties":{"app_status":{"type":"array","description":"Application status filters","items":{"type":"object","properties":{"app_name":{"type":"string","description":"Application name","example":"Fleet Upgrade"},"status":{"type":"string","description":"Application status","example":"Success"}},"description":"AppStatusReqDoc represents application status filters for request body (without uuid)","$$ref":"#/components/schemas/rest.AppStatusReqDoc"}},"node":{"type":"object","properties":{"filter":{"type":"object","properties":{"host":{"type":"string","description":"Hostname","example":"router-01.example.com"},"ip":{"type":"string","description":"IP address","example":"192.168.1.100"},"name":{"type":"string","description":"Device name","example":"Main Router"},"product_series":{"type":"string","description":"Product series","example":"Catalyst 8200"},"product_type":{"type":"string","description":"Product type","example":"Router"},"software_type":{"type":"string","description":"Software type","example":"IOS-XE"},"software_version":{"type":"string","description":"Software version","example":"17.6.1"},"uuid":{"type":"string","description":"Device UUID","example":"c1b3b2c0-1234-5678-9abc-def012345678"},"vendor":{"type":"string","description":"Vendor name","example":"Cisco"}},"description":"Filter criteria for nodes","$$ref":"#/components/schemas/rest.RobotNodeDataDoc"},"filterData":{"type":"object","properties":{"PageNum":{"type":"integer","description":"Page number (0-based)","example":0},"PageSize":{"type":"integer","description":"Page size (number of records per page)","example":10}},"description":"Advanced filter data with pagination","$$ref":"#/components/schemas/rest.RobotFilterDataDoc"}},"description":"Node query parameters with pagination and filters","$$ref":"#/components/schemas/rest.RobotNodeGetReqDoc"}},"description":"RakDeviceGetReqDoc represents the POST /devices/query request body with filters and pagination","$$ref":"#/components/schemas/rest.RakDeviceGetReqDoc"}}},"required":true},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"Array of devices","items":{"type":"object","properties":{"admin_state":{"type":"string","description":"Admin state (0=UNKNOWN, 1=MANAGED, 2=UNMANAGED)","example":"ROBOT_ADMIN_STATE_UP"},"app_status":{"type":"array","description":"Application statuses","items":{"type":"object","properties":{"app_name":{"type":"string","description":"Application name","example":"Fleet Upgrade"},"metadata":{"type":"object","additionalProperties":{"type":"string"},"description":"Additional metadata about the application in key-value format","example":{"last_updated":"2024-01-01T12:00:00Z","version":"1.0"}},"status":{"type":"string","description":"Application status","example":"Success"},"uuid":{"type":"string","description":"Device UUID","example":"c1b3b2c0-1234-5678-9abc-def012345678"}},"description":"AppStatusRespDoc represents application status on a device for responses (with uuid)","$$ref":"#/components/schemas/rest.AppStatusRespDoc"}},"connectivity_info":{"type":"array","description":"Connectivity information","items":{"type":"object","properties":{"ipaddrs":{"type":"array","description":"IP addresses","items":{"type":"object","properties":{"inet_addr":{"type":"string","description":"IP address string","example":"192.168.1.100"},"inet_af":{"type":"string","description":"IP address family type (v4, v6, etc.)","example":"ROBOT_INET_ADDR_TYPE_v4"},"mask":{"type":"integer","description":"Network mask in CIDR notation","example":24}},"description":"IpAddrDoc represents an IP address and details","$$ref":"#/components/schemas/rest.IpAddrDoc"}},"port":{"type":"integer","description":"Port number","example":22},"reachability_state":{"type":"string","description":"Reachability state of the transport (REACHABLE, UNREACHABLE, UNKNOWN)","example":"REACHABLE"},"timeout":{"type":"integer","description":"Connection timeout in seconds","example":30},"type":{"type":"string","description":"Transport type (0=UNKNOWN, 1=SSH, 2=TELNET, 3=NETCONF, 4=RESTCONF, 5=GRPC)","example":"ROBOT_MSVC_TRANS_SSH"}},"description":"ConnectivityInfoDoc represents device connectivity details","$$ref":"#/components/schemas/rest.ConnectivityInfoDoc"}},"geo_info":{"type":"object","properties":{"building":{"type":"string","description":"Building identifier","example":"Building A"},"coordinates":{"type":"object","properties":{"latitude":{"type":"number","description":"Latitude","example":37.7749},"longitude":{"type":"number","description":"Longitude","example":-122.4194}},"description":"Coordinates","$$ref":"#/components/schemas/rest.CoordinatesDoc"},"floor":{"type":"string","description":"Floor information","example":"Floor 3"},"rack":{"type":"string","description":"Rack information","example":"Rack 15"},"room":{"type":"string","description":"Room information","example":"Server Room 301"},"site_id":{"type":"string","description":"Site identifier","example":"site-hq-01"}},"description":"Geographic information","$$ref":"#/components/schemas/rest.GeoInfoDoc"},"host_name":{"type":"string","description":"Hostname","example":"router-01.example.com"},"last_upd_time":{"type":"integer","description":"Last update timestamp (Unix epoch)","example":1704835200},"ned_id":{"type":"string","description":"NED package ID","example":"cisco-iosxe-cli-6.92"},"nso_state":{"type":"string","description":"NSO device operational state (0=UNKNOWN, 1=ENABLED, 2=DISABLED, 3=SOUTHBOUND_LOCKED)","example":"SYNCED"},"product_info":{"type":"object","properties":{"hardware_model":{"type":"string","description":"Hardware model","example":"C8200-1N-4T"},"manufacturer":{"type":"string","description":"Manufacturer/vendor","example":"Cisco"},"product_family":{"type":"string","description":"Product family","example":"Catalyst"},"product_series":{"type":"string","description":"Product series","example":"Catalyst 8200"},"product_type":{"type":"string","description":"Product type","example":"Router"},"software_type":{"type":"string","description":"Software type","example":"IOS-XE"},"software_version":{"type":"string","description":"Software version","example":"17.6.1"}},"description":"Product information","$$ref":"#/components/schemas/rest.ProductInfoDoc"},"profile":{"type":"string","description":"Credential profile name","example":"default-profile"},"providers_family":{"type":"object","additionalProperties":{"type":"object","properties":{"family":{"type":"string","description":"Provider family name","example":"NSO"},"providers":{"type":"array","description":"List of providers in this family","items":{"type":"object","properties":{"provider_node_id":{"type":"string","description":"Provider node ID","example":"router-01"},"provider_uuid":{"type":"string","description":"Provider UUID","example":"d2c4c3d1-2345-6789-0bcd-ef1234567890"}},"description":"NodeProviderDoc represents a provider node details","$$ref":"#/components/schemas/rest.NodeProviderDoc"}}},"description":"ProviderFamilyGroupDoc represents provider family information","$$ref":"#/components/schemas/rest.ProviderFamilyGroupDoc"},"description":"Providers family map"},"rak_inv_collection_status":{"type":"string","description":"RAK inventory collection status (0=UNKNOWN, 1=NOT_INITIATED, 2=INITIATED, 3=IN_PROGRESS, 4=COMPLETED, 5=FAILED)","example":"RAK_INV_COLLECTION_STATUS_COMPLETED"},"reachability_state":{"type":"string","description":"Reachability state (0=UNKNOWN, 1=UNREACHABLE, 2=REACHABLE)","example":"CONN_STATE_UNKNOWN"},"uuid":{"type":"string","description":"Device UUID","example":"c1b3b2c0-1234-5678-9abc-def012345678"}},"description":"RakDeviceDataGetDoc represents detailed device information","$$ref":"#/components/schemas/rest.RakDeviceDataGetDoc"}},"result_count":{"type":"integer","description":"Number of result nodes in current response","example":10},"total_count":{"type":"integer","description":"Total number of nodes available","example":100}},"description":"RakDeviceDataGetListDoc represents the response for POST /devices/query","$$ref":"#/components/schemas/rest.RakDeviceDataGetListDoc"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code","example":400},"message":{"type":"string","description":"Error message describing the bad request","example":"invalid request to API"},"status":{"type":"string","description":"Response status","example":"fail"}},"description":"RakDeviceDataResp400 represents a 400 Bad Request response example","$$ref":"#/components/schemas/rest.RakDeviceDataResp400"}}}},"401":{"description":"Unauthorized","content":{}},"403":{"description":"Forbidden","content":{}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code","example":404},"message":{"type":"string","description":"Error message describing the not found error","example":"Not found"},"status":{"type":"string","description":"Response status","example":"fail"},"uuid":{"type":"string","description":"Device UUID that was not found","example":"c1b3b2c0-1234-5678-9abc-def012345678"}},"description":"RakDeviceDataResp404 represents a 404 Not Found response example","$$ref":"#/components/schemas/rest.RakDeviceDataResp404"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"integer","description":"HTTP status code","example":500},"message":{"type":"string","description":"Error message describing the internal server error","example":"Internal server error"},"status":{"type":"string","description":"Response status","example":"fail"}},"description":"RakDeviceDataResp500 represents a 500 Internal Server Error response example","$$ref":"#/components/schemas/rest.RakDeviceDataResp500"}}}}},"__originalOperationId":"fetchDeviceDetails","method":"post","path":"/devices/query"}}