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

The following usage, Do you have things like breaking the DB? - > Use the "REST-API", Add theWorkItem Links for Git Changeset(Remote)

We are trying to create a WorkItem Link that could not be created in the "PUSH" command of Git using the REST API.
This method is different usage and RTC-Git function.
Can you tell me there is no problem for conservation of DB or application?


User version RTC5.0.2
REST API from cURL
OS:Windows7
Sample Script for Windows batfile
set USER=%id%
set PASSWORD=%ps%

set VERBOSE=-v
ECHO %HOST%
ECHO %USER%


REM cookieファイル
set COOKIES=cache\cookies.txt
del %COOKIES%

REM アクセス先
set URL=%HOST%/resource/itemName/com.ibm.team.workitem.WorkItem/

REM 出力ファイル名の接頭
set OUTPUT="workitem\wi_%wiid%.xml"

REM 接続用cookie
curl -k -c %COOKIES% -o cache\tmp.json "%HOST%/authenticated/identity"

REM ログイン用
SET CMD="curl -k -L -b %COOKIES% -c %COOKIES% -o cache\tmp.json -d j_username=%USER% -d j_password=%PASSWORD% %HOST%/authenticated/j_security_check -w %%{http_code}\n"

Sample XMLFile

<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:dcterms="http://purl.org/dc/terms/"
    xmlns:oslc_cm="http://open-services.net/ns/cm#" >
  <rdf:Description rdf:nodeID="A0">
    <rdf:subject rdf:resource="{HOST}/ccm/oslc/workitems/135041?oslc.properties=oslc_cm:tracksChangeSet,rtc_cm:com.ibm.team.workitem.linktype.relatedartifact.relatedArtifact:oslc.prefix=oslc_cm=&lt;http://open-services.net/ns/cm"/>
    <rdf:predicate rdf:resource="http://open-services.net/ns/cm#tracksChangeSet"/>
    <rdf:object rdf:resource="{HOST}/ccm/com.ibm.team.git.internal.resources.IGitResourceRestService/commit?value=H4sIAAAAAAAAAEXLQUvEMBCasdtfyhgCrUjLJdLvpSUEE9VBh91iQZGaC3bDNsq0oiP9dy1L8ji_P971Rf9OkW6Ufhy9h9SBJaO7Hz3LJT7OcFDS4rZ2-vUpeZK8PH6I6mhU4BdhC3RqvrIFa3RhvTK9XLld-LFPIpXofLiXk4S7n6niuzmEMUxkHqqic_i95uZCHHdcuJC8WhTmm1DCTAWqwAZQVjws-7F_fnrv9_Uu35mnJbNAbxhiZa6FtRCshMuwQUiSHzgzxnAAAgsrfsa1fBNYdvgsSAA."/>
    <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Statement"/>
    <dcterms:title>Fixed Defect
workItem 174653  /apps/gui/a_a</dcterms:title>
  </rdf:Description>
<rdf:Description rdf:about="{HOST}/ccm/oslc/workitems/135041?oslc.properties=oslc_cm:tracksChangeSet,rtc_cm:com.ibm.team.workitem.linktype.relatedartifact.relatedArtifact:oslc.prefix=oslc_cm=&lt;http://open-services.net/ns/cm">
    <oslc_cm:tracksChangeSet rdf:resource="{HOST}/ccm/com.ibm.team.git.internal.resources.IGitResourceRestService/commit?value=H4sIAAAAAAAAAEXLQUvEMBCasdtfyhgCrUjLJdLvpSUEE9VBh91iQZGaC3bDNsq0oiP9dy1L8ji_P971Rf9OkW6Ufhy9h9SBJaO7Hz3LJT7OcFDS4rZ2-vUpeZK8PH6I6mhU4BdhC3RqvrIFa3RhvTK9XLld-LFPIpXofLiXk4S7n6niuzmEMUxkHqqic_i95uZCHHdcuJC8WhTmm1DCTAWqwAZQVjws-7F_fnrv9_Uu35mnJbNAbxhiZa6FtRCshMuwQUiSHzgzxnAAAgsrfsa1fBNYdvgsSAA."/>
  </rdf:Description>
</rdf:RDF>
Thanks! Please



















0 votes


Accepted answer

Permanent link
Hi Josako-san, 

I am sorry I overlooked your question. I guess you might notice that there is an enhancement to realize your requirement. Please vote to this if you need. Thanks.

https://jazz.net/jazz/web/projects/Rational%20Team%20Concert#action=com.ibm.team.workitem.viewWorkItem&id=349986
HIROAKI JOSAKO selected this answer as the correct answer

0 votes

Comments

Thank you
Ohsawa-san

I was add Comment to this Workitem

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

Question asked: Nov 01 '15, 11:56 p.m.

Question was seen: 3,972 times

Last updated: Mar 29 '16, 9:10 p.m.

Confirmation Cancel Confirm