{"type":"api","title":"Get Collection Job summary","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 Collection Job summary","description":"Use the GetCollectionJobSummary API to track the operational status of requests within the Collection Service.\nIt returns the current status, such as READY, NOT_READY, FAILED, and so on. \nIf the current status phase is TERMINATING or TERMINATION_FAILED, you cannot perform create or update operations on the ApplicationContext.\nIf the phase status is TERMINATION_FAILED, the application can attempt to retry a delete on the Collection Job. Once the CollectionJob enters the TERMINATING or TERMINATION_FAILED phase, the status of the job is no longer relevant.\nSupplying an ApplicationContext is optional.","operationId":"CollectionService_GetCollectionJobSummary","responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body","schema":{"type":"object","properties":{"collection_job_status_list":{"type":"array","items":{"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"},"creation_time":{"type":"string","format":"uint64","title":"The time when the request was created. Specified as UTC epoch time, in milliseconds"},"deletion_time":{"type":"string","format":"uint64","description":"The time when the request for deletion was initiated. Specified as UTC epoch time, in milliseconds."},"progress":{"type":"number","format":"float","description":"The current progress, specified as a percentage."},"status":{"title":"Current status of the overall job (that is, READY, NOT_READY, or FAILED)","type":"string","enum":["UNKNOWN_STATUS","NOTREADY","READY","FAILED"],"default":"UNKNOWN_STATUS","description":"- NOTREADY: Indicates that initial setup of the object is in progress or being retried.\n - READY: Indicates that initial setup of the object is complete and collection organised.\nThe status changes to READY only on success across all devices.\n - FAILED: An unrecoverable failure has occurred, associated with the object.\nStatus changes to FAILED even if only one of the devices specified in the request encountered a failure.","$$ref":"#/definitions/collection_serviceStatus"},"phase":{"description":"The current execution status of the request: ACTIVE, TERMINATING, TERMINATION_FAILED, DELETED.","type":"string","enum":["UNKNOWN_PHASE","ACTIVE","TERMINATING","TERMINATION_FAILED","DELETED"],"default":"UNKNOWN_PHASE","title":"The collection job status phase indicates whether the request associated with the ApplicationContext is alive or marked for deletion within the collection service","$$ref":"#/definitions/collection_servicePhase"},"collector_type":{"title":"CollectType","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"},"job_error":{"description":"If the job is in the FAILED or TERMINATION_FAILED state: A descriptive summary of the error, indicating the reason for the failure.","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"}},"title":"CollectionJobStatus represents the current status of the job\nContextId : robot.collector.helios.collectionjob.summary","$$ref":"#/definitions/collection_serviceCollectionJobStatus"},"title":"CollectionJobStatus represents the current status of the job"},"query_options":{"title":"Pagination and other 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."}},"$$ref":"#/definitions/collection_serviceQueryOptions"},"result":{"description":"CollectionJobStatus represents the current status of the job.","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"}},"$$ref":"#/definitions/collection_serviceResult"}},"example":{"collection_job_status_list":[{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/te-tunnel-id/subscription"},"creation_time":"1736197004299","deletion_time":"0","progress":100,"status":"READY","phase":"ACTIVE","collector_type":"CLI_COLLECTOR","job_error":{"error":""}}],"query_options":null,"result":{"request_result":"ACCEPTED","error":{"error":""}}},"$$ref":"#/definitions/collection_serviceGetCollectionJobSummaryResponse"}},"default":{"description":"An unexpected error response.","schema":{"type":"object","properties":{"collection_job_status_list":{"type":"array","items":{"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"},"creation_time":{"type":"string","format":"uint64","title":"The time when the request was created. Specified as UTC epoch time, in milliseconds"},"deletion_time":{"type":"string","format":"uint64","description":"The time when the request for deletion was initiated. Specified as UTC epoch time, in milliseconds."},"progress":{"type":"number","format":"float","description":"The current progress, specified as a percentage."},"status":{"title":"Current status of the overall job (that is, READY, NOT_READY, or FAILED)","type":"string","enum":["UNKNOWN_STATUS","NOTREADY","READY","FAILED"],"default":"UNKNOWN_STATUS","description":"- NOTREADY: Indicates that initial setup of the object is in progress or being retried.\n - READY: Indicates that initial setup of the object is complete and collection organised.\nThe status changes to READY only on success across all devices.\n - FAILED: An unrecoverable failure has occurred, associated with the object.\nStatus changes to FAILED even if only one of the devices specified in the request encountered a failure.","$$ref":"#/definitions/collection_serviceStatus"},"phase":{"description":"The current execution status of the request: ACTIVE, TERMINATING, TERMINATION_FAILED, DELETED.","type":"string","enum":["UNKNOWN_PHASE","ACTIVE","TERMINATING","TERMINATION_FAILED","DELETED"],"default":"UNKNOWN_PHASE","title":"The collection job status phase indicates whether the request associated with the ApplicationContext is alive or marked for deletion within the collection service","$$ref":"#/definitions/collection_servicePhase"},"collector_type":{"title":"CollectType","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"},"job_error":{"description":"If the job is in the FAILED or TERMINATION_FAILED state: A descriptive summary of the error, indicating the reason for the failure.","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"}},"title":"CollectionJobStatus represents the current status of the job\nContextId : robot.collector.helios.collectionjob.summary","$$ref":"#/definitions/collection_serviceCollectionJobStatus"},"title":"CollectionJobStatus represents the current status of the job"},"query_options":{"title":"Pagination and other 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."}},"$$ref":"#/definitions/collection_serviceQueryOptions"},"result":{"description":"CollectionJobStatus represents the current status of the job.","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"}},"$$ref":"#/definitions/collection_serviceResult"}},"example":{"collection_job_status_list":[],"query_options":null,"result":{"request_result":"REJECTED","error":{"error":"empty request"}}},"$$ref":"#/definitions/summaryqueryErrorResponse"}}},"parameters":[{"name":"body","in":"body","description":"Get Collection Job Summary.","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"},"query_options":{"title":"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."}},"$$ref":"#/definitions/collection_serviceQueryOptions"}},"example":{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/te-tunnel-id/subscription"},"query_options":{"filter_list":[],"page_token":"","page_size":500}},"description":"GetCollectionJobSummaryRequest returns a summary of operational status for all collection jobs if the device_id is empty for the given ApplicationContext.\nOtherwise, it returns the same summary on a per-device basis.","$$ref":"#/definitions/collection_serviceGetCollectionJobSummaryRequest"}}],"tags":["CollectionService"],"__originalOperationId":"CollectionService_GetCollectionJobSummary","consumes":["application/json"],"produces":["application/json"],"method":"post","path":"/collectionjob/summary/query"}}