Skip to main content
7-Bedrock
June 11, 2024
Solved

How to resolve container ID from Change Task

  • June 11, 2024
  • 1 reply
  • 1332 views

Hi! 

I am trying to resolve a container id from an existing Change Task and it seems that the response body of https://support.ptc.com/help/windchill_rest_services/r2.4/en/#page/windchill_rest_services/wccg_restapiaccessexamplesgetchangetask.html
does not contain the location (container) where this change task was created.

Please help me find an API that can be used to resolve the container ID when the Change Task ID is known.

Best answer by MykolaZhabko

I figured out 🙂 
If you have Change Task Number like "4MEC00003009" use GET: ChangeMgmt/ChangeTasks?$filter=(Number eq '4MEC00003009')&$select=ChangeNoticeReference  from this response you can find "ResourceID" ( content: ....ChangeMgmt/ChangeNotices('OR:wt.change2.WTChangeOrder2:170400584')

which is pointing to "Change Notice" where Change Task is created. Next Get Change Notice by ID and from response body find 

"FolderLocation". Finaly Querying the Containers Using a Filter like: DataAdmin/Containers?$filter=(Name eq 'FolderLocationName') and from response body get ID of the container

1 reply

MykolaZhabko7-BedrockAuthorAnswer
7-Bedrock
June 12, 2024

I figured out 🙂 
If you have Change Task Number like "4MEC00003009" use GET: ChangeMgmt/ChangeTasks?$filter=(Number eq '4MEC00003009')&$select=ChangeNoticeReference  from this response you can find "ResourceID" ( content: ....ChangeMgmt/ChangeNotices('OR:wt.change2.WTChangeOrder2:170400584')

which is pointing to "Change Notice" where Change Task is created. Next Get Change Notice by ID and from response body find 

"FolderLocation". Finaly Querying the Containers Using a Filter like: DataAdmin/Containers?$filter=(Name eq 'FolderLocationName') and from response body get ID of the container