Skip to content

Commit 65fa961

Browse files
authored
SYN-775: Mention each environment in the 'Environments and testing' section and show sample cURL command. (#113)
* Tweaks * Updated the ‘Environments and testing’ text * Fix
1 parent b5ec68d commit 65fa961

1 file changed

Lines changed: 29 additions & 4 deletions

File tree

specification/nhs-website-content-api.yaml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,12 @@ info:
109109
| Integration test | `https://int.api.service.nhs.uk/nhs-website-content/` |
110110
| Production | Not available yet |
111111
112-
### Sandbox testing
112+
### Sandbox environment
113113
Our [sandbox environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#sandbox-testing):
114114
* is for early developer testing
115115
* only covers a limited set of scenarios
116-
* is open access, so does not allow you to test authorisation
116+
* is open access, so does not allow you to test authorisation (you do not need to provide an `apikey` in the request header)
117+
* is [rate limited](#overview--usage-caps)
117118
118119
<div class="nhsd-m-expander" style="margin-bottom: 1rem;">
119120
<details>
@@ -212,20 +213,44 @@ info:
212213
213214
[![Run in Postman](https://run.pstmn.io/button.svg)](https://app.getpostman.com/run-collection/222854-abafff02-a96d-4259-9c0d-2f4d3fd6d4bf)
214215
215-
### Integration testing
216+
### Integration test environment
216217
Our [integration test environment](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing):
217218
* is for formal integration testing
218-
* includes authorisation via an API Key
219+
* includes authorisation via an API Key, which can be obtained from the [NHS Digital Onboarding Service - Developer account](https://onboarding.prod.api.platform.nhs.uk/Index)
220+
* has a restricted [rate limit](#overview--usage-caps)
221+
222+
Here is an example cURL request, calling the integration test environment
223+
```
224+
curl -X GET 'https://int.api.service.nhs.uk/nhs-website-content/conditions/' \
225+
-H 'Content-Type: application/json' \
226+
-H 'apikey: YOUR_INTEGRATION_TEST_ENVIRONMENT_APIKEY_GOES_HERE'
227+
```
219228
220229
For more details see [integration testing with our RESTful APIs](https://digital.nhs.uk/developer/guides-and-documentation/testing#integration-testing-with-our-restful-apis).
221230
231+
### Production environment
232+
Our production environment:
233+
* requires you to get your [application/product onboarded](#overview--onboarding) and approved by us
234+
* is to be used by your production application
235+
* includes authorisation via an API Key, which can be obtained from the [NHS Digital Onboarding Service - Developer account](https://onboarding.prod.api.platform.nhs.uk/Index). This will be different from your Integration test API key.
236+
* has a higher [rate limit](#overview--usage-caps)
237+
238+
Here is an example cURL request, calling the production environment
239+
```
240+
curl -X GET 'https://api.service.nhs.uk/nhs-website-content/conditions/' \
241+
-H 'Content-Type: application/json' \
242+
-H 'apikey: YOUR_PRODUCTION_ENVIRONMENT_APIKEY_GOES_HERE'
243+
```
244+
222245
## Onboarding
223246
You need to get your software approved by us before it can go live with this API. We call this onboarding.
224247
225248
The [onboarding process](https://digital.nhs.uk/developer/guides-and-documentation/onboarding-process) for this API is currently in development.
226249
227250
During this process you will be asked agree to the [Online connection agreement](https://digital.nhs.uk/developer/guides-and-documentation/online-connection-agreement).
228251
252+
You can [submit your application/product for onboarding](https://onboarding.prod.api.platform.nhs.uk/Products) using the [Digital Onboarding Service](https://onboarding.prod.api.platform.nhs.uk/Index)
253+
229254
## Caching
230255
Caching of all responses from the NHS website content API is recommended, and you should do so where possible, unless otherwise notified to you by NHS Digital. The cached data should be refreshed no less than once every 7 days. If instructed to refresh cached NHS website content, you must do so immediately.
231256

0 commit comments

Comments
 (0)