Query Based on Multi-Query Request Tokens

APIs are built for searching SAM requests based on multiple query tokens like Profile Id, Status and so on. You can use Google Chrome, Postman, or a similar HTTP client to test the REST APIs mentioned in the following procedure.

To make a query request

  1. Find the query token data that you need.

    The following could be some of the query tokens and the way to find them. The details are in the following topics.

    • STATUS_ID. Make a GET call on the Status API to find the statusId value that you want for a particular status.

    • MANAGER_ID and OWNER_ID. Make a GET call on the Users API to get all the users with their Ids in the property named ‘uId’.

    • PROFILE_ID. Make a GET call on the Profile API to get the profileId of the profile to query on.

    • ISSUE_ID. This is the actual Issue Id generated by your Issue Tracker.

  2. Query using the data. Make a POST call to http://<SAM server>/sam/api/approvals.
    • Make the content type as application/json.

    • Provide authentication details of the user who has administrative privileges.

    • Provide the JSON content, like the sample here according to your requirement, in the request body.

      Sample of a single query criteria. This will return all of the approval requests created using the provided Profile.

      		{
              		"PROFILE_ID":"88@30990605"
      		}

      Sample of a dual query criteria. This will return all of the approval requests created using the provided Profile and are in the provided Status.

      		{
      				"PROFILE_ID":"88@30990610",
      				"APPROVAL_STATUS_ID":"88@30993086"
      		}

      The output format is identical to the one listed for the single approval request.