-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into add-path-api-gatewa…
…y-request
- Loading branch information
Showing
3 changed files
with
88 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,37 @@ | ||
# holiday-stop-api | ||
# TODO | ||
All endpoints require... | ||
|
||
- `x-api-key` header (generated by the `HolidayStopApiKey` in the CloudFormation) | ||
- and either... | ||
- `x-identity-id` header which specifies the identityID of the user to request data for _(sent in the `manage-frontend` use-case)_ | ||
- `x-salesforce-contact-id` header which specifies the Salesforce contact ID of the user to request data for _(sent in the CSR UI (in Salesforce) use-case)_ | ||
|
||
| Method | Endpoint | Description | | ||
| --- | --- | --- | | ||
| GET | `/{STAGE}/potential?startDate={yyyy-MM-dd}&endDate={yyyy-MM-dd}` (with `x-product-name-prefix` header set) | returns an array of dates for each issue impacted between the dates for the given product | | ||
| GET | `/{STAGE}/hsr` | returns all holiday stops (past & present) for the user | | ||
| GET | `/{STAGE}/hsr` (with `x-product-name-prefix` header set) | returns all holiday stops (past & present) but including a calculated 'first available date' based on the type of product | | ||
| GET | `/{STAGE}/hsr /{SUBSCRIPTION_NAME}` (with `x-product-name-prefix` header set) | returns all holiday stops (past & present) for the user filtered on the specified subscription also including a calculated 'first available date' based on the type of product | | ||
| POST | `/{STAGE}/hsr` | creates a new all holiday stop, example body `{ "start": "2023-06-10", "end": "2024-06-14", "subscriptionName": "A-S00071783" }`| | ||
| DELETE | `/{STAGE}/hsr /{SUBSCRIPTION_NAME} /{SF_ID}` | deletes the holiday stop request from SalesForce (with Id matching `{SF_ID}`) | | ||
|
||
|
||
### Handling Multiple Environments | ||
# TODO | ||
This lambda has a one-to-one relationship between AWS Stack/Stage and Salesforce Environment. | ||
- SF DEV <-> AWS DEV Stack | ||
- SF UAT <-> AWS CODE Stack | ||
- SF PROD <-> AWS PROD Stack | ||
|
||
|
||
The CSR UI (in Salesforce) is one consumer of this API and so each Salesforce environment is configured to speak the corresponding instance of the lambda. | ||
|
||
`manage-frontend` is the main consumer and it supports 'test-users' and calls the correct instance of this lambda accordingly. | ||
|
||
| Stage of `manage-frontend` | normal mode | test user mode | | ||
| --- | --- | --- | | ||
| DEV (local machine) | DEV Lambda* (SF Dev) | CODE Lambda (SF UAT) | | ||
| CODE | DEV Lambda* (SF Dev) | CODE Lambda (SF UAT) | | ||
| PROD | PROD Lambda (SF Dev) | CODE Lambda (SF UAT) | | ||
|
||
\* Yes indeed there is a DEV Stack for the lambda, which is unusual and currently a bit fiddly to deploy via Riff-Raff (you need to 'Preview' the deploy then change the 'stage' parameter in the URL) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters