You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specification/nhs-website-content-api.yaml
+90-11Lines changed: 90 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -64,10 +64,9 @@ info:
64
64
You need to sign up via the developer hub to recieve your API key. Additional onboarding information exists on the [developer hub](https://digital.nhs.uk//developer/api-catalogue/nhs-syndicated-content/onboarding-support-information)
65
65
66
66
## Errors
67
-
We have standard error codes for 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action
67
+
We have standard error codes for 200 to 299 if it succeeded, including code 202 if it was accepted by an API that needs to wait for further action.
68
68
69
-
Currently, our Akamai cache provides errors in the form of a webpage.
70
-
In future we plan to serve error codes via the API.
69
+
We have error codes for 400 to 422 to aid with debugging any potential issues
71
70
72
71
Errors specific to each endpoint are shown in the endpoints section, under response. See our [reference guide](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#http-status-codes) for more on errors.
73
72
@@ -113,7 +112,7 @@ paths:
113
112
| status | Filter by "published" or "unpublished" | string |
| 401 | ACCESS_DENIED | ApiKey missing, invalid or expired, or calling application not configured for this operation. |
134
+
| 403 | ACCESS_DENIED | User cannot perform this action. |
135
+
| 404 | RESOURCE_NOT_FOUND | Page not found. |
136
+
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
128
137
/conditions/*:
129
138
parameters:
130
139
- $ref: "#/components/parameters/apiKey"
@@ -147,7 +156,7 @@ paths:
147
156
# Modularisation
148
157
We modularise some of our content, meaning that individual parts of the page can be reused. If a page is modularised, content appears in the `hasPart` field.
149
158
responses:
150
-
"200":
159
+
'200':
151
160
description: |
152
161
A valid query which returns a page object for the chosen page
| 401 | ACCESS_DENIED | ApiKey missing, invalid or expired, or calling application not configured for this operation. |
178
+
| 403 | ACCESS_DENIED | User cannot perform this action. |
179
+
| 404 | RESOURCE_NOT_FOUND | Page not found. |
180
+
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
162
181
/medicines:
163
182
parameters:
164
183
- $ref: "#/components/parameters/apiKey"
@@ -199,7 +218,7 @@ paths:
199
218
for example `https://api.nhs.uk/medicines?apiKey=xxx&startDate=2022-01-01&orderBy=dateModified`
| 401 | ACCESS_DENIED | ApiKey missing, invalid or expired, or calling application not configured for this operation. |
240
+
| 403 | ACCESS_DENIED | User cannot perform this action. |
241
+
| 404 | RESOURCE_NOT_FOUND | Page not found. |
242
+
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
214
243
/medicines/*:
215
244
parameters:
216
245
- $ref: "#/components/parameters/apiKey"
@@ -223,7 +252,7 @@ paths:
223
252
224
253
This can be used to get specific information about individual medicines.
| 401 | ACCESS_DENIED | ApiKey missing, invalid or expired, or calling application not configured for this operation. |
274
+
| 403 | ACCESS_DENIED | User cannot perform this action. |
275
+
| 404 | RESOURCE_NOT_FOUND | Page not found. |
276
+
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
238
277
/mental-health:
239
278
parameters:
240
279
- $ref: "#/components/parameters/apiKey"
@@ -251,7 +290,7 @@ paths:
251
290
At the top level, modularised content of child pages is highlighted by the `hasPart` field. In child pages, only the individual page will be shown.
| 401 | ACCESS_DENIED | ApiKey missing, invalid or expired, or calling application not configured for this operation. |
312
+
| 403 | ACCESS_DENIED | User cannot perform this action. |
313
+
| 404 | RESOURCE_NOT_FOUND | Page not found. |
314
+
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
266
315
/pregnancy:
267
316
parameters:
268
317
- $ref: "#/components/parameters/apiKey"
@@ -279,7 +328,7 @@ paths:
279
328
At the top level, child modularised content is highlighted by the `hasPart` field. In child pages, only the individual page will be highlighted
| 401 | ACCESS_DENIED | ApiKey missing, invalid or expired, or calling application not configured for this operation. |
350
+
| 403 | ACCESS_DENIED | User cannot perform this action. |
351
+
| 404 | RESOURCE_NOT_FOUND | Page not found. |
352
+
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
294
353
/common-health-questions:
295
354
parameters:
296
355
- $ref: "#/components/parameters/apiKey"
@@ -307,7 +366,7 @@ paths:
307
366
Content pages use the 'question' schema.org [question](https://schema.org/Question) property.
308
367
309
368
responses:
310
-
"200":
369
+
'200':
311
370
description: |
312
371
A valid query for the common health questions pages.
| 401 | ACCESS_DENIED | ApiKey missing, invalid or expired, or calling application not configured for this operation. |
388
+
| 403 | ACCESS_DENIED | User cannot perform this action. |
389
+
| 404 | RESOURCE_NOT_FOUND | Page not found. |
390
+
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
322
391
/live-well:
323
392
parameters:
324
393
- $ref: "#/components/parameters/apiKey"
@@ -334,7 +403,7 @@ paths:
334
403
335
404
At the top level, modularised content of child pages is highlighted by the `hasPart` field. In child pages, only the individual page will be shown.
| 401 | ACCESS_DENIED | ApiKey missing, invalid or expired, or calling application not configured for this operation. |
425
+
| 403 | ACCESS_DENIED | User cannot perform this action. |
426
+
| 404 | RESOURCE_NOT_FOUND | Page not found. |
427
+
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
0 commit comments