How to access custom attributes of a particular work item from a particualr work area of RTC via API?
Accepted answer
Comments
Just wondering if we have similar/such API's that returns data in JSON format instead of XML. I know I can parse this XML into JSON. Just wanted to avoid extra efforts.
Davyd - where can I get that OSLC API? I tried looking for it and got it but it was in rdf+xml format. Would u be able to provide me the link? would rather like to go with OSLC API if it indeed provides data in JSON format.
Google for OSLC, it is a standard.
I had to add my reply as a separate answer because I didn't have enough characters - see below
2 other answers
var xhrArgs = {
url : '/ccm/oslc/categories.json?oslc_cm.query=rtc_cm:projectArea="'
+ workItem.getValue(WorkItemAttributes.PROJECT_AREA)
+ '"%20and%20rtc_cm:archived=false',
headers : {
'Accept' : 'application/json'
},
handleAs : 'json'
};
data['oslc_cm:results'].forEach(function(item) {
var cat = {
name : item['dc:title'],
};
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 18 '19, 1:14 a.m.No details => No answers. QED
Amol Wangate
Jun 18 '19, 8:47 a.m.Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 19 '19, 1:16 a.m.The API you are trying to access is the reportable REST API and I am not an expert in that one, however, REST APIs usually return all available information about an artifact and it is up to you to parse the data to get the information you are interested in.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Jun 19 '19, 1:21 a.m.If this is indeed about the reportaable REST API, then here should be information about what you are interested in: https://jazz.net/wiki/bin/view/Main/ReportsRESTAPI#Field_selection_and_filtering you can get there from https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.reports.doc%2Ftopics%2Fr_ccm_rest_api.html