Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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:

com.ibm.team.workitem.Approval

This element represents an approval from a single contributor with a particular state.

Properties:

  • stateIdentifier (type: xs:string). The state of the approval
  • stateDate (type: xs:time). The date the state was assigned
  • stateName (type: xs:string). The name of the state
  • approver (type: com.ibm.team.repository.Contributor). The contributor who is asked for approval
  • approvalDescriptor (type: com.ibm.team.workitem.ApprovalDescriptor). The approval descriptor that aggregates the approval

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?

0 votes


Accepted answer

Permanent link
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

0 votes

Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,019
× 479
× 230

Question asked: Oct 04 '13, 8:16 a.m.

Question was seen: 7,027 times

Last updated: Jul 17 '14, 8:49 p.m.

Confirmation Cancel Confirm