-
Notifications
You must be signed in to change notification settings - Fork 11
/
template.apib
87 lines (44 loc) · 1.34 KB
/
template.apib
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
# Group Vocabularies
## Vocabularies Collection [/vocabularies]
### List All Vocabularies [GET]
+ Response 200 (application/json)
{
"_items": []
}
### Create A New Vocabulary [POST]
Vocabularies are allowed to have custom `_id` field. During the creation
the uniqueness will be checked against existing vocabularies.
+ Request (application/json)
+ Body
{
}
+ Schema
{
}
+ Response 201 (application/json)
+ Response 400 (application/json)
+ Response 412 (application/json)
## A Vocabulary [/vocabularies/{vocabuary_id}]
+ Parameters
- vocabuary_id (string) ... vocabulary id
### Details of A Vocabulary [GET]
+ Response 200 (application/json)
+ Body
{
}
### Update A Vocabulary [PATCH]
+ Request (application/json)
+ Headers
If-Match: {_etag}
+ Body
{
}
+ Response 200 (application/json)
+ Response 403 (application/json)
## Delete A Vocabulary [DELETE]
Deletes the vocabulary by given id. A vocabulary will fail to delete if:
- It is a default vocabulary (i.e. field_type is null)
+ Request (application/json)
{}
+ Response 204 (application/json)
+ Response 412 (application/json)