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.
182 lines (175 sloc)
7.36 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: Batch voucher export configurations | |
version: v1.1 | |
protocols: [ HTTP, HTTPS ] | |
baseUri: http://github.com/folio-org/mod-invoice | |
documentation: | |
- title: Batch voucher export configurations CRUD API | |
content: This documents the API calls that can be made to manage batch voucher export configurations | |
types: | |
exportConfig: !include acq-models/mod-invoice-storage/schemas/export_configuration.json | |
exportConfigCollection: !include acq-models/mod-invoice-storage/schemas/export_configuration_collection.json | |
credentials: !include acq-models/mod-invoice-storage/schemas/credentials.json | |
message: !include acq-models/common/schemas/message.json | |
errors: !include raml-util/schemas/errors.schema | |
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 | |
language: !include raml-util/traits/language.raml | |
pageable: !include raml-util/traits/pageable.raml | |
searchable: !include raml-util/traits/searchable.raml | |
resourceTypes: | |
collection: !include raml-util/rtypes/collection-with-json-response.raml | |
collection-item: !include raml-util/rtypes/item-collection-with-json-response.raml | |
/batch-voucher/export-configurations: | |
type: | |
collection: | |
schemaCollection: exportConfigCollection | |
schemaItem: exportConfig | |
exampleCollection: !include acq-models/mod-invoice-storage/examples/export_configuration_collection.sample | |
exampleItem: !include acq-models/mod-invoice-storage/examples/export_configuration.sample | |
get: | |
description: Get list of batch voucher export configurations | |
is: [ | |
pageable, | |
searchable: {description: "with valid searchable fields: for example format", example: "format==\"Application/xml\""} | |
] | |
/{id}: | |
uriParameters: | |
id: | |
description: The UUID of a batch voucher export configuration | |
type: UUID | |
type: | |
collection-item: | |
schema: exportConfig | |
exampleItem: !include acq-models/mod-invoice-storage/examples/export_configuration.sample | |
/credentials: | |
is: [language] | |
post: | |
description: Create a credentials record | |
body: | |
application/json: | |
type: credentials | |
example: | |
strict: false | |
value: !include acq-models/mod-invoice-storage/examples/credentials.sample | |
responses: | |
201: | |
description: "Returns the newly created credentials, with server-controlled fields like 'id' populated" | |
headers: | |
Location: | |
description: URI to the created credentials | |
body: | |
application/json: | |
example: !include acq-models/mod-invoice-storage/examples/credentials.sample | |
400: | |
description: "Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response." | |
body: | |
text/plain: | |
example: "unable to add credentials -- malformed JSON at 13:3" | |
application/json: | |
example: | |
strict: false | |
value: !include raml-util/examples/errors.sample | |
401: | |
description: "Not authorized to perform requested action" | |
body: | |
text/plain: | |
example: "unable to create credentials -- unauthorized" | |
application/json: | |
example: | |
strict: false | |
value: !include raml-util/examples/errors.sample | |
500: | |
description: "Internal server error, e.g. due to misconfiguration" | |
body: | |
text/plain: | |
example: "Internal server error, contact administrator" | |
application/json: | |
example: | |
strict: false | |
value: !include raml-util/examples/errors.sample | |
get: | |
description: "Get the credentials for the specified export_configuration" | |
responses: | |
200: | |
description: "Returns item with a given ID" | |
body: | |
application/json: | |
type: credentials | |
example: | |
strict: false | |
value: !include acq-models/mod-invoice-storage/examples/credentials.sample | |
404: | |
description: "Item with a given ID not found" | |
body: | |
text/plain: | |
example: "Credentials not found" | |
application/json: | |
example: | |
strict: false | |
value: !include raml-util/examples/errors.sample | |
500: | |
description: "Internal server error, e.g. due to misconfiguration" | |
body: | |
text/plain: | |
example: "internal server error, contact administrator" | |
application/json: | |
example: | |
strict: false | |
value: !include raml-util/examples/errors.sample | |
put: | |
description: Edit a credentials record | |
body: | |
application/json: | |
type: credentials | |
example: | |
strict: false | |
value: !include acq-models/mod-invoice-storage/examples/credentials.sample | |
responses: | |
204: | |
description: "Credentials successfully updated" | |
404: | |
description: "Credentials with a given ID not found" | |
body: | |
text/plain: | |
example: | | |
"Voucher not found" | |
application/json: | |
example: | |
strict: false | |
value: !include raml-util/examples/errors.sample | |
400: | |
description: "Bad request, e.g. malformed request body or query parameter. Details of the error (e.g. name of the parameter or line/character number with malformed data) provided in the response." | |
body: | |
text/plain: | |
example: | | |
"unable to update Credentials -- malformed JSON at 13:4" | |
application/json: | |
example: | |
strict: false | |
value: !include raml-util/examples/errors.sample | |
500: | |
description: "Internal server error, e.g. due to misconfiguration" | |
body: | |
text/plain: | |
example: "internal server error, contact administrator" | |
application/json: | |
example: | |
strict: false | |
value: !include raml-util/examples/errors.sample | |
/test: | |
is: [language] | |
post: | |
description: "Test that you can connect to and log into the uploadURI with the configured credentials" | |
responses: | |
200: | |
description: "Return message from FTP server" | |
body: | |
application/json: | |
type: message | |
example: | |
strict: false | |
value: !include acq-models/common/examples/message.sample | |