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
+21-19Lines changed: 21 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -400,11 +400,13 @@ security:
400
400
paths:
401
401
/conditions:
402
402
parameters:
403
-
- $ref: "#/components/parameters/order"
404
403
- $ref: "#/components/parameters/page"
405
404
- $ref: "#/components/parameters/category"
405
+
- $ref: "#/components/parameters/orderBy"
406
+
- $ref: "#/components/parameters/startDate"
407
+
- $ref: "#/components/parameters/endDate"
408
+
- $ref: "#/components/parameters/order"
406
409
- $ref: "#/components/parameters/synonyms"
407
-
- $ref: "#/components/parameters/status"
408
410
get:
409
411
summary: Get all pages in the Health A to Z
410
412
operationId: get-conditions
@@ -416,7 +418,15 @@ paths:
416
418
417
419
The response is limited to 25 child pages and is paginated.
418
420
419
-
There are a number of query parameters that filter the output.
421
+
There are a number of query parameters that filter the results.
422
+
423
+
## Ordering by dates
424
+
425
+
The `orderBy` parameter can be `dateModified`, `lastReviewed` and `nextReview`. By default if any of the `orderBy` parameters are chosen the results are sorted by newest first.
426
+
427
+
However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format.
428
+
429
+
For example `https://api.service.nhs.uk/nhs-website-content/conditions?startDate=2022-01-01&orderBy=dateModified`
420
430
421
431
responses:
422
432
"200":
@@ -480,12 +490,12 @@ paths:
480
490
| 429 | TOO_MANY_REQUESTS | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
481
491
/medicines:
482
492
parameters:
483
-
- $ref: "#/components/parameters/startDate"
484
-
- $ref: "#/components/parameters/endDate"
485
-
- $ref: "#/components/parameters/order"
486
493
- $ref: "#/components/parameters/page"
487
494
- $ref: "#/components/parameters/category"
488
495
- $ref: "#/components/parameters/orderBy"
496
+
- $ref: "#/components/parameters/startDate"
497
+
- $ref: "#/components/parameters/endDate"
498
+
- $ref: "#/components/parameters/order"
489
499
get:
490
500
summary: Get all pages in the Medicines A to Z
491
501
operationId: get-medicines
@@ -497,15 +507,15 @@ paths:
497
507
498
508
The response is limited to 25 child pages and is paginated.
499
509
500
-
There are a number of query parameters that filter the output.
510
+
There are a number of query parameters that filter the results.
501
511
502
512
## Ordering by dates
503
513
504
514
The `orderBy` parameter can be `dateModified`, `lastReviewed` and `nextReview`. By default if any of the `orderBy` parameters are chosen the results are sorted by newest first.
505
515
506
516
However, the `orderBy` parameter can be used with the `startDate` and `endDate` parameters to filter down to the desired date. `startDate` and `endDate` should be given in the YYYY-MM-DD format.
507
517
508
-
For example `https://api.nhs.uk/medicines?startDate=2022-01-01&orderBy=dateModified`
518
+
For example `https://api.service.nhs.uk/nhs-website-content/medicines?startDate=2022-01-01&orderBy=dateModified`
509
519
510
520
responses:
511
521
"200":
@@ -805,15 +815,15 @@ components:
805
815
startDate:
806
816
name: startDate
807
817
in: query
808
-
description: Earliest date filter, works with orderBy.
818
+
description: Earliest date filter, works with orderBy. Format must be YYYY-MM-DD.
809
819
required: false
810
820
schema:
811
821
type: string
812
822
example: "2020-01-01"
813
823
endDate:
814
824
name: endDate
815
825
in: query
816
-
description: Latest date filter, works with orderBy.
826
+
description: Latest date filter, works with orderBy. Format must be YYYY-MM-DD.
817
827
required: false
818
828
schema:
819
829
type: string
@@ -845,7 +855,7 @@ components:
845
855
orderBy:
846
856
name: orderBy
847
857
in: query
848
-
description: works alongside startDate and endDate. Options are "dateModified", "lastReviewed" and "nextReview".
858
+
description: Works alongside startDate and endDate. Options are "dateModified", "lastReviewed" and "nextReview".
849
859
required: false
850
860
schema:
851
861
type: string
@@ -858,14 +868,6 @@ components:
858
868
schema:
859
869
type: boolean
860
870
example: true
861
-
status:
862
-
name: status
863
-
in: query
864
-
description: Filter by "published" or "unpublished".
0 commit comments