From 2ae0a61bc3ca9a92680b6917cd5787aafe3e65fd Mon Sep 17 00:00:00 2001
From: Joseph Andersen <12385932+jpandersen87@users.noreply.github.com>
Date: Tue, 17 Dec 2024 10:00:17 -0600
Subject: [PATCH] Update and Correct API References in ReportStream Responses
(#16785)
Fixes #16660
---
.../ResponsesFromReportStream.mdx | 87 ++++++++++++++-----
1 file changed, 66 insertions(+), 21 deletions(-)
diff --git a/frontend-react/src/content/developer-resources/reportstream-api/documentation/ResponsesFromReportStream.mdx b/frontend-react/src/content/developer-resources/reportstream-api/documentation/ResponsesFromReportStream.mdx
index 3abd44e560f..4a692f55463 100644
--- a/frontend-react/src/content/developer-resources/reportstream-api/documentation/ResponsesFromReportStream.mdx
+++ b/frontend-react/src/content/developer-resources/reportstream-api/documentation/ResponsesFromReportStream.mdx
@@ -34,8 +34,8 @@ The History Details API can be queried later to get full information about expec
Example ReportStream response to an async submission:
-```
-{
+
+{`{
"submissionId":1604,
"timestamp":"2022-02-10T13:50:19.162694Z",
"sender":"simple_report.default",
@@ -49,21 +49,30 @@ Example ReportStream response to an async submission:
"topic":"covid-19",
"warningCount":0,
"errorCount":0
-}
-```
+}`}
+
ReportStream features a History Details API that can be later queried to obtain the actual destinations and relevant detail using your existing private/public key pair.
-The request is made with the submissionId in the earlier example:
+The request can be made by using either the submissionId or id returned in the API response. Using the earlier example:
+
+Using SubmissionID:
+
+
+https://prime.cdc.gov/api/waters/report/1588/history
+
+
+Using ID:
+
+
+https://prime.cdc.gov/api/waters/report/3597ad7d-b92c-4bc0-a8fc-d909ed87bc90/history
+
-```
-https://prime.cdc.gov/api/history/simple_report/submissions/1588
-```
Response:
-```
-{
+
+{`{
"submissionId": 1588,
"timestamp": "2022-02-09T16:59:33.789532Z",
"sender": "simple_report",
@@ -110,19 +119,54 @@ Response:
"topic": "covid-19",
"warningCount": 0,
"errorCount": 0
-}
-```
+}`}
+
The sentReports sections contain details about where and when the reports were transmitted.
+Additionally, you can retrieve the complete list of submissions made to ReportStream by calling this API:
+
+
+https://prime.cdc.gov/api/waters/org/simple_report.default/submissions
+
+
+Response:
+
+
+{`[
+ {
+ "submissionId": 158,
+ "timestamp": "2024-11-19T22:47:23.852Z",
+ "sender": "simple_report.default",
+ "httpStatus": 201,
+ "id": "8e33a43c-7513-4973-ac9f-5bd4e1cfcadb",
+ "topic": "full-elr",
+ "reportItemCount": 1,
+ "fileName": "ignore.ignore-full-elr-e2e%2F8e33a43c-7513-4973-ac9f-5bd4e1cfcadb.hl7",
+ "fileType": "HL7"
+ },
+ {
+ "submissionId": 154,
+ "timestamp": "2024-11-19T22:43:59.600Z",
+ "sender": "simple_report.default",
+ "httpStatus": 201,
+ "id": "b36e5ef2-2d8f-4a4b-b0a6-b8408309b816",
+ "topic": "full-elr",
+ "reportItemCount": 1,
+ "fileName": "ignore.ignore-full-elr-e2e%2Fb36e5ef2-2d8f-4a4b-b0a6-b8408309b816.hl7",
+ "fileType": "HL7"
+ }
+]`}
+
+
## JSON error responses
In error cases, no report "id" UUID is returned, because no report was created based on the submission.
Example failure response and identical HistoryAPI response (Note the "id" is null, and the “httpStatus” is not 201):
-```
-{
+
+{`{
"submissionId": 1594,
"timestamp": "2022-02-09T20:44:55.055545Z",
"sender": "simple_report",
@@ -143,13 +187,13 @@ Example failure response and identical HistoryAPI response (Note the "id" is nul
"topic": null,
"warningCount": 0,
"errorCount": 1
-}
-```
+}`}
+
Example of a report level error:
-```
-{
+
+{`{
"submissionId": 1599,
"timestamp": "2022-02-09T20:56:16.82117Z",
"sender": "strac",
@@ -170,6 +214,7 @@ Example of a report level error:
"topic": null,
"warningCount": 0,
"errorCount": 1
-}
-```
-
\ No newline at end of file
+}`}
+
+
+