Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X
In the thingworx plantform we add service and open developer tool we can see we have send a http request as below,in the body there are a lot of parameters,
is there any document show how to add those parameter?
Solved! Go to Solution.
Hi @YC_10946483
You can use the below endpoint to add a service definition
https://<<HOSTNAME>>/Thingworx/Things/<<THINGNAME>>/Services/AddServiceDefinition
Method: POST
Body :
{
name : "servicename",
description : "Service description",
category : "",
parameters : INFOTABLE,
resultType : INFOTABLE,
remote : false,
remoteServiceName : "",
timeout : 1000
}
This will only create a service definition without any logic inside
To create logic refer this article - Solved: Create service programmatically - PTC Community
/VR
Hi @YC_10946483
You can use the below endpoint to add a service definition
https://<<HOSTNAME>>/Thingworx/Things/<<THINGNAME>>/Services/AddServiceDefinition
Method: POST
Body :
{
name : "servicename",
description : "Service description",
category : "",
parameters : INFOTABLE,
resultType : INFOTABLE,
remote : false,
remoteServiceName : "",
timeout : 1000
}
This will only create a service definition without any logic inside
To create logic refer this article - Solved: Create service programmatically - PTC Community
/VR
Thanks a lot!