Postman-Update Action
Purpose: To show how to update an action. The Put route to update an action requires the “If-Match” etag. The example below shows how to get this etag and how to use it in the put route to update an action.
NOTE: example below is a fitting action for a left ear being updated.
Precondition:
Generate an Access token
1.) Run a get action request to get an individual action
Get /{tenantid}/api/Patients/{patientId}/{sessionId}/action/{actionId}
https://api.qa.eu.noah-es.com/:tennantid/api/Patients/:patientId/:sessionId/action/:actionId
2.) In the return body header or the get request, you are looking for the “If-Match” etag.
3.) You will also need the following for the updating of the action. You should have these as you would have had to use the for the get route request
patientid
sessionid
actionid
4.) Now the Put request to update a single action.
Put /{tenantid}/api/Patients/{patientId}/{sessionId}/action/{actionId}
https://api.qa.eu.noah-es.com/:tennantid/api/Patients/:patientId/:sessionId/action/:actionId
5.) The parameters for the Put route
6.) The Headers
Note the If-Match etag. This you will have obtained from the action get route return body header mentioned above. Also note that you will need the X-Api-Version header
7.) The body of the put action, update action, request. Below is from the Swagger documentation for this route.
a.) Swagger Documentation:
{
"actionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"actionReferences": [
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
],
"actionDate": "2024-11-05T16:35:44.915Z",
"actionGroup": "2024-11-05T16:35:44.915Z",
"actionGroupGuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"description": "string",
"moduleID": 0,
"deviceType": 0,
"dataTypeCode": 0,
"data": {
"publicDataContent": "LegacyActionContent",
"legacyData": {
"base64EncodedData": "string",
"dataFmt": 0
}
},
"privateBlob": "string",
"privateBlobFormat": 0,
"hidden": true
}
b.) My example:
8.) Expected results - 200 OK status is returned.