components: schemas: CiMetadata: description: Model for collection instrument metadata properties: ci_version: title: Ci Version type: integer classifier_type: title: Classifier Type type: string classifier_value: title: Classifier Value type: string data_version: title: Data Version type: string guid: title: Guid type: string language: title: Language type: string published_at: title: Published At type: string sds_schema: default: '' title: Sds Schema type: string survey_id: title: Survey Id type: string title: title: Title type: string validator_version: title: Validator Version type: string required: - ci_version - data_version - validator_version - classifier_type - classifier_value - guid - language - published_at - survey_id - title title: CiMetadata type: object CiValidatorMetadata: description: Model for collection instrument validator metadata properties: ci_version: title: Ci Version type: integer classifier_type: title: Classifier Type type: string classifier_value: title: Classifier Value type: string guid: title: Guid type: string survey_id: title: Survey Id type: string validator_version: title: Validator Version type: string required: - survey_id - classifier_type - classifier_value - guid - ci_version - validator_version title: CiValidatorMetadata type: object Classifiers: enum: - form_type - default title: Classifiers type: string DeploymentStatus: properties: status: default: OK title: Status type: string version: title: Version type: string required: - version title: DeploymentStatus type: object ExceptionResponseModel: properties: message: title: Message type: string status: title: Status type: string required: - status - message title: ExceptionResponseModel type: object HTTPValidationError: properties: detail: items: $ref: '#/components/schemas/ValidationError' title: Detail type: array title: HTTPValidationError type: object PostCiSchemaV1Data: description: 'Model for `post_ci_schema_v1` request post data This is the entire CI JSON object that you would like to publish. The example below illustrates the required attributes to put into the request body. The POST will fail if these are not included.' properties: data_version: title: Data Version type: string form_type: title: Form Type type: string language: title: Language type: string legal_basis: default: '' title: Legal Basis type: string metadata: items: {} title: Metadata type: array mime_type: default: '' title: Mime Type type: string navigation: additionalProperties: true title: Navigation type: object post_submission: additionalProperties: true title: Post Submission type: object questionnaire_flow: additionalProperties: true title: Questionnaire Flow type: object sds_schema: default: '' title: Sds Schema type: string sections: items: {} title: Sections type: array submission: additionalProperties: true title: Submission type: object survey_id: title: Survey Id type: string theme: default: '' title: Theme type: string title: title: Title type: string required: - data_version - language - survey_id - title title: PostCiSchemaV1Data type: object ValidationError: properties: loc: items: anyOf: - type: string - type: integer title: Location type: array msg: title: Message type: string type: title: Error Type type: string required: - loc - msg - type title: ValidationError type: object info: description: Open api schema for CIR title: Collection Instrumentation Register version: 1.0.0 openapi: 3.0.1 paths: /collection-instruments: delete: description: 'DELETE method that deletes all CI schema and metadata from CIR of a specified survey ID. This is a helper endpoint that is used for cleaning up after tests.' operationId: delete_collection_instrument_collection_instruments_delete parameters: - description: The survey ID of the CI to be deleted. example: '123' in: query name: survey_id required: false schema: description: The survey ID of the CI to be deleted. title: Survey Id type: string responses: '200': content: application/json: schema: {} description: Successful Response '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '404': content: application/json: example: message: No CI to delete status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Delete Collection Instrument post: description: 'POST method to create a new collection instrument - A GUID is required - A validator_version is required - A ci_version is optional, if not specified, it will increment automatically' operationId: create_collection_instrument_collection_instruments_post parameters: - description: guid for CI in: query name: guid required: false schema: description: guid for CI title: Guid type: string - description: Validator version of CI schema example: 0.0.1 in: query name: validator_version required: false schema: description: Validator version of CI schema title: Validator Version type: string - description: CI version of CI schema example: '1' in: query name: ci_version required: false schema: description: CI version of CI schema title: Ci Version type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PostCiSchemaV1Data' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CiMetadata' description: 'Successfully created a CI. This is illustrated with the returned response containing the metadata of the CI. ' '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Create Collection Instrument /collection-instruments/metadata: get: description: 'GET method that returns any metadata objects from CIR that match the parameters passed. The user has multiple ways of querying the metadata. - Provide survey_id, classifiers, language. - Provide no parameters. (all ci metadata is returned)' operationId: get_collection_instruments_metadata_collection_instruments_metadata_get parameters: - description: classifier_type used by the CI example: form_type in: query name: classifier_type required: false schema: $ref: '#/components/schemas/Classifiers' description: classifier_type used by the CI - description: classifier_value used by the CI example: '0001' in: query name: classifier_value required: false schema: anyOf: - type: string - type: 'null' description: classifier_value used by the CI title: Classifier Value - description: The language of the CI example: en in: query name: language required: false schema: anyOf: - type: string - type: 'null' description: The language of the CI title: Language - description: The survey_id of the CI example: '123' in: query name: survey_id required: false schema: anyOf: - type: string - type: 'null' description: The survey_id of the CI title: Survey Id responses: '200': content: application/json: schema: {} description: Successful Response '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '404': content: application/json: example: message: No CI found status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Get Collection Instruments Metadata /collection-instruments/schema: get: description: GET method that fetches a CI schema by GUID. operationId: get_collection_instrument_schema_by_guid_collection_instruments_schema_get parameters: - description: The global unique ID of the CI example: 428ae4d1-8e7f-4a9d-8bef-05a266bf81e7 in: query name: guid required: false schema: description: The global unique ID of the CI title: Guid type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/CiMetadata' description: Successfully Queried a CI. This is illustrated with the returned response containing the schema of the CI. '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '404': content: application/json: example: message: No CI found status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Get Collection Instrument Schema By Guid /collection-instruments/validator-metadata: get: description: GET method that returns the validator metadata for all collection instruments in CIR. operationId: get_collection_instruments_validator_metadata_collection_instruments_validator_metadata_get responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/CiValidatorMetadata' title: Response Get Collection Instruments Validator Metadata Collection Instruments Validator Metadata Get type: array description: Successful Response '404': content: application/json: example: message: No CI validator metadata found status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Get Collection Instruments Validator Metadata /collection-instruments/validator-version: put: description: PUT method that updates validator_version and CI metadata by Guid. operationId: put_collection_instrument_validator_version_collection_instruments_validator_version_put parameters: - description: guid for CI in: query name: guid required: false schema: description: guid for CI title: Guid type: string - description: Validator version of CI schema example: 0.0.1 in: query name: validator_version required: false schema: description: Validator version of CI schema title: Validator Version type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PostCiSchemaV1Data' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CiMetadata' description: Successfully updated validator version '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '404': content: application/json: example: message: No CI found status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Put Collection Instrument Validator Version /status: get: description: GET method that returns `CIR_APPLICATION_VERSION` if the deployment is successful operationId: http_get_status_status_get responses: '200': content: application/json: schema: $ref: '#/components/schemas/DeploymentStatus' description: Deployment done successfully '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Http Get Status /v1/ci_validator_metadata: get: deprecated: true description: 'GET method that returns the validator metadata for all collection instruments in CIR. This endpoint is deprecated.' operationId: http_get_ci_validator_metadata_v1_v1_ci_validator_metadata_get responses: '200': content: application/json: schema: items: $ref: '#/components/schemas/CiValidatorMetadata' title: Response Http Get Ci Validator Metadata V1 V1 Ci Validator Metadata Get type: array description: Successful Response '404': content: application/json: example: message: No CI validator metadata found status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Http Get Ci Validator Metadata V1 tags: - legacy /v1/update_validator_version: put: deprecated: true operationId: http_put_ci_validator_version_v1_v1_update_validator_version_put parameters: - description: guid for CI in: query name: guid required: false schema: description: guid for CI title: Guid type: string - description: Validator version of CI schema example: 0.0.1 in: query name: validator_version required: false schema: description: Validator version of CI schema title: Validator Version type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PostCiSchemaV1Data' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CiMetadata' description: Successfully updated validator version '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '404': content: application/json: example: message: No CI found status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Http Put Ci Validator Version V1 tags: - legacy /v2/ci_metadata: get: deprecated: true description: 'GET method that returns any metadata objects from CIR that match the parameters passed. The user has multiple ways of querying the metadata. 1. Provide survey_id, classifiers, language. 2. Provide no parameters. This endpoint is deprecated.' operationId: http_get_ci_metadata_v2_v2_ci_metadata_get parameters: - description: classifier_type used by the CI example: form_type in: query name: classifier_type required: false schema: $ref: '#/components/schemas/Classifiers' description: classifier_type used by the CI - description: classifier_value used by the CI example: '0001' in: query name: classifier_value required: false schema: anyOf: - type: string - type: 'null' description: classifier_value used by the CI title: Classifier Value - description: The language of the CI example: en in: query name: language required: false schema: anyOf: - type: string - type: 'null' description: The language of the CI title: Language - description: The survey_id of the CI example: '123' in: query name: survey_id required: false schema: anyOf: - type: string - type: 'null' description: The survey_id of the CI title: Survey Id responses: '200': content: application/json: schema: {} description: Successful Response '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '404': content: application/json: example: message: No CI found status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Http Get Ci Metadata V2 tags: - legacy /v2/retrieve_collection_instrument: get: deprecated: true description: 'GET method that fetches a CI schema by GUID. This endpoint is deprecated.' operationId: http_get_ci_schema_v2_v2_retrieve_collection_instrument_get parameters: - description: The global unique ID of the CI example: 428ae4d1-8e7f-4a9d-8bef-05a266bf81e7 in: query name: guid required: false schema: description: The global unique ID of the CI title: Guid type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/CiMetadata' description: Successfully Queried a CI. This is illustrated with the returned response containing the schema of the CI. '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '404': content: application/json: example: message: No CI found status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Not Found '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Http Get Ci Schema V2 tags: - legacy /v3/publish_collection_instrument: post: deprecated: true description: 'POST method that creates a Collection Instrument in CIR. Requires guid and validator_version as parameters with optional ci_version. This endpoint is deprecated.' operationId: http_post_ci_schema_v3_v3_publish_collection_instrument_post parameters: - description: guid for CI in: query name: guid required: false schema: description: guid for CI title: Guid type: string - description: Validator version of CI schema example: 0.0.1 in: query name: validator_version required: false schema: description: Validator version of CI schema title: Validator Version type: string - description: CI version of CI schema example: '1' in: query name: ci_version required: false schema: description: CI version of CI schema title: Ci Version type: string requestBody: content: application/json: schema: $ref: '#/components/schemas/PostCiSchemaV1Data' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CiMetadata' description: 'Successfully created a CI. This is illustrated with the returned response containing the metadata of the CI. ' '400': content: application/json: example: message: Invalid search parameters provided status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Bad Request '422': content: application/json: schema: $ref: '#/components/schemas/HTTPValidationError' description: Validation Error '500': content: application/json: example: message: Unable to process request status: error schema: $ref: '#/components/schemas/ExceptionResponseModel' description: Internal Server Error summary: Http Post Ci Schema V3 tags: - legacy