-
Notifications
You must be signed in to change notification settings - Fork 19
/
apiary.apib
127 lines (105 loc) · 3.28 KB
/
apiary.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
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
FORMAT: 1A
HOST: https://onix-codelists.io
# onix-codelists.io
# Onix codelists [/api/v1/codelist]
## Show all codelists [GET /api/v1/codelist{?page,limit,include}]
Get a JSON representation of all Onix codelists.
+ Parameters
+ page (integer, optional) - The page of results to view.
+ Default: 1
+ limit (integer, optional) - The amount of results per page.
+ Default: 25
+ include (enum[enum], optional) - Available additional details to request.
+ Default: codes
+ Members
+ `codes` - The code values that the codelist has
+ Response 200 (application/json)
+ Body
{
"id": 1,
"number": 1,
"description": "Notification or update type code",
"issue_number": 0
}
+ Response 422 (application/json)
+ Body
{
"message": "Could not list codelists.",
"errors": {
"page": [
"The page must be a number."
]
},
"status_code": 422
}
+ Response 422 (application/json)
+ Body
{
"message": "Could not list codelists.",
"errors": {
"page": [
"The page must be at least 1."
]
},
"status_code": 422
}
+ Response 422 (application/json)
+ Body
{
"message": "Could not list codelists.",
"errors": {
"limit": [
"The limit must be a number."
]
},
"status_code": 422
}
+ Response 422 (application/json)
+ Body
{
"message": "Could not list codelists.",
"errors": {
"limit": [
"The limit must be at least 1."
]
},
"status_code": 422
}
## Show the specified Codelist [GET /api/v1/codelist/{number}?include={include}]
Show a spesific codelist by the codelist number.
+ Parameters
+ number (integer, required) - Number of the codelist
+ include (enum[enum], optional) - Available additional details to request.
+ Default: codes
+ Members
+ `codes` - The code values that the codelist has
+ Response 200 (application/json)
+ Body
{
"id": 1,
"number": 1,
"description": "Notification or update type code",
"issue_number": 0
}
+ Response 422 (application/json)
+ Body
{
"message": "Could not list codelist.",
"errors": {
"number": [
"The number must be a number."
]
},
"status_code": 422
}
+ Response 422 (application/json)
+ Body
{
"message": "Could not list codelist.",
"errors": {
"number": [
"The selected number is invalid."
]
},
"status_code": 422
}