Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
Version: Windchill 12.1
Organization> Type and Attribute Management > Manage Global enumeration
Use Case: Hi everyone Does anyone know the API URL of Manage global enumerations or any other way to access it in API I'm using Workato and need to GET/POST to that list on Windchill Thank you
Description:
Hi everyone
Does anyone know the API URL of Manage global enumerations or any other way to access it in API
I'm using Workato and need to GET/POST to that list on Windchill
Thank you
Hi @TN_13912649
You have two options.
Create own customization with extending existing RestAPI domain or create own java function that you can call by http request.
The easiest way is creating own class where you write code that do what you need.
Following example to run the function.
public class Test1 implements RemoteAccess
{
/**
* http to run the function
* http://myWCHTest.dom.com/Windchill/servlet/WindchillAuthGW/com.dom.HELTest1.Test1/ProjectsTest?IBA=123456&VALUE=0000
*
* @param req
* @param resp
* @throws WTException
*/
public static synchronized void ProjectsTest(HTTPRequest req, HTTPResponse resp) throws WTException, WTPropertyVetoException
{
// code that does what you need.
}
}
How to search for the Global enumeration is a different issue 😄
PetrH
Hello @TN_13912649,
It looks like you have a response from a community champion. If it helped you solve your question please mark the reply as the Accepted Solution.
Of course, if you have more to share on your issue, please let the Community know so other community members can continue to help you.
Thanks,
Vivek N.
Community Moderation Team.
you may also follow I*engine task https://www.ptc.com/en/support/article/CS310750
Hi @@TN_13912649 ,
@HelesicPetr is absolutely right ( as always 🙂 ) you need to create your own endpoint for this. I’ve been working on a similar project where users can log in to a page, and only those with the proper permissions can create or delete enumerations. I haven’t finished the project yet but you might want to check out @Daniel_Ada 's this post for more information about EnumUtils.
Be careful when creating an enumeration: make sure all required attributes are included. If any attribute is missing, you won’t be able to edit that enumeration manually later.
Anil.
