Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
203 lines (197 sloc)
6.02 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#%RAML 1.0 | |
title: Data export | |
version: v2.0 | |
protocols: [ HTTP, HTTPS ] | |
baseUri: https://github.com/folio-org/mod-data-export | |
documentation: | |
- title: Data export API | |
content: API for exporting MARC records | |
types: | |
errors: !include raml-util/schemas/errors.schema | |
fileDefinition: !include schemas/fileDefinition.json | |
exportRequest: !include schemas/exportRequest.json | |
quickExportRequest: !include schemas/quickExportRequest.json | |
quickExportResponse: !include schemas/quickExportResponse.json | |
jobExecutionCollection: !include schemas/jobExecutionCollection.json | |
jobExecution: !include schemas/jobExecution.json | |
fileDownload: !include schemas/fileDownload.json | |
UUID: | |
type: string | |
pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$ | |
traits: | |
validate: !include raml-util/traits/validation.raml | |
pageable: !include raml-util/traits/pageable.raml | |
searchable: !include raml-util/traits/searchable.raml | |
language: !include raml-util/traits/language.raml | |
resourceTypes: | |
collection: !include raml-util/rtypes/collection-get.raml | |
/data-export: | |
/export: | |
displayName: Export manager service | |
description: Method to start export for MARC records | |
post: | |
description: Starts the export process | |
is: [validate] | |
body: | |
application/json: | |
type: exportRequest | |
example: | |
value: !include samples/exportRequest.sample | |
responses: | |
204: | |
400: | |
description: "Bad request" | |
body: | |
text/plain: | |
example: "Bad request" | |
422: | |
description: "Unprocessable Entity" | |
body: | |
application/json: | |
type: errors | |
500: | |
description: "Internal server error" | |
body: | |
text/plain: | |
example: "Internal server error" | |
/quick-export: | |
displayName: Export manager service | |
description: Starts the quick export process | |
post: | |
description: Starts the export process | |
is: [validate] | |
body: | |
application/json: | |
type: quickExportRequest | |
example: | |
value: !include samples/quickExportRequest.sample | |
responses: | |
200: | |
body: | |
application/json: | |
type: quickExportResponse | |
example: | |
value: !include samples/quickExportResponse.sample | |
400: | |
description: "Bad request" | |
body: | |
text/plain: | |
example: "Bad request" | |
422: | |
description: "Unprocessable Entity" | |
body: | |
application/json: | |
type: errors | |
500: | |
description: "Internal server error" | |
body: | |
text/plain: | |
example: "Internal server error" | |
/job-executions: | |
displayName: JobExecutions | |
description: API for getting JobExecutions by query | |
type: | |
collection: | |
schemaCollection: jobExecutionCollection | |
exampleCollection: !include samples/jobExecutionCollection.sample | |
get: | |
is: [ | |
searchable: { | |
description: | |
"with valid searchable fields", example: "status=SUCCESS" | |
}, | |
pageable, | |
validate | |
] | |
/{id}: | |
uriParameters: | |
id: | |
description: The UUID of a job Execution | |
type: UUID | |
description: Delete a specific job Execution | |
delete: | |
responses: | |
204: | |
description: "Item deleted successfully" | |
400: | |
description: "Bad request" | |
body: | |
text/plain: | |
example: | | |
"unable to delete JobExecution -- constraint violation" | |
404: | |
description: "Item with a given ID not found" | |
body: | |
text/plain: | |
example: | | |
"JobExecution not found" | |
500: | |
description: "Internal server error, e.g. due to misconfiguration" | |
body: | |
text/plain: | |
example: "Internal server error, contact administrator" | |
/{jobExecutionId}/download/{exportFileId}: | |
displayName: File Download Link | |
description: API for getting the link to download files | |
get: | |
responses: | |
200: | |
body: | |
application/json: | |
type: fileDownload | |
example: | |
value: !include samples/fileDownload.sample | |
400: | |
description: "Bad request, e.g. malformed request body or query parameter" | |
body: | |
text/plain: | |
example: "Bad request" | |
500: | |
description: "Internal server error, e.g. due to misconfiguration" | |
body: | |
text/plain: | |
example: "Internal server error, contact Administrator" | |
/expire-jobs: | |
displayName: Expire JobExecutions | |
description: Method to expire long running jobs | |
post: | |
is: [validate] | |
responses: | |
204: | |
400: | |
description: "Bad request" | |
body: | |
text/plain: | |
example: "Bad request" | |
422: | |
description: "Unprocessable Entity" | |
body: | |
application/json: | |
type: errors | |
500: | |
description: "Internal server error" | |
body: | |
text/plain: | |
example: "Internal server error" | |
/clean-up-files: | |
displayName: Clean up FileDefinitions | |
description: API to start clean up mechanism of file definitions and related generated files | |
post: | |
is: [validate] | |
responses: | |
204: | |
400: | |
description: "Bad request" | |
body: | |
text/plain: | |
example: "Bad request" | |
422: | |
description: "Unprocessable Entity" | |
body: | |
application/json: | |
type: errors | |
500: | |
description: "Internal server error" | |
body: | |
text/plain: | |
example: "Internal server error" |