{"type":"api","title":"Delete Collection Job","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":"Delete Collection Job","description":"Use the DeleteCollectionJob API to mark a collection job (within a collection) for deletion based on the Application Context.\nThe Collection Service will clean up the associated sensor configs on collectors or devices asynchronously.\nUse the GetCollectionJobSummary API to track the progress of the deletion, as the job transitions from one phase to another.\nA Collection Job marked for deletion will move from the ACTIVE phase to the TERMINATING phase.\nOn successful termination, the AppContext will be deleted from the Collection Service.\nIf the deletion fails, the CollectionJob will enter TERMINATION_FAILED phase.In this case, you can try the deletion again, and the job will transition from the TERMINATION_FAILED phase to the TERMINATING phase.","operationId":"CollectionService_DeleteCollectionJob","responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body","schema":{"type":"object","properties":{"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":{"result":{"request_result":"ACCEPTED","error":{"error":""}}},"$$ref":"#/definitions/collection_serviceDeleteCollectionJobResponse"}},"default":{"description":"An unexpected error response.","schema":{"type":"object","properties":{"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":{"result":{"request_result":"REJECTED","error":{"error":"application_context is empty"}}},"$$ref":"#/definitions/deletecollectionErrorResopnse"}}},"parameters":[{"name":"body","in":"body","description":"Delete Collection Job Request.","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"}},"example":{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/te-tunnel-id/subscription1739189572141"}},"$$ref":"#/definitions/collection_serviceDeleteCollectionJobRequest"}}],"tags":["CollectionService"],"__originalOperationId":"CollectionService_DeleteCollectionJob","consumes":["application/json"],"produces":["application/json"],"method":"delete","path":"/collectionjob"}}