|
| 1 | +# Environments – Notify Supplier |
| 2 | + |
| 3 | +## Environment Matrix |
| 4 | + |
| 5 | +| Environment Name | Apigee Instance | Proxy URL | Application | Security Level | Private Key | KID | Notes / Env Code | |
| 6 | +|------------------|-----------------|-----------|--------------|----------------|--------------|------|------------------| |
| 7 | +| **Internal dev – PRs** | Internal | internal-dev.api.service.nhs.uk/nhs-notify-supplier-PR-XXX | Notify-Supplier-App-Restricted – Internal Dev 2 | level 0 | — | — | internal-dev PRs | |
| 8 | +| **Internal dev – Main** | Internal | internal-dev.api.service.nhs.uk/nhs-notify-supplier | Notify Supplier – Application Restricted – Internal Dev Main | level 3 | [internal-dev-test-1.pem](https://eu-west-2.console.aws.amazon.com/systems-manager/parameters/%252Fnhs%252Fjwt%252Fkeys%252Finternal-dev-test-1.pem/description?region=eu-west-2&tab=Table) | internal-dev-test-1 | dev | |
| 9 | +| **Ref** | Internal | ref.api.service.nhs.uk/nhs-notify-supplier | Notify Supplier – Application Restricted – Ref | level 3 | [ref-test-1.pem](https://eu-west-2.console.aws.amazon.com/systems-manager/parameters/%252Fnhs%252Fjwt%252Fkeys%252Fref-test-1.pem/description?region=eu-west-2&tab=Table) | ref-test-1 | prod | |
| 10 | +| **Int** | External | int.api.service.nhs.uk/nhs-notify-supplier | Notify Supplier – Integration Testing | level 3 | [int-test-1.pem](https://eu-west-2.console.aws.amazon.com/systems-manager/parameters/%252Fnhs%252Fint%252Fjwt%252Fint-test-1.pem/description?region=eu-west-2&tab=Table) | int-test-1 | int | |
| 11 | + |
| 12 | +--- |
| 13 | + |
| 14 | +## How to Get the JWT Access Token |
| 15 | + |
| 16 | +1. Download the private key from AWS Systems Manager and save it locally as `$KID.pem`, for example `ref-test-1.pem`. |
| 17 | + |
| 18 | +2. Get the Apigee API key via one of the following: |
| 19 | + - [Apigee Edge Console](https://apigee.com/edge) |
| 20 | + - [Internal developer account](https://onboarding.prod.api.platform.nhs.uk/Index) |
| 21 | + - [External developer account](https://dos-internal.ptl.api.platform.nhs.uk/Index) |
| 22 | + |
| 23 | +3. Run the Python script `get_bearer_token.py` with the parameters: |
| 24 | + |
| 25 | + ```bash |
| 26 | + python get_bearer_token.py --kid <KID> --env <ENVIRONMENT> --appid <APIKEY> |
| 27 | + ``` |
| 28 | + |
| 29 | + Example: |
| 30 | + |
| 31 | + ```bash |
| 32 | + python get_bearer_token.py --kid ref-test-1 --env ref --appid 8Np3gFEw21JX7AGuokId0QEFTaOhG4Z2 |
| 33 | + ``` |
| 34 | + |
| 35 | +4. The access token will be returned in the response |
| 36 | + |
| 37 | +5. Add the access token to your API requests as a header: |
| 38 | + |
| 39 | + | Header Name | Header Value | |
| 40 | + |--------------|--------------| |
| 41 | + | Authorization | `Bearer <access token>` | |
| 42 | + |
| 43 | +--- |
0 commit comments