POST REST API Exposed by SAM for Workflow Actions

SAM provides a built-in POST REST API to do Approval Request actions.

Sample:

http://<server id>/sam/api/approvals/88@93?actionId=88@85

'88@93' in the previous URL represent 'Approval Id' and '88@85' represents the 'Action Id', which will be performed. The 'Action Id' can be found in the Action Id field of the Workflow Actions popup on the Profile administration screen within SAM.

Output:

The 'message' contains a string explaining the outcome, either that the action is completed or was not able to be performed because of some reason. The 'data' property will always be empty. The positive output will return 200 as its status code.

{
    "message": "Approval Request status changed to Draft",
    "data": null
}

The negative output will return 409 or 500 as status code.

{
    "message": "Approval Request status cannot be changed to null",
    "data": null
}

For more examples, see https://github.com/OracleSiebel/ConfiguringSiebel/tree/master/ExampleCode/SAM.

Perform the following to update the status on workspace delivery.

  1. Find the action Id required for status update. To find,

    1. Login to SAM as administrator.

    2. Go to Main menu, Administrator.

    3. Click to drill down to the profile.

    4. Find the Action under Workflow section.

    5. Click to bring up the Action pop-up screen to find the Action Id in the Approval Profile Actions screen.

  2. Flip SAM status post-delivery using the Action Id found in step 1. Do the following,

    1. Make the content type as application/json.

    2. Provide authentication details of the user who is part of the action owner role.

      Make a POST call to http://<SAM server>/sam/api/approvals/88@30994552?actionId=88@30991159. Output appears as follows in Postman.

      		{
          		"message": "Approval Request status changed to Ready for Build",
          		"data": null
      		}