{"type":"api","title":"Get Template Job Data Status Per Device","meta":{"id":"/apps/pubhub/media/crosswork-network-controller-7-1/f445c17e25a1120e8fbde4bd413083d0fd88b2b3/b44e8ba1-6566-34bf-b4f1-d28c15d76254","info":{"title":"Crosswork Collection Service APIs","description":"Crosswork Collector Services APIs manage application intents for collection jobs across multiple devices and different collection types, including SNMP, CLI, TRAP, MDT, GNMI, and SYSLOG.","version":"1.0.0","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"}},"x-parser-conf":{"overview":{"markdownPath":"reference/INFRA/COLLECTIONS/collection-service-overview.md"}},"swagger":"2.0","basePath":"/crosswork/collection/v1","schemes":["https","http"],"securityDefinitions":{"bearerAuth":{"type":"apiKey","description":"bearer auth","name":"Authorization","in":"header"}}},"spec":{"summary":"Get Template Job Data Status Per Device","description":"Use GetTemplateCollectionDataStatusPerDevice for a detailed view of the data status for each device within a template collection job.\nThe API returns the data status on a per-device, per-sensor, per-parameter value basis, and this obtains whether collection took place from device to collector or from collector to destinations.\nThe API fetches the status from Crosswork Data Gateway (CDG) on demand.\nIf anything failed during input or output, the return will include an error message describing the failure and the current state.\nThe return may be empty if the collector does not have any status.\nYou must supply the App_context, Device id, templateId, and parameter value","operationId":"CollectionService_GetTemplateCollectionDataStatusPerDevice","responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body","schema":{"type":"object","properties":{"template_collection_data_status_list":{"type":"array","items":{"type":"object","properties":{"device_data":{"description":"Device data on which operation was carried out, its the combination of device_id and hostname_name(optional).","type":"object","properties":{"device_id":{"type":"string","description":"UUID of the device in the Crosswork inventory."},"host_name":{"type":"string","description":"The host name of the device in the Crosswork inventory. Optional to populate."}},"title":"Device Data","$$ref":"#/definitions/collection_serviceDeviceData"},"sensor_template_input_status_list":{"type":"array","items":{"type":"object","properties":{"sensor_template":{"type":"object","properties":{"sensor_template_id":{"type":"string","title":"Unique handle to identify a sensor template"},"collection_type":{"title":"Style of collection. At this time only app-managed lifetimetype is supported for templatized jobs","type":"string","enum":["UNKNOWN_COLLECTOR","MDT_COLLECTOR","SNMP_COLLECTOR","CLI_COLLECTOR","TRAP_COLLECTOR","GNMI_COLLECTOR","SYSLOG_COLLECTOR"],"default":"UNKNOWN_COLLECTOR","$$ref":"#/definitions/common_collection_dataCollectionType"},"sensor_template_Definition":{"title":"Specify the sensor template information e.g. path and parameters","type":"object","properties":{"cli_sensor_template":{"type":"object","properties":{"template_command":{"title":"Example show interface\nshow interface .{{interface_name}}\nshow interface | utility egrep expr .{{interface_name}}","type":"object","properties":{"templatecommand":{"type":"string"},"template_variables":{"type":"array","items":{"type":"string"}}},"$$ref":"#/definitions/common_collection_dataTemplateCommand"},"template_device_package":{"title":"Total size is limited to 512 characters","type":"object","properties":{"device_package_name":{"type":"string","title":"XDE device package name"},"function_name":{"type":"string","title":"XDE function name within package"},"template_params":{"type":"array","items":{"type":"string"},"title":"Template params in Device package\nAll params of device package function are mandatory templatized params"}},"$$ref":"#/definitions/common_collection_dataTemplateDevicePackage"}},"title":"Use with Cli Sensor\nThe message accepts templatized CLI command or a templatized device package with parameters specified wihin curly brackets(see ex below)\nThe message also accepts a list of valid parameter keys to be accepted","$$ref":"#/definitions/common_collection_dataCliSensorTemplate"},"gnmi_sensor_template":{"type":"object","properties":{"gnmi_path":{"type":"string","title":"String encoded GNMI path with template variables specified\nExample: \"Cisco-IOS-XR-l2vpn-oper:l2vpnv2/active/xconnects/xconnect[xconnect-name=.{{xconnect}}]/.{{segment}}/pseudo-wire/state\""},"template_variables":{"type":"array","items":{"type":"string"},"title":"List of paramaters applicable to the sensor specified in go template format : \"{{ .FieldName }}\"\nIf vraibles can be directly be inferred from the path then not needed"}},"title":"Reference: gNMI Specification Section 3.5.1.3\nThis is used when large number of leaf level collections need to be done\nThe message accepts a string encoded GNMI path with parameters specified wihin curly brackets (see ex below)\nThe message also accepts a list of valid parameter keys to be accepted","$$ref":"#/definitions/common_collection_dataGnmiSensorTemplate"}},"$$ref":"#/definitions/common_collection_dataSensorTemplateDefinition"},"cadence_in_millisec":{"type":"string","format":"uint64","title":"Specify the cadence at which path is to be collected"}},"title":"SensorTemplate contains details of templated sensor per collect type","$$ref":"#/definitions/common_collection_dataSensorTemplate"},"sensor_template_input_status":{"title":"Status","type":"object","properties":{"sensor_template_status_per_parameter_value":{"type":"array","items":{"type":"object","properties":{"parameter_value":{"type":"object","properties":{"template_param_value":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters values for sensor template variables"}},"title":"Specify parameter values for template parameters","$$ref":"#/definitions/common_collection_dataParameterValue"},"collection_status":{"title":"Template collection state","type":"object","properties":{"state":{"title":"The object state","type":"string","enum":["UNKNOWN_COLLECTION_STATE","ACTIVE_STATE","INACTIVE_STATE","ACCEPTED_STATE"],"default":"UNKNOWN_COLLECTION_STATE","description":"- ACTIVE_STATE: Object is behaving as expected\n - INACTIVE_STATE: Object is in a bad state.\n - ACCEPTED_STATE: Object is under evaluation.","$$ref":"#/definitions/collection_serviceCollectionState"},"error":{"title":"Error (if any)","type":"object","properties":{"error":{"type":"string","description":"Message is a textual description of the reason for rejection. You can safely pass it on to the operator through logs or the UI."}},"$$ref":"#/definitions/collection_serviceError"},"reported_time":{"type":"string","format":"uint64","title":"Event time"}},"$$ref":"#/definitions/collection_serviceCollectionStatus"}},"title":"Template Collection status per parameter value","$$ref":"#/definitions/collection_serviceSensorTemplateStatusPerParameterValue"},"title":"Status"}},"$$ref":"#/definitions/collection_serviceSensorTemplateStatus"}},"$$ref":"#/definitions/collection_serviceSensorTemplateInputStatus"},"title":"Status per-device and per-sensor on the input collection side"},"sensor_template_output_status_list":{"type":"array","items":{"type":"object","properties":{"destination":{"type":"object","properties":{"destination_id":{"type":"string","title":"Unique identifier for a Destination Provider in Inventory"},"context_id":{"type":"string","description":"Destination context identifier.\nIt could be topic name if the destination is message bus.\nThe combination of destination_id and context_id needs to be unique for a Destination.\nWhat context id means depends on the destination type of the destination provider.\nIf \"GRPC\" is the destination type, context_id is not used and will be ignored."},"destination_name":{"type":"string","description":"The name of the destination. Not used during write operations, but optionally filled when using GET APIs.\nIt maps to the destination provider name in Crosswork Device Lifecycle Manager (DLM)."}},"description":"Use the destination identifier to uniquely identify a destination.\nThe output encoding format for the destination is derived from the Inventory destination_id.","$$ref":"#/definitions/collection_serviceDestination","title":"Destination"},"sensor_template":{"type":"object","properties":{"sensor_template_id":{"type":"string","title":"Unique handle to identify a sensor template"},"collection_type":{"title":"Style of collection. At this time only app-managed lifetimetype is supported for templatized jobs","type":"string","enum":["UNKNOWN_COLLECTOR","MDT_COLLECTOR","SNMP_COLLECTOR","CLI_COLLECTOR","TRAP_COLLECTOR","GNMI_COLLECTOR","SYSLOG_COLLECTOR"],"default":"UNKNOWN_COLLECTOR","$$ref":"#/definitions/common_collection_dataCollectionType"},"sensor_template_Definition":{"title":"Specify the sensor template information e.g. path and parameters","type":"object","properties":{"cli_sensor_template":{"type":"object","properties":{"template_command":{"title":"Example show interface\nshow interface .{{interface_name}}\nshow interface | utility egrep expr .{{interface_name}}","type":"object","properties":{"templatecommand":{"type":"string"},"template_variables":{"type":"array","items":{"type":"string"}}},"$$ref":"#/definitions/common_collection_dataTemplateCommand"},"template_device_package":{"title":"Total size is limited to 512 characters","type":"object","properties":{"device_package_name":{"type":"string","title":"XDE device package name"},"function_name":{"type":"string","title":"XDE function name within package"},"template_params":{"type":"array","items":{"type":"string"},"title":"Template params in Device package\nAll params of device package function are mandatory templatized params"}},"$$ref":"#/definitions/common_collection_dataTemplateDevicePackage"}},"title":"Use with Cli Sensor\nThe message accepts templatized CLI command or a templatized device package with parameters specified wihin curly brackets(see ex below)\nThe message also accepts a list of valid parameter keys to be accepted","$$ref":"#/definitions/common_collection_dataCliSensorTemplate"},"gnmi_sensor_template":{"type":"object","properties":{"gnmi_path":{"type":"string","title":"String encoded GNMI path with template variables specified\nExample: \"Cisco-IOS-XR-l2vpn-oper:l2vpnv2/active/xconnects/xconnect[xconnect-name=.{{xconnect}}]/.{{segment}}/pseudo-wire/state\""},"template_variables":{"type":"array","items":{"type":"string"},"title":"List of paramaters applicable to the sensor specified in go template format : \"{{ .FieldName }}\"\nIf vraibles can be directly be inferred from the path then not needed"}},"title":"Reference: gNMI Specification Section 3.5.1.3\nThis is used when large number of leaf level collections need to be done\nThe message accepts a string encoded GNMI path with parameters specified wihin curly brackets (see ex below)\nThe message also accepts a list of valid parameter keys to be accepted","$$ref":"#/definitions/common_collection_dataGnmiSensorTemplate"}},"$$ref":"#/definitions/common_collection_dataSensorTemplateDefinition"},"cadence_in_millisec":{"type":"string","format":"uint64","title":"Specify the cadence at which path is to be collected"}},"title":"SensorTemplate contains details of templated sensor per collect type","$$ref":"#/definitions/common_collection_dataSensorTemplate"},"sensor_template_output_status":{"title":"Output side template collection status per destination","type":"object","properties":{"sensor_template_status_per_parameter_value":{"type":"array","items":{"type":"object","properties":{"parameter_value":{"type":"object","properties":{"template_param_value":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters values for sensor template variables"}},"title":"Specify parameter values for template parameters","$$ref":"#/definitions/common_collection_dataParameterValue"},"collection_status":{"title":"Template collection state","type":"object","properties":{"state":{"title":"The object state","type":"string","enum":["UNKNOWN_COLLECTION_STATE","ACTIVE_STATE","INACTIVE_STATE","ACCEPTED_STATE"],"default":"UNKNOWN_COLLECTION_STATE","description":"- ACTIVE_STATE: Object is behaving as expected\n - INACTIVE_STATE: Object is in a bad state.\n - ACCEPTED_STATE: Object is under evaluation.","$$ref":"#/definitions/collection_serviceCollectionState"},"error":{"title":"Error (if any)","type":"object","properties":{"error":{"type":"string","description":"Message is a textual description of the reason for rejection. You can safely pass it on to the operator through logs or the UI."}},"$$ref":"#/definitions/collection_serviceError"},"reported_time":{"type":"string","format":"uint64","title":"Event time"}},"$$ref":"#/definitions/collection_serviceCollectionStatus"}},"title":"Template Collection status per parameter value","$$ref":"#/definitions/collection_serviceSensorTemplateStatusPerParameterValue"},"title":"Status"}},"$$ref":"#/definitions/collection_serviceSensorTemplateStatus"}},"title":"Template Collection output status","$$ref":"#/definitions/collection_serviceSensorTemplateOutputStatus"},"title":"Status per-device and per-destination on the output collection side"}},"title":"TemplateCollectionJob Data Status from CDG Instances\nContextId : robot.collector.helios.collection.datastatus","$$ref":"#/definitions/collection_serviceTemplateCollectionDataStatus"},"title":"The input and output collection"},"query_options":{"type":"object","properties":{"page_token":{"type":"string","title":"Page token used to echo back to get the next page. If collection_job_device_sets is empty or the page token are empty, there are no more results"},"page_size":{"type":"integer","format":"int64","title":"page_size"},"filter_list":{"type":"array","items":{"type":"object","properties":{"operator":{"description":"The filter logical or conditional operator (such as AND, OR, \u003e, \u003c).","type":"string","enum":["UNKNOWN_OPERATOR","OPERATOR_OR","OPERATOR_AND","OPERATOR_EQ","OPERATOR_REGEX","OPERATOR_CONTAINS"],"default":"UNKNOWN_OPERATOR","$$ref":"#/definitions/collection_serviceFilterOperator"},"field_list":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field to filter on. Only CollectionState String is supported."},"value":{"type":"string","description":"The field value to filter on. For non-strings, the backend will convert it to honor actual DB type."}},"$$ref":"#/definitions/collection_serviceFilterField"},"title":"The list of filter criteria"}},"title":"Filter","$$ref":"#/definitions/collection_serviceFilter"},"title":"filtering options"},"filter_query":{"type":"string","description":"Reserved for future use."}},"title":"Query Options","$$ref":"#/definitions/collection_serviceQueryOptions"},"result":{"type":"object","properties":{"request_result":{"description":"The result values indicates whether the request was accepted or rejected, not the outcome of the work itself.","type":"string","enum":["UNKNOWN_RESULT","REJECTED","ACCEPTED"],"default":"UNKNOWN_RESULT","$$ref":"#/definitions/collection_serviceRequestResult"},"error":{"description":"A text message describing the reason for rejection. It can be safely passed on to the operator through logs or the UI.","type":"object","properties":{"error":{"type":"string","description":"Message is a textual description of the reason for rejection. You can safely pass it on to the operator through logs or the UI."}},"title":"Error associated with an object","$$ref":"#/definitions/collection_serviceError"}},"description":"Result is used to convey whether an operation (individual or in a batch) has been accepted or rejected.\nFor sync APIs, an error or rejection indicates failure of the operation.\nA string error message accompanies rejection to support troubleshooting.\nFor notification objects, rejection represents failure to do intended operation.","$$ref":"#/definitions/collection_serviceResult","title":"Result reply"}},"example":{"template_collection_data_status_list":[{"device_data":{"device_id":"3d2b878b-3f11-4a65-a226-63864b089a1b","host_name":"device-01"},"sensor_template_input_status_list":[{"sensor_template":{"sensor_template_id":"template-test-version-template","collection_type":"CLI_COLLECTOR","sensor_template_Definition":{"cli_sensor_template":{"template_command":{"templatecommand":"show interfaces","template_variables":["command"]}}},"cadence_in_millisec":"10000"},"sensor_template_input_status":{"sensor_template_status_per_parameter_value":[{"parameter_value":{"template_param_value":[]},"collection_status":{"state":"UNKNOWN_COLLECTION_STATE","error":{"error":""},"reported_time":"1739196040452"}}]}}],"sensor_template_output_status_list":[{"destination":{"destination_id":"c2a8fba8-8363-3d22-b0c2-a9e449693fae","context_id":"dest_context1","destination_name":""},"sensor_template":{"sensor_template_id":"template-test-version-template","collection_type":"CLI_COLLECTOR","sensor_template_Definition":{"cli_sensor_template":{"template_command":{"templatecommand":"show interfaces","template_variables":["command"]}}},"cadence_in_millisec":"10000"},"sensor_template_output_status":{"sensor_template_status_per_parameter_value":[{"parameter_value":{"template_param_value":[]},"collection_status":{"state":"UNKNOWN_COLLECTION_STATE","error":{"error":""},"reported_time":"1739200952656"}}]}}]}],"query_options":null,"result":{"request_result":"ACCEPTED","error":{"error":""}}},"title":"GetTemplateCollectionDataStatusResponse returns the device and CDG collection status per template","$$ref":"#/definitions/collection_serviceGetTemplateCollectionDataStatusResponse"}},"default":{"description":"An unexpected error response.","schema":{"type":"object","properties":{"template_collection_data_status_list":{"type":"array","items":{"type":"object","properties":{"device_data":{"description":"Device data on which operation was carried out, its the combination of device_id and hostname_name(optional).","type":"object","properties":{"device_id":{"type":"string","description":"UUID of the device in the Crosswork inventory."},"host_name":{"type":"string","description":"The host name of the device in the Crosswork inventory. Optional to populate."}},"title":"Device Data","$$ref":"#/definitions/collection_serviceDeviceData"},"sensor_template_input_status_list":{"type":"array","items":{"type":"object","properties":{"sensor_template":{"type":"object","properties":{"sensor_template_id":{"type":"string","title":"Unique handle to identify a sensor template"},"collection_type":{"title":"Style of collection. At this time only app-managed lifetimetype is supported for templatized jobs","type":"string","enum":["UNKNOWN_COLLECTOR","MDT_COLLECTOR","SNMP_COLLECTOR","CLI_COLLECTOR","TRAP_COLLECTOR","GNMI_COLLECTOR","SYSLOG_COLLECTOR"],"default":"UNKNOWN_COLLECTOR","$$ref":"#/definitions/common_collection_dataCollectionType"},"sensor_template_Definition":{"title":"Specify the sensor template information e.g. path and parameters","type":"object","properties":{"cli_sensor_template":{"type":"object","properties":{"template_command":{"title":"Example show interface\nshow interface .{{interface_name}}\nshow interface | utility egrep expr .{{interface_name}}","type":"object","properties":{"templatecommand":{"type":"string"},"template_variables":{"type":"array","items":{"type":"string"}}},"$$ref":"#/definitions/common_collection_dataTemplateCommand"},"template_device_package":{"title":"Total size is limited to 512 characters","type":"object","properties":{"device_package_name":{"type":"string","title":"XDE device package name"},"function_name":{"type":"string","title":"XDE function name within package"},"template_params":{"type":"array","items":{"type":"string"},"title":"Template params in Device package\nAll params of device package function are mandatory templatized params"}},"$$ref":"#/definitions/common_collection_dataTemplateDevicePackage"}},"title":"Use with Cli Sensor\nThe message accepts templatized CLI command or a templatized device package with parameters specified wihin curly brackets(see ex below)\nThe message also accepts a list of valid parameter keys to be accepted","$$ref":"#/definitions/common_collection_dataCliSensorTemplate"},"gnmi_sensor_template":{"type":"object","properties":{"gnmi_path":{"type":"string","title":"String encoded GNMI path with template variables specified\nExample: \"Cisco-IOS-XR-l2vpn-oper:l2vpnv2/active/xconnects/xconnect[xconnect-name=.{{xconnect}}]/.{{segment}}/pseudo-wire/state\""},"template_variables":{"type":"array","items":{"type":"string"},"title":"List of paramaters applicable to the sensor specified in go template format : \"{{ .FieldName }}\"\nIf vraibles can be directly be inferred from the path then not needed"}},"title":"Reference: gNMI Specification Section 3.5.1.3\nThis is used when large number of leaf level collections need to be done\nThe message accepts a string encoded GNMI path with parameters specified wihin curly brackets (see ex below)\nThe message also accepts a list of valid parameter keys to be accepted","$$ref":"#/definitions/common_collection_dataGnmiSensorTemplate"}},"$$ref":"#/definitions/common_collection_dataSensorTemplateDefinition"},"cadence_in_millisec":{"type":"string","format":"uint64","title":"Specify the cadence at which path is to be collected"}},"title":"SensorTemplate contains details of templated sensor per collect type","$$ref":"#/definitions/common_collection_dataSensorTemplate"},"sensor_template_input_status":{"title":"Status","type":"object","properties":{"sensor_template_status_per_parameter_value":{"type":"array","items":{"type":"object","properties":{"parameter_value":{"type":"object","properties":{"template_param_value":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters values for sensor template variables"}},"title":"Specify parameter values for template parameters","$$ref":"#/definitions/common_collection_dataParameterValue"},"collection_status":{"title":"Template collection state","type":"object","properties":{"state":{"title":"The object state","type":"string","enum":["UNKNOWN_COLLECTION_STATE","ACTIVE_STATE","INACTIVE_STATE","ACCEPTED_STATE"],"default":"UNKNOWN_COLLECTION_STATE","description":"- ACTIVE_STATE: Object is behaving as expected\n - INACTIVE_STATE: Object is in a bad state.\n - ACCEPTED_STATE: Object is under evaluation.","$$ref":"#/definitions/collection_serviceCollectionState"},"error":{"title":"Error (if any)","type":"object","properties":{"error":{"type":"string","description":"Message is a textual description of the reason for rejection. You can safely pass it on to the operator through logs or the UI."}},"$$ref":"#/definitions/collection_serviceError"},"reported_time":{"type":"string","format":"uint64","title":"Event time"}},"$$ref":"#/definitions/collection_serviceCollectionStatus"}},"title":"Template Collection status per parameter value","$$ref":"#/definitions/collection_serviceSensorTemplateStatusPerParameterValue"},"title":"Status"}},"$$ref":"#/definitions/collection_serviceSensorTemplateStatus"}},"$$ref":"#/definitions/collection_serviceSensorTemplateInputStatus"},"title":"Status per-device and per-sensor on the input collection side"},"sensor_template_output_status_list":{"type":"array","items":{"type":"object","properties":{"destination":{"type":"object","properties":{"destination_id":{"type":"string","title":"Unique identifier for a Destination Provider in Inventory"},"context_id":{"type":"string","description":"Destination context identifier.\nIt could be topic name if the destination is message bus.\nThe combination of destination_id and context_id needs to be unique for a Destination.\nWhat context id means depends on the destination type of the destination provider.\nIf \"GRPC\" is the destination type, context_id is not used and will be ignored."},"destination_name":{"type":"string","description":"The name of the destination. Not used during write operations, but optionally filled when using GET APIs.\nIt maps to the destination provider name in Crosswork Device Lifecycle Manager (DLM)."}},"description":"Use the destination identifier to uniquely identify a destination.\nThe output encoding format for the destination is derived from the Inventory destination_id.","$$ref":"#/definitions/collection_serviceDestination","title":"Destination"},"sensor_template":{"type":"object","properties":{"sensor_template_id":{"type":"string","title":"Unique handle to identify a sensor template"},"collection_type":{"title":"Style of collection. At this time only app-managed lifetimetype is supported for templatized jobs","type":"string","enum":["UNKNOWN_COLLECTOR","MDT_COLLECTOR","SNMP_COLLECTOR","CLI_COLLECTOR","TRAP_COLLECTOR","GNMI_COLLECTOR","SYSLOG_COLLECTOR"],"default":"UNKNOWN_COLLECTOR","$$ref":"#/definitions/common_collection_dataCollectionType"},"sensor_template_Definition":{"title":"Specify the sensor template information e.g. path and parameters","type":"object","properties":{"cli_sensor_template":{"type":"object","properties":{"template_command":{"title":"Example show interface\nshow interface .{{interface_name}}\nshow interface | utility egrep expr .{{interface_name}}","type":"object","properties":{"templatecommand":{"type":"string"},"template_variables":{"type":"array","items":{"type":"string"}}},"$$ref":"#/definitions/common_collection_dataTemplateCommand"},"template_device_package":{"title":"Total size is limited to 512 characters","type":"object","properties":{"device_package_name":{"type":"string","title":"XDE device package name"},"function_name":{"type":"string","title":"XDE function name within package"},"template_params":{"type":"array","items":{"type":"string"},"title":"Template params in Device package\nAll params of device package function are mandatory templatized params"}},"$$ref":"#/definitions/common_collection_dataTemplateDevicePackage"}},"title":"Use with Cli Sensor\nThe message accepts templatized CLI command or a templatized device package with parameters specified wihin curly brackets(see ex below)\nThe message also accepts a list of valid parameter keys to be accepted","$$ref":"#/definitions/common_collection_dataCliSensorTemplate"},"gnmi_sensor_template":{"type":"object","properties":{"gnmi_path":{"type":"string","title":"String encoded GNMI path with template variables specified\nExample: \"Cisco-IOS-XR-l2vpn-oper:l2vpnv2/active/xconnects/xconnect[xconnect-name=.{{xconnect}}]/.{{segment}}/pseudo-wire/state\""},"template_variables":{"type":"array","items":{"type":"string"},"title":"List of paramaters applicable to the sensor specified in go template format : \"{{ .FieldName }}\"\nIf vraibles can be directly be inferred from the path then not needed"}},"title":"Reference: gNMI Specification Section 3.5.1.3\nThis is used when large number of leaf level collections need to be done\nThe message accepts a string encoded GNMI path with parameters specified wihin curly brackets (see ex below)\nThe message also accepts a list of valid parameter keys to be accepted","$$ref":"#/definitions/common_collection_dataGnmiSensorTemplate"}},"$$ref":"#/definitions/common_collection_dataSensorTemplateDefinition"},"cadence_in_millisec":{"type":"string","format":"uint64","title":"Specify the cadence at which path is to be collected"}},"title":"SensorTemplate contains details of templated sensor per collect type","$$ref":"#/definitions/common_collection_dataSensorTemplate"},"sensor_template_output_status":{"title":"Output side template collection status per destination","type":"object","properties":{"sensor_template_status_per_parameter_value":{"type":"array","items":{"type":"object","properties":{"parameter_value":{"type":"object","properties":{"template_param_value":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters values for sensor template variables"}},"title":"Specify parameter values for template parameters","$$ref":"#/definitions/common_collection_dataParameterValue"},"collection_status":{"title":"Template collection state","type":"object","properties":{"state":{"title":"The object state","type":"string","enum":["UNKNOWN_COLLECTION_STATE","ACTIVE_STATE","INACTIVE_STATE","ACCEPTED_STATE"],"default":"UNKNOWN_COLLECTION_STATE","description":"- ACTIVE_STATE: Object is behaving as expected\n - INACTIVE_STATE: Object is in a bad state.\n - ACCEPTED_STATE: Object is under evaluation.","$$ref":"#/definitions/collection_serviceCollectionState"},"error":{"title":"Error (if any)","type":"object","properties":{"error":{"type":"string","description":"Message is a textual description of the reason for rejection. You can safely pass it on to the operator through logs or the UI."}},"$$ref":"#/definitions/collection_serviceError"},"reported_time":{"type":"string","format":"uint64","title":"Event time"}},"$$ref":"#/definitions/collection_serviceCollectionStatus"}},"title":"Template Collection status per parameter value","$$ref":"#/definitions/collection_serviceSensorTemplateStatusPerParameterValue"},"title":"Status"}},"$$ref":"#/definitions/collection_serviceSensorTemplateStatus"}},"title":"Template Collection output status","$$ref":"#/definitions/collection_serviceSensorTemplateOutputStatus"},"title":"Status per-device and per-destination on the output collection side"}},"title":"TemplateCollectionJob Data Status from CDG Instances\nContextId : robot.collector.helios.collection.datastatus","$$ref":"#/definitions/collection_serviceTemplateCollectionDataStatus"},"title":"The input and output collection"},"query_options":{"type":"object","properties":{"page_token":{"type":"string","title":"Page token used to echo back to get the next page. If collection_job_device_sets is empty or the page token are empty, there are no more results"},"page_size":{"type":"integer","format":"int64","title":"page_size"},"filter_list":{"type":"array","items":{"type":"object","properties":{"operator":{"description":"The filter logical or conditional operator (such as AND, OR, \u003e, \u003c).","type":"string","enum":["UNKNOWN_OPERATOR","OPERATOR_OR","OPERATOR_AND","OPERATOR_EQ","OPERATOR_REGEX","OPERATOR_CONTAINS"],"default":"UNKNOWN_OPERATOR","$$ref":"#/definitions/collection_serviceFilterOperator"},"field_list":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field to filter on. Only CollectionState String is supported."},"value":{"type":"string","description":"The field value to filter on. For non-strings, the backend will convert it to honor actual DB type."}},"$$ref":"#/definitions/collection_serviceFilterField"},"title":"The list of filter criteria"}},"title":"Filter","$$ref":"#/definitions/collection_serviceFilter"},"title":"filtering options"},"filter_query":{"type":"string","description":"Reserved for future use."}},"title":"Query Options","$$ref":"#/definitions/collection_serviceQueryOptions"},"result":{"type":"object","properties":{"request_result":{"description":"The result values indicates whether the request was accepted or rejected, not the outcome of the work itself.","type":"string","enum":["UNKNOWN_RESULT","REJECTED","ACCEPTED"],"default":"UNKNOWN_RESULT","$$ref":"#/definitions/collection_serviceRequestResult"},"error":{"description":"A text message describing the reason for rejection. It can be safely passed on to the operator through logs or the UI.","type":"object","properties":{"error":{"type":"string","description":"Message is a textual description of the reason for rejection. You can safely pass it on to the operator through logs or the UI."}},"title":"Error associated with an object","$$ref":"#/definitions/collection_serviceError"}},"description":"Result is used to convey whether an operation (individual or in a batch) has been accepted or rejected.\nFor sync APIs, an error or rejection indicates failure of the operation.\nA string error message accompanies rejection to support troubleshooting.\nFor notification objects, rejection represents failure to do intended operation.","$$ref":"#/definitions/collection_serviceResult","title":"Result reply"}},"example":{"template_collection_data_status_list":[],"query_options":null,"result":{"request_result":"REJECTED","error":{"error":"empty device id in request"}}},"$$ref":"#/definitions/templatecollectionjobdatastatusqueryErrorResponse"}}},"parameters":[{"name":"body","in":"body","description":"Get Template Collection Job Data Status.","required":true,"schema":{"type":"object","properties":{"application_context":{"description":"The application_context is a handle that uniquely identifies your application's collection job. It serves as the key to the object on which CRUD operations are performed.\nThe combination of application_id and context_id should be unique globally.","type":"object","properties":{"application_id":{"type":"string","description":"The application_id is a unique ID that identifies your application. Crosswork applications always prefix the application_id with “cw“."},"context_id":{"type":"string","description":"The context_id is a unique ID that identifies your application subscription across all collection jobs. We recommend that you use the device UUID for the context_id."}},"$$ref":"#/definitions/collection_serviceApplicationContext"},"device_data":{"description":"Device data on which operation was carried out, its the combination of device_id and hostname_name(optional).","type":"object","properties":{"device_id":{"type":"string","description":"UUID of the device in the Crosswork inventory."},"host_name":{"type":"string","description":"The host name of the device in the Crosswork inventory. Optional to populate."}},"title":"Device Data","$$ref":"#/definitions/collection_serviceDeviceData"},"template_query_parameters":{"type":"array","items":{"type":"object","properties":{"template_id":{"type":"string","title":"template_id"},"parameter_values":{"description":"The set of parameter combinations to be queried. If you specify no parameters, the query will consider all template parameters.","type":"object","properties":{"template_param_values":{"type":"array","items":{"type":"object","properties":{"template_param_value":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters values for sensor template variables"}},"title":"Specify parameter values for template parameters","$$ref":"#/definitions/common_collection_dataParameterValue"},"title":"Parameters value combinations set for sensor template variables\nfor ex: \n\"template_param_values\": [\n {{\"vrf\":\"vrf1\"}, {\"neighbor-ip\":\"ip1\"}},\n {{\"vrf\":\"vrf1\"}, {\"neighbor-ip\":\"ip2\"}},\n {{\"vrf\":\"vrf1\"}, {\"neighbor-ip\":\"ip3\"}}\n ]"}},"title":"Specify multiple parameter value sets for template parameters","$$ref":"#/definitions/common_collection_dataParameterValues"}},"$$ref":"#/definitions/collection_serviceTemplateQueryParameters"},"title":"Specify template query parameters"},"query_options":{"type":"object","properties":{"page_token":{"type":"string","title":"Page token used to echo back to get the next page. If collection_job_device_sets is empty or the page token are empty, there are no more results"},"page_size":{"type":"integer","format":"int64","title":"page_size"},"filter_list":{"type":"array","items":{"type":"object","properties":{"operator":{"description":"The filter logical or conditional operator (such as AND, OR, \u003e, \u003c).","type":"string","enum":["UNKNOWN_OPERATOR","OPERATOR_OR","OPERATOR_AND","OPERATOR_EQ","OPERATOR_REGEX","OPERATOR_CONTAINS"],"default":"UNKNOWN_OPERATOR","$$ref":"#/definitions/collection_serviceFilterOperator"},"field_list":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","description":"The name of the field to filter on. Only CollectionState String is supported."},"value":{"type":"string","description":"The field value to filter on. For non-strings, the backend will convert it to honor actual DB type."}},"$$ref":"#/definitions/collection_serviceFilterField"},"title":"The list of filter criteria"}},"title":"Filter","$$ref":"#/definitions/collection_serviceFilter"},"title":"filtering options"},"filter_query":{"type":"string","description":"Reserved for future use."}},"title":"Query Options","$$ref":"#/definitions/collection_serviceQueryOptions"}},"example":{"application_context":{"application_id":"proto_template_test_app","context_id":"proto_template_test_context"},"device_data":{"device_id":"3d2b878b-3f11-4a65-a226-63864b089a1b","host_name":""},"template_query_parameters":[{"template_id":"template-test-version-template","parameter_values":{"template_param_values":[{"template_param_value":[{"key":"command","string_value":"test"}]}]}}]},"description":"GetTemplateCollectionDataStatusRequest is the query request for the Crosswork Data Gateway (CDG) collection status.\nYou must specify the device, applicaion_context, templateId, parameter key, and single value to fetch the status from CDG.","$$ref":"#/definitions/collection_serviceGetTemplateCollectionDataStatusRequest"}}],"tags":["CollectionService"],"__originalOperationId":"CollectionService_GetTemplateCollectionDataStatusPerDevice","consumes":["application/json"],"produces":["application/json"],"method":"post","path":"/templatecollectionjob/datastatus/query"}}