{"type":"api","title":"Get 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 Collection Job Count","description":"Use the CollectionService_GetCollectionJobCount API to get the count of collection jobs in the system, along with the count of inputs, outputs, and errors for these jobs. \nSpecify a collection job ApplicationContext to get the counts for the specified collection job.\nIf you do not specify the collection job ApplicationContext, this API returns the input, output, and error counts for all the collection jobs in the system.","operationId":"CollectionService_GetCollectionJobCount","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_collection_count":{"type":"string","format":"uint64","title":"The number of input sensor collection endpoints for the given collection job(s)"},"output_collection_count":{"type":"string","format":"uint64","title":"The number of output collection endpoints for the given collection job(s)"},"input_error_collection_count":{"type":"string","format":"uint64","title":"The number of input sensor collection endpoints for the given collection job(s)"},"output_error_collection_count":{"type":"string","format":"uint64","title":"The number of output collection endpoints for the given collection job(s)"},"control_error_count":{"type":"string","format":"uint64","title":"The number of output collection endpoints for the given collection job(s)"},"result":{"title":"The result of the collection","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"},"device_count":{"type":"string","format":"uint64","title":"The number of devices involved for the given collection job(s)"},"input_filtered_count":{"type":"string","format":"uint64","title":"The number of filtered input sensor collection endpoints for given collection job(s)"},"output_filtered_count":{"type":"string","format":"uint64","title":"The number of filtered output sensor collection endpoints for given collection job(s)"}},"example":{"job_count":"1","input_collection_count":"3","output_collection_count":"3","input_error_collection_count":"0","output_error_collection_count":"0","control_error_count":"0","result":{"request_result":"ACCEPTED","error":{"error":""}},"device_count":"3","input_filtered_count":"3","output_filtered_count":"3"},"description":"Return the total count of collect jobs, collection endpoints, and errors in the system if you do not specify an ApplicationContext or virtual Crosswork Data Gateway (CDG) ID.\nIf you do supply the ApplicationContext or virtual CDG ID, it returns the same counts for that collection job only.","$$ref":"#/definitions/collection_serviceGetCollectionJobCountResponse"}},"default":{"description":"An unexpected error response.","schema":{"type":"object","properties":{"job_count":{"type":"string","format":"uint64","title":"job count"},"input_collection_count":{"type":"string","format":"uint64","title":"The number of input sensor collection endpoints for the given collection job(s)"},"output_collection_count":{"type":"string","format":"uint64","title":"The number of output collection endpoints for the given collection job(s)"},"input_error_collection_count":{"type":"string","format":"uint64","title":"The number of input sensor collection endpoints for the given collection job(s)"},"output_error_collection_count":{"type":"string","format":"uint64","title":"The number of output collection endpoints for the given collection job(s)"},"control_error_count":{"type":"string","format":"uint64","title":"The number of output collection endpoints for the given collection job(s)"},"result":{"title":"The result of the collection","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"},"device_count":{"type":"string","format":"uint64","title":"The number of devices involved for the given collection job(s)"},"input_filtered_count":{"type":"string","format":"uint64","title":"The number of filtered input sensor collection endpoints for given collection job(s)"},"output_filtered_count":{"type":"string","format":"uint64","title":"The number of filtered output sensor collection endpoints for given collection job(s)"}},"example":{"job_count":"0","input_collection_count":"0","output_collection_count":"0","input_error_collection_count":"0","output_error_collection_count":"0","control_error_count":"0","result":{"request_result":"REJECTED","error":{"error":"application_context's app_id is empty"}},"device_count":"0","input_filtered_count":"0","output_filtered_count":"0"},"$$ref":"#/definitions/countqueryErrorResponse"}}},"parameters":[{"name":"body","in":"body","description":"Get 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":"A unique handle to identify the collection job based on the virtual Crosswork Data Gateway (CDG) ID."},"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"}},"example":{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/te-tunnel-id/subscription"},"device_data":{"device_id":"","host_name":""},"query_options":{"filter_list":[],"page_token":"","page_size":500}},"description":"GetCollectionJobCountRequest encapsulates requests for the associated collection job count based on either the ApplicationContext or the virtual Crosswork Data Gateway (CDG) ID.","$$ref":"#/definitions/collection_serviceGetCollectionJobCountRequest"}}],"tags":["CollectionService"],"__originalOperationId":"CollectionService_GetCollectionJobCount","consumes":["application/json"],"produces":["application/json"],"method":"post","path":"/collectionjob/count/query"}}