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 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? |
6 answers
![]()
Hi,
the catalog of Category IDs within a project is published at: https://:9443/jazz/oslc/categories -Nicolas |
![]()
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. |
![]()
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 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.
|
![]()
I don't know if it makes a difference, but I am on 2.0.0.2 ifix5.
I tried your link of "https://<server>:9443/ccm/oslc/categories" 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. |
![]()
Figured it out. The following works:
https://:9443/jazz/oslc/categories.xml Thanks, you got me most of the way there. :) |
![]()
" 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.
|
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.