-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathbatch-voucher-export-configuration.raml
More file actions
179 lines (172 loc) · 7.26 KB
/
batch-voucher-export-configuration.raml
File metadata and controls
179 lines (172 loc) · 7.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
#%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
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:
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:
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