-
Notifications
You must be signed in to change notification settings - Fork 5
/
zebedee.yaml
190 lines (190 loc) · 6.39 KB
/
zebedee.yaml
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
179
180
181
182
183
184
185
186
187
188
189
190
openapi: 3.0.3
info:
title: Zebedee
description: Zebedee CMS API
version: 1.0.0
servers:
- url: 'https'
paths:
/login:
post:
summary: Authenticate a User
requestBody:
description: The details of the user authenticating
content:
application/json:
schema:
properties:
email:
type: string
example: [email protected]
description: The email address of the user authenticating
password:
type: string
example: p@ssword123!
description: The password of the user authenticating
required:
- email
- password
responses:
200:
description: Returns the quoted authentication token
content:
text/plain:
example: "123456789poiuytrewqasdfghjkzxcvbnm"
/content/{collection_id}:
post:
summary: Handle the upload of files (multi-part) and CMS (Collection/Versions/Page) data (JSON)
description: TODO - implemented in com.github.onsdigital.zebedee.api.Content
parameters:
- name: collection_id
required: true
description: the ID of the collection the content file or data is associated with
example: aktesting-123456789
in: path
schema:
type: string
- name: uri
required: true
example:
- /peoplepopulationandcommunity/birthsdeathsandmarriages/livebirths/datasets/babynamesenglandandwalesbabynamesstatisticsboys/2022/data.json
description: the file path to be created/overwritten
in: query
schema:
type: string
- name: overwriteExisting
required: false
example: true
description: Whether the file should overwritten if it exists (if false and file exists and error will be returned) Default - true
in: query
schema:
type: boolean
- name: recursive
required: false
example: false
description: TODO Default - false
in: query
schema:
type: boolean
- name: validateJson
required: false
example: true
description: TODO Default - true
in: query
schema:
type: boolean
requestBody:
required: true
content:
application/json:
examples:
any:
description: any JSON encode of classes defined in zebedee-reader within the com.github.onsdigital.zebebee.content packages
multipart/mixed:
examples:
TODO:
description: Uploading of CSV/Excel file (This function is deprecated - use Static File dp-upload-service)
responses:
200:
description: Whether the content is store based on the boolean in the response body
409:
description: if overwriteExisting = false and file already exists
/data/{collection_id}:
get:
summary: returns the content of a Zebedee CMS data file based on the URI provided
description: TODO.... Implemented in zebedee-reader at com.github.onsdigital.zebedee.reader.api.endpoint.Data
parameters:
- name: collection_id
required: true
description: the ID of the collection the content file or data is associated with
example: aktesting-123456789
in: path
schema:
type: string
- name: uri
required: true
example:
- /peoplepopulationandcommunity/birthsdeathsandmarriages/livebirths/datasets/babynamesenglandandwalesbabynamesstatisticsboys/2022/
description: the file path to be created/overwritten
in: query
schema:
type: string
responses:
200:
description: any JSON encode of classes defined in zebedee-reader within the com.github.onsdigital.zebebee.content packages, based on the `type` field in the content
/collection:
post:
summary: Create a collection
parameters:
- name: X-Florence-Token
in: header
required: true
description: Auth Token for the currently used auth system
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
properties:
name:
type: string
description: The name of the collection
example: 2021 Annual Births Analysis
type:
type: string
description: the type of collection either manual or scheduled
example: manual
TODO:
description: There are more properties that we have not discovered/used TODO please continues documenting
required:
- name
- type
responses:
200:
description: Whether the content is store based on the boolean in the response body
/publish/{collection_id}:
post:
summary: Publish a collection
parameters:
- name: collection_id
in: path
required: true
description: The ID of the collection to be published
schema:
type: string
- name: X-Florence-Token
in: header
required: true
description: Auth Token for the currently used auth system
schema:
type: string
responses:
200:
description: Returns a boolean based on the success of publication
content:
text/plain:
example: true
/approve/{collection_id}:
post:
summary: Approve a collection
parameters:
- name: collection_id
in: path
required: true
description: The ID of the collection to be approved
schema:
type: string
- name: X-Florence-Token
in: header
required: true
description: Auth Token for the currently used auth system
schema:
type: string
responses:
200:
description: Returns a boolean based on the success of approval
content:
text/plain:
example: true