-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1040 Update WH docs #2284
1040 Update WH docs #2284
Conversation
Ref. metriport/metriport-internal#1040 Signed-off-by: Rafael Leite <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approve conditional on fixing typo and comment
Ref. metriport/metriport-internal#1040 Signed-off-by: Rafael Leite <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking care of this @leite08 ❤️
Generally LGTM - left some minor comments for improvements
1. Accepts and responds to a [`ping` message](#the-ping-message); | ||
1. Be [idempotent](https://en.wikipedia.org/wiki/Idempotence) - it should accept being called more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some thoughts/Qs:
- Is the "idempotent" requirement essentially just telling the cx that we always expect a
200
HTTP response? Perhaps we should just tell them that, since we don't really care what they do on their end? - We've had problems where cx webhook endpoints take a long time to process the payload, and we timeout waiting for the response. Should we instruct them to process the payload async and return us
200
right away?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the "idempotent" requirement essentially just telling the cx that we always expect a 200 HTTP response? Perhaps we should just tell them that, since we don't really care what they do on their end?
No, saying it should be idempotent is not the same thing as saying it should always return 200. They need to design their endpoint in a way that allows it being called multiple times w/ the same payload w/o breaking their app.
We've had problems where cx webhook endpoints take a long time to process the payload, and we timeout waiting for the response. Should we instruct them to process the payload async and return us 200 right away?
Good point, added!
docs/home/api-info/webhooks.mdx
Outdated
When Metriport sends a webhook message, it includes an `x-metriport-signature` header. | ||
|
||
- `x-metriport-signature`: This is an [HMAC](https://en.wikipedia.org/wiki/HMAC) SHA-256 hash computed using your webhook key and the body of the webhook message. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: formatting here is a bit weird - suggestion to combine the two:
When Metriport sends a webhook message, it includes an x-metriport-signature
header - this is an HMAC SHA-256 hash computed using your webhook key and the body of the webhook message.
docs/home/api-info/webhooks.mdx
Outdated
The previous method of authenticating webhooks, comparing your webhook key with the `x-webhook-key` in each request's HTTP header, is being deprecated on **December 9th, 2023**. | ||
Please update your implementation to use the `x-metriport-signature` header for authentication. | ||
The previous method of authenticating webhooks, comparing your webhook key with the | ||
`x-webhook-key` in each request's HTTP header, is being deprecated on **December 9th, 2023**. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's update the date, or take this out?
we're a bit past December 9th, 2023
😛
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missed that, removed!
you'll be able to query for [patient consolidated data](#patient-consolidated-data) in | ||
FHIR-compliant format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for consistency - let's link to the endpoint they can use to do the query as per above, not the webhook message
- `medical.document-download`: result of Document Query, containing the newly downloaded documents | ||
for the patient - see [details](#patient-document-data) below; | ||
- `medical.document-conversion`: result of converting the newly downloaded C-CDA documents into FHIR - | ||
see [details](#patient-document-data) below; | ||
- `medical.document-bulk-download-urls`: list of download urls for a patient's documents, see | ||
[details](#bulk-document-download-urls) below; | ||
- `medical.consolidated-data`: result of a Consolidated Data Query, containing the patient's data in FHIR | ||
format - see [details](#patient-consolidated-data) below. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while we're at it - let's add mention of these types to each endpoint page?
ie for example https://docs.metriport.com/medical-api/api-reference/document/start-document-query should mention that medical.document-download
and medical.document-conversion
will be sent, and we can link do this page for details
… URL Ref. metriport/metriport-internal#1040 Signed-off-by: Rafael Leite <[email protected]>
1035117
to
4baa6ea
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
Ref. metriport/metriport-internal#1040
Dependencies
none
Description
Update WH documentation, including removing DAPI from WH.
Global WH page
MAPI WH page
Testing
Release Plan