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

Getting a category ID list through the RTC REST API

In order to do queries filtered on category, I need to know the category ID (the long string of characters looking something like "_hDbz8EqVEd6HXO10niqZpg")

The API instructions here:

https://jazz.net/wiki/bin/view/Main/ResourceOrientedWorkItemAPIv2

Include the example:

Work Items in category 'X' ordered by Id


rtc_cm:filedAgainst="https://localhost:9443/jazz/resource/itemOid/com.ibm.team.workitem.Category/_hDbz8EqVEd6HXO10niqZpg" /sort=dc:identifier
rtc_cm:filedAgainst="_hDbz8EqVEd6HXO10niqZpg" /sort=dc:identifier


So how do I get a list of all those category IDs?

I know how to get the Project IDs:

https://:9443/jazz/oslc/workitems/catalog

Is there a similar catalog of Category IDs within a project?

1

0 votes



6 answers

Permanent link
Hi,

the catalog of Category IDs within a project is published at:

https://:9443/jazz/oslc/categories


-Nicolas

0 votes


Permanent link
Error message:

"The resource identified by this request is only capable of generating responses with characteristics not acceptable according to the request "accept" headers ()."

I would think I need to include the project ID, so I think something may be missing from this syntax.

0 votes


Permanent link
Now this is strange.

I have just tried browsing to "https://<server>:9443/ccm/oslc/categories" on my 3.0.1 test server, and no error occurs. The server correctly answers with an XML document containing a collection of categories.

Anyway, to include the project ID, try this:

https://<server>:9443/ccm/oslc/categories?oslc_cm.query=dc:title="projectname"

This should return the categories of the "projectname" project. Beware, you may need to URL encode the query before sending it.

-Nicolas

0 votes

Comments

 https://<server>:9443/ccm/oslc/categories?oslc_cm.query=dc:title="projectname"  will not filter based on project area name. It will query for the component name.

To filter based on the project area you need to use rtc_cm:projectArea="<project oslc uri>" query.


Permanent link
I don't know if it makes a difference, but I am on 2.0.0.2 ifix5.

I tried your link of &quot;https://&lt;server&gt;:9443/ccm/oslc/categories&quot; and that results in a 404 error (yes, I did change the server name). I think the ccm is dependent on how your server is setup.

0 votes


Permanent link
Figured it out. The following works:

https://:9443/jazz/oslc/categories.xml

Thanks, you got me most of the way there. :)

0 votes


Permanent link

 Aradhya K

https://<server>:9443/ccm/oslc/categories?oslc_cm.query=dc:title="projectname"  will not filter based on project area name. It will query for the component name.
To filter based on the project area you need to use rtc_cm:projectArea="<project oslc uri>" query.
"

The <project oslc uri> is the itemId of the project in projetArea artefact.

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
× 10,939

Question asked: Oct 03 '11, 8:10 p.m.

Question was seen: 11,546 times

Last updated: Jan 16 '18, 8:30 a.m.

Confirmation Cancel Confirm