Skip to main content
1-Visitor
January 6, 2021
Question

Create ChangeRequest through OData API

  • January 6, 2021
  • 2 replies
  • 1875 views

Hi,

I'd like to create a ChangeRequest Through Odata Rest API? 
PTC Change Management Domain operations support only Get operations in windchill 12 and 11?

2 replies

12-Amethyst
February 21, 2022

Same problem. Anyone know if Creating ChangeRequests will be added or is available?

16-Pearl
February 22, 2022

In WRS 2.2 there's no way to POST a CR but you can customise the existing endpoint, this would be very limited without further customisations in terms of the CR soft-type, process associations, affected objects and end items etc

In codebase\rest\ptc\domain\ChangeMgmt\entity edit the file ChangeRequests.json.
Add CREATE to operations like this "operations": "READ,UPDATE,CREATE" and the functionality will be exposed immediately.

Alternatively, you can use a 'Create-Objects' webject, which can be invoked using REST /InvokeIETask.

<ie:webject name="Create-Objects" type="ACT">
	<ie:param name="instance" data="<%=com.infoengine.au.NamingService.getVMName()%>" />
	<ie:param name="CONTAINER_REF" data="<%=containerRef%>"/>
	<ie:param name="FIELD" data="name='MC_initial_creation'"/>
	<ie:param name="GROUP_OUT" data="output"/>
	<ie:param name="TYPE" data="<%=CRSoftType%>"/>
</ie:webject>

 

HelesicPetr
22-Sapphire II
22-Sapphire II
February 22, 2022

Hello @VC_8072250 

 

I don't think so, I've found ChangeTask method to create an object. (WCH 12.0.2.0)

HelesicPetr_0-1645516710106.png

There is also method to create ChangeNotice with Tasks

/CreateChangeNoticeHierarchy (check the help)

 

I can not find the method to create ChangeRequest so I suppose it is not possible OOTB. Just create own method for rest api could be possible in my opinion.

 

PetrH

 

(edited)