From e08c343cf5f5ab591b60a33d35116bed29a1df4d Mon Sep 17 00:00:00 2001 From: southeo Date: Tue, 29 Oct 2024 10:04:34 +0100 Subject: [PATCH] data export request --- data-model/Dockerfile | 2 + .../examples/example-data-export-request.json | 15 ++++ .../0.3.0/schema/data-export-request.json | 75 +++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 data-model/developer-schema/data-export/0.3.0/examples/example-data-export-request.json create mode 100644 data-model/developer-schema/data-export/0.3.0/schema/data-export-request.json diff --git a/data-model/Dockerfile b/data-model/Dockerfile index 58c9e06..ab63adf 100644 --- a/data-model/Dockerfile +++ b/data-model/Dockerfile @@ -80,12 +80,14 @@ COPY developer-schema/annotation/0.3.0/schema schema-root/schemas/developer-sche COPY developer-schema/data-mapping/0.3.0/schema schema-root/schemas/developer-schema/data-mapping/0.3.0 COPY developer-schema/machine-annotation-service/0.3.0/schema schema-root/schemas/developer-schema/machine-annotation-service/0.3.0 COPY developer-schema/source-system/0.3.0/schema schema-root/schemas/developer-schema/source-system/0.3.0 +COPY developer-schema/data-export/0.3.0/schema schema-root/schemas/developer-schema/data-export/0.3.0 # Latest Developer schemas COPY developer-schema/annotation/0.3.0/schema schema-root/schemas/developer-schema/annotation/latest COPY developer-schema/data-mapping/0.3.0/schema schema-root/schemas/developer-schema/data-mapping/latest COPY developer-schema/machine-annotation-service/0.3.0/schema schema-root/schemas/developer-schema/machine-annotation-service/latest COPY developer-schema/source-system/0.3.0/schema schema-root/schemas/developer-schema/source-system/latest +COPY developer-schema/data-export/0.3.0/schema schema-root/schemas/developer-schema/data-export/latest # Versioned internal schemas COPY internal-schema/annotation/0.1.0/schema schema-root/schemas/internal-schema/annotation/0.1.0 diff --git a/data-model/developer-schema/data-export/0.3.0/examples/example-data-export-request.json b/data-model/developer-schema/data-export/0.3.0/examples/example-data-export-request.json new file mode 100644 index 0000000..e00730d --- /dev/null +++ b/data-model/developer-schema/data-export/0.3.0/examples/example-data-export-request.json @@ -0,0 +1,15 @@ +{ + "data": { + "type": "export-job", + "attributes": { + "searchParams": [ + { + "inputField": "$['ods:organisationID']", + "inputValue": "https://ror.org/0566bfb96" + } + ], + "targetType": "https://doi.org/21.T11148/894b1e6cad57e921764e", + "exportType": "DOI_LIST" + } + } +} \ No newline at end of file diff --git a/data-model/developer-schema/data-export/0.3.0/schema/data-export-request.json b/data-model/developer-schema/data-export/0.3.0/schema/data-export-request.json new file mode 100644 index 0000000..1b6b005 --- /dev/null +++ b/data-model/developer-schema/data-export/0.3.0/schema/data-export-request.json @@ -0,0 +1,75 @@ +{ + "$id": "https://schemas.dissco.tech/schemas/developer-schema/export-job/1.0.0/export-job-request.json", + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$comment": "Annotation Version 0.3.0", + "title": "Export job request", + "properties": { + "data": { + "type": "object", + "properties": { + "type": { + "type": "string", + "const": "export-job" + }, + "attributes": { + "type": "object", + "properties": { + "searchParams": { + "type": "array", + "items": { + "type": "object", + "properties": { + "inputField": { + "type": "string", + "description": "JsonPath (mixed notation) of field used to base annotation reasoning on. Indexes must be wildcards", + "examples": [ + "digitalSpecimenWrapper.occurrences[*].location.dwc:country" + ] + }, + "inputValue": { + "type": "string", + "description": "Value of the field indicated above", + "examples": [ + "United Kingdom" + ] + } + }, + "additionalProperties": false + } + }, + "targetType": { + "description": "FDO type of the objects whose data is being exported", + "type": "string", + "enum": [ + "https://doi.org/21.T11148/894b1e6cad57e921764e", + "https://doi.org/21.T11148/bbad8c4e101e8af01115" + ] + }, + "exportType": { + "type": "string", + "enum": [ + "DOI_LIST" + ], + "description": "Type of export job. Currently, only one kind of job is supported" + } + }, + "additionalProperties": false, + "required": [ + "searchParams", + "targetType", + "exportType" + ] + } + }, + "required": [ + "type", + "attributes" + ], + "additionalProperties": false + } + }, + "required": [ + "data" + ], + "additionalProperties": false +} \ No newline at end of file