{"type":"api","title":"Get Template Collection Job Count","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 Collection Job Count","description":"Use GetTemplateCollectionJobCount to get a count of all the template jobs in the system.\nIf you pass the collection job application context with the request, the return data will include the input and output count per template collection job.\nIf you don’t pass the application context, the API returns a count of all inputs and outputs in the system for all collection jobs.\nThe input and output counts are based on the templates applied to the device(s), not the actual collections.","operationId":"CollectionService_GetTemplateCollectionJobCount","responses":{"200":{"description":"OK. The request was successful. The result is contained in the response body","schema":{"type":"object","properties":{"job_count":{"type":"string","format":"uint64","title":"job count"},"input_template_task_count":{"type":"string","format":"uint64","title":"Summary of the templates per-device for the given template job(s)"},"output_template_task_count":{"type":"string","format":"uint64","title":"summary of the templates per-device and destinations per-template for the given template job(s)"},"input_error_template_task_count":{"type":"string","format":"uint64","description":"The error count on a per-template per-device basis. The value will be 0 as status is on-demand for template jobs. Intended for future use."},"output_error_template_task_count":{"type":"string","format":"uint64","description":"The error count on a per-template per-device basis. The value will be 0 as status is on-demand for template jobs. Intended for future use."},"control_error_count":{"type":"string","format":"uint64","description":"As MDT is not supported currently, value will be 0. Intended for future use."},"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"}},"example":{"job_count":"1","input_template_task_count":"1","output_template_task_count":"1","input_error_template_task_count":"0","output_error_template_task_count":"0","control_error_count":"0","result":{"request_result":"ACCEPTED","error":{"error":""}}},"description":"Returns a total count of template jobs, total template input/output, and errors in the system if you do not specify an ApplicationContext or virtual Crosswork Data Gateway (CDG) ID.\nIf you specify an ApplicationContext or virtual CDG ID, it provides these counts for the specified collection job.","$$ref":"#/definitions/collection_serviceGetTemplateCollectionJobCountResponse"}},"default":{"description":"An unexpected error response.","schema":{"type":"object","properties":{"job_count":{"type":"string","format":"uint64","title":"job count"},"input_template_task_count":{"type":"string","format":"uint64","title":"Summary of the templates per-device for the given template job(s)"},"output_template_task_count":{"type":"string","format":"uint64","title":"summary of the templates per-device and destinations per-template for the given template job(s)"},"input_error_template_task_count":{"type":"string","format":"uint64","description":"The error count on a per-template per-device basis. The value will be 0 as status is on-demand for template jobs. Intended for future use."},"output_error_template_task_count":{"type":"string","format":"uint64","description":"The error count on a per-template per-device basis. The value will be 0 as status is on-demand for template jobs. Intended for future use."},"control_error_count":{"type":"string","format":"uint64","description":"As MDT is not supported currently, value will be 0. Intended for future use."},"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"}},"example":{"job_count":"0","input_template_task_count":"0","output_template_task_count":"0","input_error_template_task_count":"0","output_error_template_task_count":"0","control_error_count":"0","result":{"request_result":"REJECTED","error":{"error":"empty request"}}},"$$ref":"#/definitions/templatecollectionjobcountqueryErrorResponse"}}},"parameters":[{"name":"body","in":"body","description":"Get Template Collection Job Count.","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"},"v_cdg_id":{"type":"string","description":"Unique handle to identify the collection job based on the virtual Crosswork Data Gateway (CDG) ID."}},"example":{"application_context":{"application_id":"proto_template_test_app","context_id":"proto_template_test_context"},"v_cdg_id":"virtual-cdg-id-12345"},"description":"GetTemplateCollectionJobCountRequest encapsulates requests for the associated template job count based on either the ApplicationContext or virtual Crosswork Data Gateway (CDG) ID.","$$ref":"#/definitions/collection_serviceGetTemplateCollectionJobCountRequest"}}],"tags":["CollectionService"],"__originalOperationId":"CollectionService_GetTemplateCollectionJobCount","consumes":["application/json"],"produces":["application/json"],"method":"post","path":"/templatecollectionjob/count/query"}}