{"type":"api","title":"Get Job Events","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 Job Events","description":"GetJobEvents serves as a generic API to get underlying events for a given job in Collection Services.","operationId":"CollectionService_GetJobEvents","responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body","schema":{"type":"object","properties":{"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"},"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"},"events":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"uint64"},"description":{"type":"string"}},"description":"JobEvent combines a detailed description of an event with an associated timestamp indicating when the event occured.\nThe timestamp is the Unix epoch in milliseconds.","$$ref":"#/definitions/collection_serviceJobEvent"}}},"example":{"result":{"request_result":"ACCEPTED","error":{"error":""}},"query_options":{"page_token":"15","page_size":100,"filter_list":[],"filter_query":""},"events":[{"timestamp":"1739189572410","description":"Export job - create init phase"},{"timestamp":"1739189572480","description":"Export job - create configuration phase"},{"timestamp":"1739189572526","description":"Export job - create EOF phase"},{"timestamp":"1739189572545","description":"Export job - distributing request"},{"timestamp":"1739189572601","description":"Export job - distributing request successful"},{"timestamp":"1739189572611","description":"Export job - notifying Magellan"},{"timestamp":"1739189572615","description":"Export job - notifying Magellan successful"},{"timestamp":"1739189587649","description":"Export job - exporting results from DB"},{"timestamp":"1739189587703","description":"Export job - exporting results from DB successful"},{"timestamp":"1739189587746","description":"Export job - packing results"},{"timestamp":"1739189587781","description":"Export job - packing results successful"},{"timestamp":"1739189587823","description":"Export job - encrypting file"},{"timestamp":"1739189588095","description":"Export job - encrypting file successful"},{"timestamp":"1739189588111","description":"Export job - sending data to destination server"},{"timestamp":"1739189588371","description":"Export job - sending data to destination server successful"}]},"description":"GetJobEventsResponse encapsulates a generic response from the collection services API to a GetJobEventsRequest.\nIt includes a result to indicate success or failure of the request itself,\nwith an associated error message upon failure.","$$ref":"#/definitions/collection_serviceGetJobEventsResponse"}},"default":{"description":"An unexpected error response.","schema":{"type":"object","properties":{"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"},"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"},"events":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string","format":"uint64"},"description":{"type":"string"}},"description":"JobEvent combines a detailed description of an event with an associated timestamp indicating when the event occured.\nThe timestamp is the Unix epoch in milliseconds.","$$ref":"#/definitions/collection_serviceJobEvent"}}},"example":{"result":{"request_result":"REJECTED","error":{"error":"application_id:\"cw.dlminvmgr0\" context_id:\"dlm/cli-collector/group/te-tunnel-id/subscription1739\" is not present in the database"}},"query_options":null,"events":[]},"$$ref":"#/definitions/jobseventsErrorResponse"}}},"parameters":[{"name":"body","in":"body","description":"Get Job Event.","required":true,"schema":{"type":"object","properties":{"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"},"id":{"type":"object","properties":{"export_id":{"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"}},"description":"ExportCollectionsId serves as the globally unique identifier for an export collections job.","$$ref":"#/definitions/collection_serviceExportCollectionsId"}},"description":"JobId encapsulates many underlying collection job ID types.","$$ref":"#/definitions/collection_serviceJobId"}},"example":{"query_options":{"page_token":"0","page_size":100,"filter_list":[],"filter_query":""},"id":{"export_id":{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/te-tunnel-id/subscription1739189572141"}}}},"description":"GetJobEventsRequest encapsulates a generic request to the collection services API to get events associated to a pre-existing job,\nbased on the unique id provided in the request.\nCurrently the query options are not utilized.","$$ref":"#/definitions/collection_serviceGetJobEventsRequest"}}],"tags":["CollectionService"],"__originalOperationId":"CollectionService_GetJobEvents","consumes":["application/json"],"produces":["application/json"],"method":"post","path":"/jobs/events"}}