It's all about the answers!

Ask a question

Rest API for Updating WI Linktypes


Keerthivasan KP (11) | asked Jun 20 '23, 5:22 a.m.

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

One answer



permanent link
Ralph Schoon (63.3k33646) | answered Jun 20 '23, 6:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jun 20 '23, 8:06 a.m.

 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

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.