Postman - Get a Single Aud Action - Formats 500 and 502
Purpose: To Get a single action Aud action in format 500 and format 502.
I first want to mention there is more than one audiometric data format. There are some that are legacy, pre xml. Below is a link for the different aud data formats.
Secondly, if you look in on the swagger page, under patient actions, at the “Get -/{tenantid}/api/Patients/{patientId}/{sessionId}/action/{actionId}” route you will see dataFmt. With this Query Param you can say what data format you want the aud data in when you get it. So, if you want the aud data returned to you as 500, you would do this “ "dataFmt": 500
.” It is up to you what format you want the data in. The link above will show you the different formats. *Note: The Noah ES API will only return xml formats. So you can get the data as format 500 or format 502.
Precondition: Remember to create your new access token.
https://himsanoah.atlassian.net/wiki/spaces/~977867606/pages/3460169759
1.) Creating the Get Action Route
The API has multiple requirements for this get route.
Collection Variable.
Path Variables
Query Params
Headers
The path for Get PatientAction:
1.) Format 500
{{baseUrlNoahESQA}}/:tenantId/api/Patients/:patientId/:sessionId/action/:actionId?skip=0&take=200&dataFmt=500
2.) Format 502
{{baseUrlNoahESQA}}/:tenantId/api/Patients/:patientId/:sessionId/action/:actionId?skip=0&take=200&dataFmt=502
*Note: The collection variable I created {{baseUrlNoahESQA} = https://api.qa.eu.noah-es.com
A.) Path Variables: See Picture Below
1.) :tennantid = {{tennantid}} - I created a collection variable for my fork of the Noah ES Test Collection.
{{tenantid}} = de1dbe40-6993-4eb3-ae4a-f87a07a21e3b
2.) :patientId = {{patientId}} - I created a collection variable for my fork of the Noah ES Test Collection.
{{patientId}} =5e531816-83ab-4a7d-b82d-897f33bf3640 - This is for the Test 4 Test4 patient in the db.
3.) sessionId = {{sessionId}} - I created a collection variable for my fork of the Noah ES Test Collection.
{{sessionId}} = 0cb1fecc-3ce9-4964-a953-ec802a934d39 - This is the session list(one Session) for the Test 4 Test4 patient in the db.
4.) actionId = {{actionId}} - I created a collection variable for my fork of the Noah ES Test Collection.
{{actionId} - dbfcb263-77fa-4925-901f-74e00fd3ba0a - This is the format 500 aud actionid for the aud action in for the Test 4 Test4 patient in the db.
B.) Query Params: See Pictures Below
1.) Format 500
i.) skip = 0
ii.) take - 200
iii.) dataFmt - 500
2.) Format 502
i.) skip = 0
ii.) take - 200
iii.) dataFmt - 502
C.) Headers: See Picture Below
The X-Api-Version needs to be set. At this time 1.0 is the only version, so this is what I have set.
2.) Sending the Get Action Route
a.) Go to the Authorization tab and select the token you created as a precondition above.
b.) Once the access token has been selected, the Path Variables set, Query Params set and the Header set. Select “Send”
3.) Results
a.) You should see a Status: 200 OK.
If you don’t see Status 200 OK
If you do not, Check the error code in Swagger by expanding the patientactions and scrolling down to the return values. Swagger UI
Note: It might be helpful to check the Console too. It is located at the bottom, of Postman on the lower left corner. The picture below shows where to find the option to select and open the console.
b.) Successful results for the returned aud action for the session in the Test4 Test4 patient record.
The picture below is what you will see for a successful return of the Get Action in format 502. Below that is the full returned format 502data in the code snippet.
*Note: In the returned data below you can see the data base 64 encoded.
{
"actionId": "dbfcb263-77fa-4925-901f-74e00fd3ba0a",
"legacyActionId": 182998,
"sessionId": "0cb1fecc-3ce9-4964-a953-ec802a934d39",
"creatorUserAccountId": "f0d680cb-d880-4e99-9568-6f78936a38e2",
"actionReferences": [],
"legacySessionId": 24986,
"legacyActionReferences": [],
"created": "2023-07-26T20:54:09.85Z",
"updated": "2023-07-26T20:54:09.85Z",
"creatorUserInfo": {
"userId": "f0d680cb-d880-4e99-9568-6f78936a38e2",
"legacyUserId": 3,
"idPId": "a9cdc8d9-4c37-418f-9afd-d490d7874ac8"
},
"actionDate": "2023-07-26T20:54:09.85Z",
"actionGroup": null,
"actionGroupGuid": null,
"description": "test",
"moduleID": moduleID,
"deviceType": 0,
"dataTypeCode": 1,
"data": {
"publicDataContent": "LegacyActionContent",
"legacyData": {
"base64EncodedData": "PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48SElNU0FBdWRpb21ldHJpY1N0YW5kYXJkIHhtbG5zPSJodHRwOi8vd3d3LmhpbXNhLmNvbS9NZWFzdXJlbWVudC9BdWRpb2dyYW0vNTAyIiBWZ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