It's all about the answers!

Ask a question

How can I find a "Filed Against"/Category by following through rootservices


Kevin Conway (4368) | asked Jul 17 '13, 4:58 p.m.
 Hi:

  I am working on doing some automation using perl and submitting records by curl and the json format.  I want to parameterize this as much as I can so that I don't need to recode when moving from the test to the production server.  I can look up most of what I need apart from the "Filed Against"/Catgeory information.

http://servername/ccm/rootservices will let me find the services that are offered from the server .  I then can use it to request https://servername/ccm/oslc-scm/catalog

I can't see anything to use from this point down to find what I want.  I did dump an existing record in JSON format to determine it's category identifier, but there has to be a more elegant way to do this.

  Thanks in advance.

kjc

Accepted answer


permanent link
Takehiko Amano (1.3k3741) | answered Jul 18 '13, 3:13 a.m.
JAZZ DEVELOPER
I have not tried myself, but theoretically possible.

Filed Against/Category:    https://server/ccm/oslc/categories     (produce XML format)
Planned for :                     https://server/ccm/oslc/iterations       (produce XML format)

If you prefer JSON, use  https://server/ccm/oslc/categories.json.

Hope this helps !


Kevin Conway selected this answer as the correct answer

One other answer



permanent link
Kevin Conway (4368) | answered Jul 18 '13, 9:32 a.m.
 Hi:

  Yes, that does work.  It returns the following in XML:

<rtc_cm:Category rdf:resource="https://servername/ccm/resource/itemOid/com.ibm.team.workitem.Category/_V0NTsLKJEeK2-dMhs3KyeA">
<rtc_cm:projectArea rdf:resource="https://protojazz.omers.com/ccm/oslc/projectareas/_V3aLH5YhEeKb9J0kvxf3_g"/>
<dc:title>Category Title</dc:title>
<rtc_cm:hierarchicalName>Category Title</rtc_cm:hierarchicalName>
<dc:description/>
<rtc_cm:defaultTeamArea/>
<rtc_cm:teamAreas/>
<rtc_cm:depth>0</rtc_cm:depth>
</rtc_cm:Category>

I can search for the supplied category name and within that XML, I can get the value for the Project name (_V3aLH5YhEeKb9J0kvxf3_g) and the value for the Category name (_V0NTsLKJEeK2-dMhs3KyeA) .  As long as the Category name remains unique, I should be fine.

This will give me two possibilities - use the the information from a record that I am creating links to so that I copy the Project and Category names or look up the Project and Category given a supplied Category name.

For reference, where do I find the documentation that gives the URLs that you supplied?

KjC

Your answer


Register or 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.