{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cisco-crosswork/json-schema/cisco-crosswork-collection-service-get-collection-job-config-request-schema.json",
  "title": "Will return all collection job configuration (sensor config and device set) for given application context",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cisco-crosswork-collectionservice-api-openapi.yml#/components/schemas/collection_serviceGetCollectionJobConfigRequest",
  "type": "object",
  "properties": {
    "application_context": {
      "$ref": "#/$defs/collection_serviceApplicationContext",
      "description": "Unique handle to identify your application's collection job , serves as Key to Object on which CRUD ops are done."
    },
    "query_options": {
      "$ref": "#/$defs/collection_serviceQueryOptions",
      "title": "Pagination and other query options"
    },
    "result": {
      "$ref": "#/$defs/collection_serviceResult",
      "title": "Sync Request reply , indicating whether request has accepted or rejected"
    }
  },
  "$defs": {
    "collection_serviceApplicationContext": {
      "type": "object",
      "properties": {
        "application_id": {
          "type": "string",
          "description": "Unique ID to identify your application. Crosswork Applications need to prefix application id with cw prefix."
        },
        "context_id": {
          "type": "string",
          "description": "Unique ID to identify your application subscription across all collection jobs. Recommended to use UUID."
        }
      },
      "title": "ApplicationContext Unique handle to identify your application's subscription . Combination of Application id and context_id\nshould be globally unique"
    },
    "collection_serviceError": {
      "type": "object",
      "properties": {
        "error": {
          "type": "string",
          "title": "Message is a textual description of reason for rejection, and can be safely passed on to operator through logs\nor UI"
        }
      },
      "title": "Error  associated with an Object"
    },
    "collection_serviceFilter": {
      "type": "object",
      "properties": {
        "operator": {
          "$ref": "#/$defs/collection_serviceFilterOperator",
          "title": "the filter logical or conditional operator ex. AND, OR, >, <"
        },
        "field_list": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/collection_serviceFilterField"
          },
          "title": "the filter criteria list"
        }
      },
      "title": "Filter"
    },
    "collection_serviceFilterField": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string",
          "title": "field to filter on.  Only CollectionState String is supported"
        },
        "value": {
          "type": "string",
          "description": "field value to filter on.  Note for non string backend will convert to honor actual db type."
        }
      }
    },
    "collection_serviceFilterOperator": {
      "type": "string",
      "enum": [
        "UNKNOWN_OPERATOR",
        "OPERATOR_OR",
        "OPERATOR_AND",
        "OPERATOR_EQ",
        "OPERATOR_REGEX",
        "OPERATOR_CONTAINS"
      ],
      "default": "UNKNOWN_OPERATOR",
      "description": " - UNKNOWN_OPERATOR: unknown operator\n - OPERATOR_OR: OR operator filter applied across filter list\n - OPERATOR_AND: AND operator filter applied across filter list\n - OPERATOR_EQ: EQUAL operator filter applied across filter list. not supported yet.\n - OPERATOR_REGEX: REGEX operator filter applied across filter list. not supported yet.\n - OPERATOR_CONTAINS: CONTAINS operator filter applied across filter list. supported only for hostname."
    },
    "collection_serviceQueryOptions": {
      "type": "object",
      "properties": {
        "page_token": {
          "type": "string",
          "title": "Page token to echo back to get next page, if collection_job_device_sets is empty or page token is empty ,\nthen there is no more results"
        },
        "page_size": {
          "type": "integer",
          "format": "int64",
          "title": "page_size"
        },
        "filter_list": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/collection_serviceFilter"
          },
          "title": "filtering options"
        },
        "filter_query": {
          "type": "string",
          "title": "Reserved for future use. Not used as of CW 3.1"
        }
      },
      "title": "Query Options"
    },
    "collection_serviceRequestResult": {
      "type": "string",
      "enum": [
        "UNKNOWN_RESULT",
        "REJECTED",
        "ACCEPTED"
      ],
      "default": "UNKNOWN_RESULT",
      "description": "- REJECTED: Request has been rejected\n - ACCEPTED: Request has been accepted for processing",
      "title": "Request - reply\nresponse"
    },
    "collection_serviceResult": {
      "type": "object",
      "properties": {
        "request_result": {
          "$ref": "#/$defs/collection_serviceRequestResult",
          "description": "ResultValue indicated accept/reject for a request, not the outcome of the work itself."
        },
        "error": {
          "$ref": "#/$defs/collection_serviceError",
          "description": "Message is a textual description of reason for rejection, and can be safely passed on to operator through logs\nor UI."
        }
      },
      "description": "Result is used to convey whether an operation (individual or in a batch)\nhas been accepted or rejected. For sync API's an error or rejection indicates failure of operation.\nA string error message accompanies rejection to support troubleshooting. For notification objects,\nrejection represents failure to do intended operation."
    }
  }
}