REST API For Approval State
I am trying to access information about an approval by leveraging the REST API. In particular, I am interested in finding out the state of a specific approval (not the aggregate value of a collection of approvals). I've been able to identify the REST command that will display the approvals with the names of the approvers associated with those approvals, but I have not identified the command to expose the state of the approval. To find the name of the approver I am using: Approvals/Approver/Name According to this page https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI, I should be able to drill down to find out information about an approval using these properties:
However, this does not appear to be correct. I can get the approver so that works, but "stateIdentifier" doesn't work (although, "stateId" does). The remaining properties don't appear to work either. It looks like what I really need is the "stateName" command. Does anyone know what the correct syntax is for this? |
Accepted answer
Try this
https://<server>:9443/ccm/rpt/repository/workitem?fields=workitem/workItem[id=30]/approvals/(stateIdentifier|stateName|approver/name) It works for me in my RTC 4.0.6 environment. The only filter in query is [id=30], and you can change it to fit. Nate Decker selected this answer as the correct answer
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.