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
"name": "Validated Relationship Service - Integration",
5
-
"description": "## About the collection\n\nThe collection has been organised by API endpoint - you will find a folder for each one.\n\nWithin those endpoints are requests covering success and error response scenarios.\n\nEach request has at least 1 example against it. This shows the expected response for that request. Some requests have multiple examples showing how the response differs when different parameters are provided.\n\n### Authorization types\n\nWhen you send a request to the Validated Relationship Service, your request will first be authorised by the API Management service (APIM).\n\nThe Validated Relationship Service has 3 types of authorization:\n\n- CIS2 - For healthcare practitioners\n \n- App-restricted - for service-to-service authorization\n \n- Login - For patient/proxy access via the NHS App\n \n\nEach VRS API endpoint uses a different combination of these auth types depending on their use case.\n\nYou will need to follow the steps in the 'Getting Started' section below to set the correct authorization tokens for each of these types.\n\nPlease see the folder-level docs for each endpoint for details about what auth types are available to use.\n\n## Getting started\n\n### Environment variables\n\nYou will need to add the following environment variables to the collection.\n\n#### `cis2_token`\n\nAuthorization token value for CIS2 (healthcare practitioner access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_cis2_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `login_token`\n\nAuthorization token value for NHS Login (patient access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_nhs_login_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `vrs_api_private_key`\n\n**(This is not the same as the private key in the NHS Developer Account portal.)**\n\nAPI private key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the /main/vrs-app-credentials-{id} secret in **AWS Secrets Manager** or requested to be sent securely from a member of the VRS team.\n\n#### `nhs_developer_account_api_key`\n\nAPI app key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the NHS - Proxy Core Services - Integration environment resource in the NHS Developer Account portal.\n\n#### `consent_app_auth_header_value` (Generated automatically)\n\nAuthorization token value for app restricted auth.\n\n_Only required when using endponts that use the app restricted auth method._\n\n**You do not need to change this value as it is automatically set in the pre-request script.**\n\n#### `tpp_9674998535_access_token`, `tpp_9674998454_access_token`, `emis_9692113698_access_token,` and `emis_9692113612_access_token`\n\nAuthorization token value for connecting to GPIT supplier systems in NAM tests (Get proxy roles only).\n\n_Only required when running the_ `_Get proxy roles (GET/Consent) Valid request - NAM - Get proxy roles_` _requests._\n\nValues for these environment variables can be found on the [Test data page in Confluence](https://nhsd-confluence.digital.nhs.uk/spaces/NPA/pages/950553445/Test+data+and+accounts+repository+-+NPA#TestdataandaccountsrepositoryNPA-GPITtestaccountsforEXT).\n\n### How to create a valid Authorization header\n\n#### Manually through Python scripts (required for Login and CIS2)\n\n##### Pre-requisites\n\nAccess the token generation scripts from the [validated-relationships-service-api repo](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts):\n\n- get_app_access_token_int.py - for app restricted authorization\n \n- get_cis2_access_token_int.py - for CIS2 authorization\n \n- get_nhs_login_access_token_int.py - for Login user authorization\n \n\nSee the [README](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts/README.md) for information about how to run them and what environment variables are needed.\n\n##### Steps\n\n1. Generate bearer tokens for each of the above methods using the provided scripts\n \n2. Go to the Authorization tab for this Postman request\n \n3. Select 'Bearer token' from the drop-down\n \n4. Add the generated bearer token value (**without** the 'bearer' keyword before it) into the Token field\n \n\nTokens expire every 5 minutes. Once expired, you will receive an 'Unauthorised' response from the API endpoints. At this point, a new token will need to be generated by repeating the above steps.\n\n#### Automatically through pre-request script (for App-restricted)\n\nA pre-request script has been added to the endpoints where app-restricted auth can be used to obtain app-restricted tokens automatically. For this to work, you will need to add values for the following environment variables:\n\n- `private_key`\n \n- `api_key`\n \n\nIf those values are set and valid, then no further action is required.\n\n## Running a request\n\nOnce you have completed the above 'Getting Started' steps you will be able to send requests by either clicking the 'Send' button on each request, or the 'Try' button on each example.\n\nThe pre-prod environments are not constricted to just the requests provided in this collection. Feel free to change and create requests/examples as you require. However, only the test users provided will work in these environments.\n\n## Test data\n\nAll of the requests in the collection use test data and users that have been set up to demonstrate each specific scenario. No sensitive data is stored in this collection.\n\nSee each scenario for information about what test users are being used.",
5
+
"description": "## About the collection\n\nThe collection has been organised by API endpoint - you will find a folder for each one.\n\nWithin those endpoints are requests covering success and error response scenarios.\n\nEach request has at least 1 example against it. This shows the expected response for that request. Some requests have multiple examples showing how the response differs when different parameters are provided.\n\n### Authorization types\n\nWhen you send a request to the Validated Relationship Service, your request will first be authorised by the API Management service (APIM).\n\nThe Validated Relationship Service has 3 types of authorization:\n\n- CIS2 - For healthcare practitioners\n \n- App-restricted - for service-to-service authorization\n \n- Login - For patient/proxy access via the NHS App\n \n\nEach VRS API endpoint uses a different combination of these auth types depending on their use case.\n\nYou will need to follow the steps in the 'Getting Started' section below to set the correct authorization tokens for each of these types.\n\nPlease see the folder-level docs for each endpoint for details about what auth types are available to use.\n\n## Getting started\n\n### Environment variables\n\nYou will need to add the following environment variables to the collection.\n\n#### `cis2_token`\n\nAuthorization token value for CIS2 (healthcare practitioner access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_cis2_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `login_token`\n\nAuthorization token value for NHS Login (patient access).\n\n_Only required when using endponts that require this auth method._\n\nThis value can be generated by running the `get_nhs_login_access_token_int.py` script . See more details in the 'How to create a valid Authorization header' section below.\n\n#### `vrs_api_private_key`\n\n**(This is not the same as the private key in the NHS Developer Account portal.)**\n\nAPI private key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the /main/vrs-app-credentials-{id} secret in **AWS Secrets Manager** or requested to be sent securely from a member of the VRS team.\n\n#### `nhs_developer_account_api_key`\n\nAPI app key for the Validated Relationship Service integration application.\n\n_Only required when using endponts that use the app restricted auth method._\n\nThis value can be copied from the NHS - Proxy Core Services - Integration environment resource in the NHS Developer Account portal.\n\n#### `consent_app_auth_header_value` (Generated automatically)\n\nAuthorization token value for app restricted auth.\n\n_Only required when using endponts that use the app restricted auth method._\n\n**You do not need to change this value as it is automatically set in the pre-request script.**\n\n#### `tpp_9674998535_access_token`, `tpp_9674998454_access_token`, `emis_9692113698_access_token,` and `emis_9692113612_access_token`\n\nAuthorization token value for connecting to GPIT supplier systems in NAM tests (Get proxy roles only).\n\n_Only required when running the_ `_Get proxy roles (GET/Consent) Valid request - NAM - Get proxy roles_` _requests._\n\nValues for these environment variables can be found on the [Test data page in Confluence](https://nhsd-confluence.digital.nhs.uk/spaces/NPA/pages/950553445/Test+data+and+accounts+repository+-+NPA#TestdataandaccountsrepositoryNPA-GPITtestaccountsforEXT).\n\n### How to create a valid Authorization header\n\n#### Manually through Python scripts (required for Login and CIS2)\n\n##### Pre-requisites\n\nAccess the token generation scripts from the [validated-relationships-service-api repo](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts):\n\n- get_app_access_token_int.py - for app restricted authorization\n \n- get_cis2_access_token_int.py - for CIS2 authorization\n \n- get_nhs_login_access_token_int.py - for Login user authorization\n \n\nSee the [README](https://github.com/NHSDigital/validated-relationships-service-api/tree/master/scripts/README.md) for information about how to run them and what environment variables are needed.\n\n##### Steps\n\n1. Generate bearer tokens for each of the above methods using the provided scripts\n \n2. Go to the Authorization tab for this Postman request\n \n3. Select 'Bearer token' from the drop-down\n \n4. Copy just the 'access_request' value from the script output into the Token field. You do **not** need to add the word 'bearer' before the value.\n \n\nTokens expire every 5 minutes. Once expired, you will receive an 'Unauthorised' response from the API endpoints. At this point, a new token will need to be generated by repeating the above steps.\n\n#### Automatically through pre-request script (for App-restricted)\n\nA pre-request script has been added to the endpoints where app-restricted auth can be used to obtain app-restricted tokens automatically. For this to work, you will need to add values for the following environment variables:\n\n- `private_key`\n \n- `api_key`\n \n\nIf those values are set and valid, then no further action is required.\n\n## Running a request\n\nOnce you have completed the above 'Getting Started' steps you will be able to send requests by either clicking the 'Send' button on each request, or the 'Try' button on each example.\n\nThe pre-prod environments are not constricted to just the requests provided in this collection. Feel free to change and create requests/examples as you require. However, only the test users provided will work in these environments.\n\n## Test data\n\nAll of the requests in the collection use test data and users that have been set up to demonstrate each specific scenario. No sensitive data is stored in this collection.\n\nSee each scenario for information about what test users are being used.",
The values for `APPLICATION_CLIENT_ID` and `APPLICATION_CLIENT_SECRET` can be found on the NHS Developer Account
75
+
portal 'NHS - Proxy Core Services...' environment resource in the Active API keys section.
76
+
70
77
#### Select an identifier
71
78
72
79
There are a different identity proofing levels eg. p9.
@@ -98,7 +105,9 @@ e.g.
98
105
99
106
### Get App Restricted Access Token for Int Environment
100
107
101
-
Application restricted authentication is when a system is trying to access an API rather than a person. For example the Validated Relationship Service (VRS) will need an app restricted access token in order to call the Personal Demographic Service (PDS) API.
108
+
Application restricted authentication is when a system is trying to access an API rather than a person. For example the
109
+
Validated Relationship Service (VRS) will need an app restricted access token in order to call the Personal Demographic
Note with VRS_CLIENT_PRIVATE_KEY it needs to be wrapped in double quotation marks otherwise there can be formatting errors
124
+
Note with VRS_CLIENT_PRIVATE_KEY it needs to be wrapped in double quotation marks otherwise there can be formatting
125
+
errors
126
+
127
+
The values for `APPLICATION_CLIENT_ID` and `APPLICATION_CLIENT_KID` can be found on the NHS Developer Account portal '
128
+
NHS - Proxy Core Services...' environment resource in the Active API keys section.
129
+
130
+
The `APPLICATION_CLIENT_PRIVATE_KEY` is stored in AWS Secrets Manager. Please contact the VRS team if you don't have AWS
131
+
access to obtain this.
116
132
117
133
#### Run the script
118
134
@@ -132,7 +148,8 @@ e.g.
132
148
133
149
### Trouble Shooting
134
150
135
-
If you have issues with the script, a good place to start is to ensure the environment variables are accessible to poetry. This can be achieved by installing the poetry dotenv plugin
151
+
If you have issues with the script, a good place to start is to ensure the environment variables are accessible to
152
+
poetry. This can be achieved by installing the poetry dotenv plugin
0 commit comments