-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathstaging_users.raml
More file actions
141 lines (135 loc) · 4.3 KB
/
staging_users.raml
File metadata and controls
141 lines (135 loc) · 4.3 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
#%RAML 1.0
title: StagingUsers
version: v19.4.0
baseUri: http://github.com/org/folio/mod-users
documentation:
- title: mod-users stagingUser API
content: This documents the API calls that can be made to query and manage staging users of the system
types:
stagingUser: !include staging_userdata.json
stagingUserdataCollection: !include staging_userdataCollection.json
stagingUserMergeResponse: !include stagingUsersMergeResponse.json
errors: !include raml-util/schemas/errors.schema
traits:
orderable: !include raml-util/traits/orderable.raml
pageable: !include raml-util/traits/pageable.raml
searchable: !include raml-util/traits/searchable.raml
validate: !include raml-util/traits/validation.raml
resourceTypes:
collection: !include raml-util/rtypes/collection.raml
collection-item: !include raml-util/rtypes/item-collection.raml
get-only: !include raml-util/rtypes/get-only.raml
post-empty-body: !include raml-util/rtypes/post-empty-body.raml
/staging-users:
type:
collection:
exampleCollection: !include examples/staging_user_collection.sample
exampleItem: !include examples/staging_user.sample
schemaCollection: stagingUserdataCollection
schemaItem: stagingUser
get:
is: [
searchable: {description: "", example: "email=abc@testEmail.com sortBy contactInfo.email"},
orderable: {fieldsList: "field A, field B"},
pageable
]
description: Return a list of staging-users
responses:
200:
body:
application/json:
type: stagingUserdataCollection
400:
description: "Bad request"
body:
text/plain:
example: "Bad request"
403:
description: "Access denied"
body:
text/plain:
example: "Access denied"
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error"
post:
is: [ validate ]
description: Create a user
responses:
201:
description: "when new staging user record is created"
body:
application/json:
400:
description: "Bad request"
body:
application/json:
422:
description: Validation error
body:
application/json:
type: errors
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
/{externalSystemId}:
put:
description: Update an existing user based on externalSystemId
body:
application/json:
type: stagingUser
responses:
200:
description: "when staging user record is updated"
body:
application/json:
400:
description: "Bad request"
body:
application/json:
422:
description: Validation error
body:
application/json:
type: errors
500:
description: "Internal server error, e.g. due to misconfiguration"
body:
text/plain:
example: "Internal server error, contact administrator"
405:
description: "Internal server error, e.g. due to missing externalSystemId in the parameter"
body:
text/plain:
example: "the request's HTTP method is not supported by the server or the resource"
404:
description: "Staging user with a given externalSystemID not found"
body:
text/plain:
example: "Staging user not found"
/{id}/mergeOrCreateUser:
put:
queryParameters:
userId:
description: User ID
type: string
description: create a new user or update a existing user with staging user details
responses:
200:
description: "New user merged/created from staging user successfully"
body:
application/json:
type: stagingUserMergeResponse
example: !include examples/stagingUserMergeResponse.sample
404:
description: Not found
body:
text/plain:
500:
description: Internal error
body:
text/plain: