{"type":"api","title":"Create Export 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":"Create Export Collection Job","description":"CreateJob serves as a generic API to create many underlying types of jobs in Collection Services. \nCurrently, only export collections jobs are supported and identified by the ExportCollections object. \nThis allows contextual export of status and/or metrics based on Crosswork Data Gateway collection tasks.","operationId":"CollectionService_CreateJob","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"},"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":{"result":{"request_result":"ACCEPTED","error":{"error":""}},"id":{"export_id":{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/te-tunnel-id/subscription1739189572141"}}}},"description":"CreateJobResponse encapsulates a generic response to a CreateJobRequest, from the collection services API.\nIt includes a result to indicate success or failure of the request itself,\nwith an associated error message upon failure.\nThe response contains an associated job ID,\nwhich you can use in successive calls to the collection services APIs.","$$ref":"#/definitions/collection_serviceCreateJobResponse"}},"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"},"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":{"result":{"request_result":"REJECTED","error":{"error":"empty request"}},"id":null},"$$ref":"#/definitions/createJobErrorResopnse"}}},"parameters":[{"name":"body","in":"body","description":"Create Job.","required":true,"schema":{"type":"object","properties":{"export_collections":{"type":"object","properties":{"initiation":{"type":"object","properties":{"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"},"export_data":{"description":"Requested collection information type.","type":"string","enum":["UNKNOWN_EXPORT_DATA","EXPORT_STATUS","EXPORT_METRICS","EXPORT_STATUS_AND_METRICS"],"default":"UNKNOWN_EXPORT_DATA","$$ref":"#/definitions/collection_serviceExportData"},"destinations":{"type":"array","items":{"type":"object","properties":{"format":{"description":"Export format of the requested data.","type":"string","enum":["UNKNOWN_FORMAT","FORMAT_CSV"],"default":"UNKNOWN_FORMAT","$$ref":"#/definitions/collection_serviceExportFormat"},"destination":{"title":"SSH destination endpoint","type":"object","properties":{"remote_host":{"type":"string","title":"Remote host"},"username":{"type":"string","title":"Remote host user"},"password":{"type":"string","title":"Remote host password"},"port":{"type":"integer","format":"int64","title":"Remote host ssh port"}},"$$ref":"#/definitions/common_platformSshConfig"},"encryption_passphrase":{"type":"string","description":"Optional encryption key or passphrase."},"server_path":{"type":"string","description":"Where to place the resulting export data on the destination endpoint."}},"description":"ExportDestination encapsulates the required information to send (via SSH) the requested data to the desired host and in the proper format.","$$ref":"#/definitions/collection_serviceExportDestination"},"description":"Destinations to send (via SSH) the data upon completion.\nMultiples are allowed in cases where the requested data is to be replicated.\nNote that replication of data is currently not supported."},"timeout":{"type":"string","format":"uint64","title":"The maximum time to wait (in seconds) for the export collection job to complete"}},"description":"ExportCollectionsInitiation allows the initiation of an export collections job request.\nA CreateJobResponse will be returned with an associated job ID that should be provided in subsequent corresponding 'configuration' and 'eof' requests.","$$ref":"#/definitions/collection_serviceExportCollectionsInitiation"},"configuration":{"type":"object","properties":{"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"},"configuration":{"description":"Input specification paginated across 'configuration' requests.","type":"object","properties":{"specifications":{"type":"array","items":{"type":"object","properties":{"device_ids":{"type":"array","items":{"type":"string"},"description":"Device UUIDs."},"collection_type":{"description":"Collection type associated to the given device list.","type":"string","enum":["UNKNOWN_COLLECTOR","MDT_COLLECTOR","SNMP_COLLECTOR","CLI_COLLECTOR","TRAP_COLLECTOR","GNMI_COLLECTOR","SYSLOG_COLLECTOR"],"default":"UNKNOWN_COLLECTOR","title":"Supported Collect types","$$ref":"#/definitions/common_collection_dataCollectionType"},"export_path_type":{"description":"Path type associated to the given export paths list.","type":"string","enum":["EXPORT_PATH_TYPE_UNKNOWN","EXPORT_PATH_TYPE_TEMPLATE","EXPORT_PATH_TYPE_SENSOR","EXPORT_PATH_TYPE_TEMPLATE_AND_SENSOR"],"default":"EXPORT_PATH_TYPE_UNKNOWN","$$ref":"#/definitions/collection_serviceExportPathType"},"export_paths":{"type":"array","items":{"type":"object","properties":{"sensor_data":{"type":"object","properties":{"snmp_sensor":{"type":"object","properties":{"snmp_mib":{"title":"Snmp mib","type":"object","properties":{"snmp_operation":{"title":"SNMP operation type","type":"string","enum":["UNKNOWN_SNMP_OPERATION","WALK","SCALAR","TABLE","COLUMN"],"default":"UNKNOWN_SNMP_OPERATION","$$ref":"#/definitions/common_collection_dataSnmpOperation"},"oids":{"type":"array","items":{"type":"string"},"description":"Input sensor path:\n - SCALAR/COLUMN: single oid or a list of oids\n - NON-SCALAR (TABLE/WALK): - single oid only."}},"$$ref":"#/definitions/common_collection_dataSnmpMib"},"device_package":{"title":"Total size is limited to 512 characters","type":"object","properties":{"device_package_name":{"type":"string","title":"XDE device package name"},"function_name":{"type":"string","title":"XDE function name within package"},"parameters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters for custom device packages"}},"$$ref":"#/definitions/common_collection_dataDevicePackage"}},"$$ref":"#/definitions/common_collection_dataSnmpSensor"},"snmp_yang_sensor":{"type":"object","properties":{"path":{"type":"string","title":"Example SNMPv2-MIB:SNMPv2-MIB/system"}},"$$ref":"#/definitions/common_collection_dataSnmpYangSensor"},"cli_yang_sensor":{"type":"object","properties":{"path":{"type":"string","title":"Example cli_xr_show_logging:syslog"}},"$$ref":"#/definitions/common_collection_dataCliYangSensor"},"cli_sensor":{"type":"object","properties":{"command":{"type":"string","title":"Example show clock"},"device_package":{"title":"Total size is limited to 512 characters","type":"object","properties":{"device_package_name":{"type":"string","title":"XDE device package name"},"function_name":{"type":"string","title":"XDE function name within package"},"parameters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters for custom device packages"}},"$$ref":"#/definitions/common_collection_dataDevicePackage"}},"$$ref":"#/definitions/common_collection_dataCliSensor"},"mdt_sensor":{"type":"object","properties":{"path":{"type":"string","title":"Example Cisco-IOS-XR-infra-statsd-oper:infra-statistics/interfaces/interface/latest/generic-counters"}},"$$ref":"#/definitions/common_collection_dataMDTSensor"},"trap_sensor":{"type":"object","properties":{"path":{"type":"string","title":"Example snmp-trap-oper:traps/notifications"}},"$$ref":"#/definitions/common_collection_dataTrapSensor"},"trap_yang_sensor":{"type":"object","properties":{"path":{"type":"string","title":"Example ISIS-MIB:notifications,SNMPv2-MIB:notifications,IF-MIB:notifications"}},"$$ref":"#/definitions/common_collection_dataTrapYangSensor"},"gnmi_sensor":{"type":"object","properties":{"path":{"title":"Gnmi path\nExample {\"origin\":\"syslog-oper\",\"elem\":[{\"name\":\"syslog\"},{\"name\":\"messages\"}]}","type":"object","properties":{"element":{"type":"array","items":{"type":"string"},"description":"Elements of the path are no longer encoded as a string, but rather within\nthe elem field as a PathElem message."},"origin":{"type":"string"},"elem":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"key":{"type":"object","additionalProperties":{"type":"string"}}},"description":"PathElem encodes an element of a gNMI path, along with any attributes (keys)\nthat may be associated with it.\nReference: gNMI Specification Section 2.2.2.","$$ref":"#/definitions/gnmiPathElem"}},"target":{"type":"string"}},"description":"Path encodes a data tree path as a series of repeated strings, with\neach element of the path representing a data tree node name and the\nassociated attributes.\nReference: gNMI Specification Section 2.2.2.","$$ref":"#/definitions/gnmiPath"},"mode":{"description":"Subscription mode to be used.","type":"string","enum":["TARGET_DEFINED","ON_CHANGE","SAMPLE"],"default":"TARGET_DEFINED","title":"SubscriptionMode is the mode of the subscription, specifying how the\ntarget must return values in a subscription.\nReference: gNMI Specification Section 3.5.1.3","$$ref":"#/definitions/gnmiSubscriptionMode"},"device_setting":{"title":"Optional GNMI Device setting","type":"object","properties":{"suppress_redundant":{"type":"boolean"},"heartbeat_interval":{"type":"string","format":"uint64","description":"Specifies the maximum allowable silent period in nanoseconds when\nsuppress_redundant is in use. The target should send a value at least once\nin the period specified."},"qos":{"type":"object","properties":{"marking":{"type":"integer","format":"int64"}},"title":"QOSMarking specifies the DSCP value to be set on transmitted telemetry\nupdates from the target.\nReference: gNMI Specification Section 3.5.1.2","$$ref":"#/definitions/gnmiQOSMarking"},"allow_aggregation":{"type":"boolean"},"use_models":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"organization":{"type":"string"},"version":{"type":"string"}},"title":"ModelData is used to describe a set of schema modules. It can be used in a\nCapabilityResponse where a target reports the set of modules that it\nsupports, and within the SubscribeRequest and GetRequest messages to specify\nthe set of models from which data tree elements should be reported.\nReference: gNMI Specification Section 3.2.3","$$ref":"#/definitions/gnmiModelData"},"description":"The set of schemas that define the elements of the data tree that should\nbe sent by the target."},"updates_only":{"type":"boolean","description":"An optional field to specify that only updates to current state should be\nsent to a client. If set, the initial state is not sent to the client but\nrather only the sync message followed by any subsequent updates to the\ncurrent state. For ONCE and POLL modes, this causes the server to send only\nthe sync message (Sec. 3.5.2.3)."}},"$$ref":"#/definitions/common_collection_dataGNMIDeviceSetting"}},"description":"Reference: gNMI Specification Section 3.5.1.3\nOptimization based on collect once will be carried out per path basis\nNOTE: if multiple GnmiSensor's are part of a single collection job or\nspread across multiple jobs then it may be more efficient to condense\nall GnmiSensor's into a smaller set of GnmiStandardSensor's for device\nefficiency reasons. Please see comments on GnmiStandardSensor for more\ndetails.","$$ref":"#/definitions/common_collection_dataGnmiSensor"},"syslog_sensor":{"type":"object","properties":{"pris":{"title":"List of priority levels","type":"object","properties":{"facilities":{"type":"array","items":{"type":"integer","format":"int32"},"title":"Syslog Facility , valid numbers 0 to 23"},"severities":{"type":"array","items":{"type":"integer","format":"int32"},"title":"Syslog Severity , valid numbers 0 to 7"}},"$$ref":"#/definitions/SyslogSensorPRIs"},"filters":{"description":"Filters - one (or combination max=3) of the filter based on Regex, severity, facility or/and PRI\nEither PRIs can be specified or Filters can be specified not both.","type":"object","properties":{"filter":{"type":"array","items":{"type":"object","properties":{"syslog_filter":{"type":"object","properties":{"severity_facility":{"type":"object","properties":{"severity":{"type":"object","properties":{"value":{"type":"integer","format":"int64","title":"value to which operator is applied"},"op":{"type":"string","enum":["UNKNOWN","GREATER_THAN","LESSER_THAN","EQUALS","NOT_EQUALS","GREATER_OR_EQUALS","LESSER_OR_EQUALS"],"default":"UNKNOWN","$$ref":"#/definitions/NumericalFilterOPERATOR"}},"title":"Definition of Numerical Value Filter","$$ref":"#/definitions/common_collection_dataNumericalFilter"},"facility":{"type":"object","properties":{"value":{"type":"integer","format":"int64","title":"value to which operator is applied"},"op":{"type":"string","enum":["UNKNOWN","GREATER_THAN","LESSER_THAN","EQUALS","NOT_EQUALS","GREATER_OR_EQUALS","LESSER_OR_EQUALS"],"default":"UNKNOWN","$$ref":"#/definitions/NumericalFilterOPERATOR"}},"title":"Definition of Numerical Value Filter","$$ref":"#/definitions/common_collection_dataNumericalFilter"}},"title":"Filter messages based on Severity value or Facility value or Both","$$ref":"#/definitions/SyslogFilterSeverityFacilityFilter"},"pri_filter":{"type":"object","properties":{"value":{"type":"object","properties":{"value":{"type":"integer","format":"int64","title":"value to which operator is applied"},"op":{"type":"string","enum":["UNKNOWN","GREATER_THAN","LESSER_THAN","EQUALS","NOT_EQUALS","GREATER_OR_EQUALS","LESSER_OR_EQUALS"],"default":"UNKNOWN","$$ref":"#/definitions/NumericalFilterOPERATOR"}},"title":"Definition of Numerical Value Filter","$$ref":"#/definitions/common_collection_dataNumericalFilter"}},"title":"Filter messages based on PRI value","$$ref":"#/definitions/SyslogFilterPRIFilter"},"regex_filter":{"type":"object","properties":{"pattern":{"type":"string","title":"regex pattern"}},"title":"RegEx Filter","$$ref":"#/definitions/common_collection_dataRegexFilter"}},"title":"Used when the collection type is SYSLOG to filter messages sent to destination","$$ref":"#/definitions/common_collection_dataSyslogFilter"}},"title":"Filter config to be applied","$$ref":"#/definitions/common_collection_dataFilter"}},"operator":{"type":"string","enum":["UNKNOWN","AND","OR"],"default":"UNKNOWN","$$ref":"#/definitions/FiltersLOGICAL_OP"}},"$$ref":"#/definitions/common_collection_dataFilters"}},"title":"Refer https://www.paessler.com/it-explained/syslog,https://datatracker.ietf.org/doc/rfc5424/\nExample if PRI is (165,111) , application_name is (su,syslogd) all messages with PRI (165 or 111) and application\nname su or syslogd would be collected","$$ref":"#/definitions/common_collection_dataSyslogSensor"},"tl1_sensor":{"title":"Both Tl1Sensor and Tl1EventSensor must use w/ CLI_COLLECTOR type","type":"object","properties":{"command":{"type":"string","title":"Example RTRV-ATTR-ENV"},"device_package":{"title":"Total size is limited to 512 characters\nExample\n\t\t\"device_package_name\": \"optical_inventory_tl1_active_logins\",\n\t\t\"function_name\": \"rtrv-active-logins\"","type":"object","properties":{"device_package_name":{"type":"string","title":"XDE device package name"},"function_name":{"type":"string","title":"XDE function name within package"},"parameters":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters for custom device packages"}},"$$ref":"#/definitions/common_collection_dataDevicePackage"}},"$$ref":"#/definitions/common_collection_dataTl1Sensor"},"tl1_event_sensor":{"type":"object","title":"Tl1EventSensor - Eventing sensor\nCadence needs to zero","$$ref":"#/definitions/common_collection_dataTl1EventSensor"},"grpc_sensor":{"title":"Both GRPCSensor and GnmiStandardSensor must be used w/GNMI_COLLECTOR type","type":"object","properties":{"action_json":{"type":"object","properties":{"req_args":{"title":"service gRPCExec {\n // Exec command\n rpc ActionJSON(ActionJSONArgs) returns(stream ActionJSONReply) {};\n}","type":"object","properties":{"ReqId":{"type":"string","format":"int64"},"yangpathjson":{"type":"string"}},"$$ref":"#/definitions/IOSXRExtensibleManagabilityServiceActionJSONArgs"}},"$$ref":"#/definitions/common_collection_datagRPCExecActionJson"}},"$$ref":"#/definitions/common_collection_dataGRPCSensor"},"gnmi_standard_sensor":{"type":"object","properties":{"Subscribe_request":{"title":"Gnmi SubscriptionList\nExample {\"origin\":\"syslog-oper\",\"elem\":[{\"name\":\"syslog\"},{\"name\":\"messages\"}]}","type":"object","properties":{"subscribe":{"type":"object","properties":{"prefix":{"type":"object","properties":{"element":{"type":"array","items":{"type":"string"},"description":"Elements of the path are no longer encoded as a string, but rather within\nthe elem field as a PathElem message."},"origin":{"type":"string"},"elem":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"key":{"type":"object","additionalProperties":{"type":"string"}}},"description":"PathElem encodes an element of a gNMI path, along with any attributes (keys)\nthat may be associated with it.\nReference: gNMI Specification Section 2.2.2.","$$ref":"#/definitions/gnmiPathElem"}},"target":{"type":"string"}},"description":"Path encodes a data tree path as a series of repeated strings, with\neach element of the path representing a data tree node name and the\nassociated attributes.\nReference: gNMI Specification Section 2.2.2.","$$ref":"#/definitions/gnmiPath"},"subscription":{"type":"array","items":{"type":"object","properties":{"path":{"type":"object","properties":{"element":{"type":"array","items":{"type":"string"},"description":"Elements of the path are no longer encoded as a string, but rather within\nthe elem field as a PathElem message."},"origin":{"type":"string"},"elem":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"key":{"type":"object","additionalProperties":{"type":"string"}}},"description":"PathElem encodes an element of a gNMI path, along with any attributes (keys)\nthat may be associated with it.\nReference: gNMI Specification Section 2.2.2.","$$ref":"#/definitions/gnmiPathElem"}},"target":{"type":"string"}},"description":"Path encodes a data tree path as a series of repeated strings, with\neach element of the path representing a data tree node name and the\nassociated attributes.\nReference: gNMI Specification Section 2.2.2.","$$ref":"#/definitions/gnmiPath"},"mode":{"type":"string","enum":["TARGET_DEFINED","ON_CHANGE","SAMPLE"],"default":"TARGET_DEFINED","title":"SubscriptionMode is the mode of the subscription, specifying how the\ntarget must return values in a subscription.\nReference: gNMI Specification Section 3.5.1.3","$$ref":"#/definitions/gnmiSubscriptionMode"},"sample_interval":{"type":"string","format":"uint64"},"suppress_redundant":{"type":"boolean","description":"Indicates whether values that have not changed should be sent in a SAMPLE\nsubscription."},"heartbeat_interval":{"type":"string","format":"uint64","description":"Specifies the maximum allowable silent period in nanoseconds when\nsuppress_redundant is in use. The target should send a value at least once\nin the period specified."}},"title":"Subscription is a single request within a SubscriptionList. The path\nspecified is interpreted (along with the prefix) as the elements of the data\ntree that the client is subscribing to. The mode determines how the target\nshould trigger updates to be sent.\nReference: gNMI Specification Section 3.5.1.3","$$ref":"#/definitions/gnmiSubscription"}},"qos":{"type":"object","properties":{"marking":{"type":"integer","format":"int64"}},"title":"QOSMarking specifies the DSCP value to be set on transmitted telemetry\nupdates from the target.\nReference: gNMI Specification Section 3.5.1.2","$$ref":"#/definitions/gnmiQOSMarking"},"mode":{"type":"string","enum":["STREAM","ONCE","POLL"],"default":"STREAM","description":"Mode of the subscription.","$$ref":"#/definitions/SubscriptionListMode"},"allow_aggregation":{"type":"boolean","description":"Whether elements of the schema that are marked as eligible for aggregation\nshould be aggregated or not."},"use_models":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"organization":{"type":"string"},"version":{"type":"string"}},"title":"ModelData is used to describe a set of schema modules. It can be used in a\nCapabilityResponse where a target reports the set of modules that it\nsupports, and within the SubscribeRequest and GetRequest messages to specify\nthe set of models from which data tree elements should be reported.\nReference: gNMI Specification Section 3.2.3","$$ref":"#/definitions/gnmiModelData"},"description":"The set of schemas that define the elements of the data tree that should\nbe sent by the target."},"encoding":{"description":"The encoding that the target should use within the Notifications generated\ncorresponding to the SubscriptionList.","type":"string","enum":["JSON","BYTES","PROTO","ASCII","JSON_IETF"],"default":"JSON","title":"Encoding defines the value encoding formats that are supported by the gNMI\nprotocol. These encodings are used by both the client (when sending Set\nmessages to modify the state of the target) and the target when serializing\ndata to be returned to the client (in both Subscribe and Get RPCs).\nReference: gNMI Specification Section 2.3","$$ref":"#/definitions/gnmiEncoding"},"updates_only":{"type":"boolean","description":"An optional field to specify that only updates to current state should be\nsent to a client. If set, the initial state is not sent to the client but\nrather only the sync message followed by any subsequent updates to the\ncurrent state. For ONCE and POLL modes, this causes the server to send only\nthe sync message (Sec. 3.5.2.3)."}},"title":"SubscriptionList is used within a Subscribe message to specify the list of\npaths that the client wishes to subscribe to. The message consists of a\nlist of (possibly prefixed) paths, and options that relate to the\nsubscription.\nReference: gNMI Specification Section 3.5.1.2","$$ref":"#/definitions/gnmiSubscriptionList"},"poll":{"type":"object","title":"Poll is sent within a SubscribeRequest to trigger the device to\nsend telemetry updates for the paths that are associated with the\nsubscription.\nReference: gNMI Specification Section Section 3.5.1.4","$$ref":"#/definitions/gnmiPoll"},"extension":{"type":"array","items":{"type":"object","properties":{"registered_ext":{"type":"object","properties":{"id":{"type":"string","enum":["EID_UNSET","EID_EXPERIMENTAL"],"default":"EID_UNSET","description":"RegisteredExtension is an enumeration acting as a registry for extensions\ndefined by external sources.\n\n - EID_EXPERIMENTAL: An experimental extension that may be used during prototyping of a new\nextension.","$$ref":"#/definitions/gnmi_extExtensionID"},"msg":{"type":"string","format":"byte"}},"description":"The RegisteredExtension message defines an extension which is defined outside\nof this file.","$$ref":"#/definitions/gnmi_extRegisteredExtension"},"master_arbitration":{"description":"Well known extensions.","type":"object","properties":{"role":{"type":"object","properties":{"id":{"type":"string"}},"description":"There can be one master for each role. The role is identified by its id.","$$ref":"#/definitions/gnmi_extRole"},"election_id":{"type":"object","properties":{"high":{"type":"string","format":"uint64"},"low":{"type":"string","format":"uint64"}},"description":"Representation of unsigned 128-bit integer.","$$ref":"#/definitions/gnmi_extUint128"}},"title":"MasterArbitration is used to select the master among multiple gNMI clients\nwith the same Roles. The client with the largest election_id is honored as\nthe master.\nThe document about gNMI master arbitration can be found at\nhttps://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-master-arbitration.md","$$ref":"#/definitions/gnmi_extMasterArbitration"},"history":{"type":"object","properties":{"snapshot_time":{"type":"string","format":"int64"},"range":{"type":"object","properties":{"start":{"type":"string","format":"int64"},"end":{"type":"string","format":"int64"}},"$$ref":"#/definitions/gnmi_extTimeRange"}},"title":"The History extension allows clients to request historical data. Its\nspec can be found at\nhttps://github.com/openconfig/reference/blob/master/rpc/gnmi/gnmi-history.md","$$ref":"#/definitions/gnmi_extHistory"}},"description":"The Extension message contains a single gNMI extension.","$$ref":"#/definitions/gnmi_extExtension"},"description":"Extension messages associated with the SubscribeRequest. See the\ngNMI extension specification for further definition."}},"$$ref":"#/definitions/gnmiSubscribeRequest"}},"title":"Reference: gNMI Specification Section 3.5.1.3\nGNMI Subscription List takes in a list of paths in single subscription list\nThis typically used when we want to retrieve multiple leafs within same path.\n GNMI Subcription has cadence and encoding within the payload, so collect\nonce may not work.\nPoll and Alias Option is not be supported. Will be filtered out.\nNOTE: this is the preferred sensor data to use when collecting muliple gNMI\npaths as it will result in a reduced amount of device resources being used\nas compared to N GnmiSensor's. Mainly, this reduction in resources is with\nrespect to the device's gRPC mechanisms. Although, it also comes with some\nreductions in collection services as well.\nGnmiStandardSensor","$$ref":"#/definitions/common_collection_dataGnmiStandardSensor"},"snmp_virtual_sensor":{"type":"object","properties":{"virtual_path":{"type":"string","title":"Valid values for virtual_path:\n - CROSSWORK-LSP-STATS"}},"title":"Snmp virtual sensor to handle special subscription where a given device has a special tag that matches\npre-defined sensor redirection rules; collection request is re-directed as per redirection rules;\nIf device has no tag or its tag does not match any redirection rules, the subscription will be suppressed","$$ref":"#/definitions/common_collection_dataSnmpVirtualSensor"}},"title":"Sensor Data","$$ref":"#/definitions/common_collection_dataSensorData"},"template_data":{"type":"object","properties":{"template_id":{"type":"string","description":"ID of the template in question."},"parameter_sets":{"description":"List of parameter key/value combinations for the given template.","type":"object","properties":{"template_param_values":{"type":"array","items":{"type":"object","properties":{"template_param_value":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"},"list_value":{"type":"object","properties":{"value":{"type":"array","items":{"type":"object","properties":{"bytes_value":{"type":"string","format":"byte"},"string_value":{"type":"string"},"bool_value":{"type":"boolean"},"uint32_value":{"type":"integer","format":"int64"},"uint64_value":{"type":"string","format":"uint64"},"sint32_value":{"type":"integer","format":"int32"},"sint64_value":{"type":"string","format":"int64"},"double_value":{"type":"number","format":"double"},"float_value":{"type":"number","format":"float"},"null_value":{"type":"boolean"}},"$$ref":"#/definitions/common_collection_dataValue"},"title":"list items must be of same type"}},"$$ref":"#/definitions/common_collection_datalist"}},"title":"Generic Key value message","$$ref":"#/definitions/common_collection_dataKeyValue"},"title":"Parameters values for sensor template variables"}},"title":"Specify parameter values for template parameters","$$ref":"#/definitions/common_collection_dataParameterValue"},"title":"Parameters value combinations set for sensor template variables\nfor ex: \n\"template_param_values\": [\n {{\"vrf\":\"vrf1\"}, {\"neighbor-ip\":\"ip1\"}},\n {{\"vrf\":\"vrf1\"}, {\"neighbor-ip\":\"ip2\"}},\n {{\"vrf\":\"vrf1\"}, {\"neighbor-ip\":\"ip3\"}}\n ]"}},"title":"Specify multiple parameter value sets for template parameters","$$ref":"#/definitions/common_collection_dataParameterValues"}},"description":"TemplateData aggregates details for a concrete underlying collection path on the device.","$$ref":"#/definitions/collection_serviceTemplateData"}},"description":"ExportPath expresses all the possible concrete underlying collection paths gathered from the device.","$$ref":"#/definitions/collection_serviceExportPath"},"description":"Optional list of explicit paths. The objects specified in the list must correspond to the path type given above."}},"description":"ExportSpecification aggregrates Crosswork Data Gateway (CDG) tasks to be collected as part of an export collection job.\nThe device IDs, collection type, and export path type are required.\nThe export paths themselves are optional.\nIf you supply the export paths, you will get a more targeted collection and the collected CDG tasks will be the combined product of the provided devices and paths on the given collection type.\nIf you do not supply the export paths, the service collects all known paths associated to the given export path type.","$$ref":"#/definitions/collection_serviceExportSpecification"}}},"$$ref":"#/definitions/collection_serviceExportSpecifications"}},"description":"ExportCollectionsConfiguration allows paginated input of the export collection job specification.","$$ref":"#/definitions/collection_serviceExportCollectionsConfiguration"},"eof":{"type":"object","properties":{"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":"ExportCollectionsEOF signals the end of a paginated input specification supplied by the user for the given job.","$$ref":"#/definitions/collection_serviceExportCollectionsEOF"}},"description":"ExportCollections aggregrates all input request types for export collection jobs.\nUsers are expected to start requests with the 'initiation' object,\ncontinue with an arbitrary number of 'configuration' objects, and end with a single 'eof' object.\nThe 'id' returned from the original 'initiation' response needs to be carried throughout the paginated input requests.","$$ref":"#/definitions/collection_serviceExportCollections"}},"example":{"export_collections":{"initiation":{"id":{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/reachability/subscription1751363348379"}},"export_data":"EXPORT_STATUS_AND_METRICS","destinations":[{"format":"FORMAT_CSV","destination":{"remote_host":"10.64.102.100","username":"cw-admin","password":"Cwork123!","port":"22"},"encryption_passphrase":"Cwork123!","server_path":"/home/cw-admin"}]},"configuration":{"id":{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/reachability/subscription1751363348379"}},"configuration":{"specifications":[{"device_ids":["a212cb5f-d618-476d-8b0e-f95590168c12","af6dc565-a434-4df4-ba93-000540f3d352","d70f24ef-6764-4333-867a-d19a6cc19c68"],"collection_type":"CLI_COLLECTOR","export_path_type":"EXPORT_PATH_TYPE_SENSOR","export_paths":[{"sensor_data":{"cli_yang_sensor":{"path":"cli_reachability:protocols"}}}]}]}},"eof":{"id":{"application_context":{"application_id":"cw.dlminvmgr0","context_id":"dlm/cli-collector/group/reachability/subscription1751363348379"}}}}},"description":"CreateJobRequest encapsulates a generic request to the Collection Services\nAPI to create a new job.","$$ref":"#/definitions/collection_serviceCreateJobRequest"}}],"tags":["CollectionService"],"__originalOperationId":"CollectionService_CreateJob","consumes":["application/json"],"produces":["application/json"],"method":"post","path":"/jobs"}}