/
tenant.raml
69 lines (66 loc) · 1.9 KB
/
tenant.raml
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
#%RAML 1.0
title: Tenant API
baseUri: http://localhost:8081/{version}
version: v1
traits:
validate: !include ../traits/validation.raml
types:
tenantAttributes: !include ../schemas/moduleInfo.schema
errors: !include ../schemas/errors.schema
/_/tenant:
post:
description: Provision a new / update an existing tenant
is: [validate]
body:
application/json:
type: tenantAttributes
example:
strict: false
value: !include ../examples/moduleInfo.sample
responses:
200:
description: "tenant upgraded successfully to new module ID"
body:
application/json:
201:
description: "tenant enabled successfully for the module ID"
body:
application/json:
204:
description: "tenant enabled successfully for the module ID (there was nothing to do)"
400:
description: "Bad request or failing operation; SQL commands that failed when initalizing or upgrading the tenant are listed as JSON array elements."
body:
text/plain:
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error, contact administrator"
get:
description: Does tenant id already exist
responses:
200:
description: "true or false indicator"
body:
text/plain:
example: "Text....."
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error, contact administrator"
delete:
description: drop tenant id
responses:
204:
description: "Delete succeeded"
400:
description: "Bad request"
body:
text/plain:
500:
description: "Internal server error"
body:
text/plain:
example: "Internal server error, contact administrator"