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

Rest API for Updating WI Linktypes

We are working to link the GitHub Commit & Pull Request Link Types to ALM Work Item through Rest API Call. We are getting the error saying "No Project Area Set".

Rest API:
Server URL +"/service/com.ibm.team.workitem.common.internal.rest.IWorkItemRestService/workItem2

Inputs As Per Request Tab in the Browser Console
{
"itemId": "_Ql44IfU7Ee2lmP5eKuZ9Tw",
"type": "task",
"stateId": "_Jb358vVmEe2lmP5eKuZ9Tw",
"updateLinks": "{\"cmd\":\"addLink\",\"type\":\"com.ibm.team.workitem.linktype.trackedworkitem\",\"end\":\"target\",\"name\":\"Contributes To\",\"comment\":\"298015: Story WI ifix022\",\"uri\":\"https://rb-alm-05-q.de.bosch.com/ccm/resource/itemName/com.ibm.team.workitem.WorkItem/298015\"}",
"additionalSaveParameters": [
"com.ibm.team.workitem.common.internal.updateExtendedRichText2",
"com.ibm.team.workitem.common.internal.updateBacklinks"
],
"sanitizeHTML": "true",
"projectAreaItemId": "_6BpyIAJhEeeOTILaMRLo0Q",
"projectAreaConfigurationStateId": "_ZQXEov6hEe2lEZlwEQROeA",

}

Error from Plain Java :
com.ibm.team.repository.common.transport.TeamServiceException: CRJAZ2942E A request from this server to another server could not be completed. The other server returned a 400 HTTP error with this error text: Bad Request.
Caused by: java.lang.IllegalArgumentException: No project area set

0 votes



One answer

Permanent link

 The API you are trying to use is an internal API (as can be seen in the internal in the URL). You are not supposed to use it. The error message suggests that the information about a project area is missing.


I fail to understand, from what you provide, how the Plain Java Client Libraries are involved. Maybe just as HTTP client. How to link elements using the Plain Java Client Libraries is explained here: https://rsjazz.wordpress.com/?s=link+api&submit=Search

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,937
× 1,700

Question asked: Jun 20 '23, 5:22 a.m.

Question was seen: 969 times

Last updated: Jun 20 '23, 8:06 a.m.

Confirmation Cancel Confirm