Skip to main content
1-Visitor
June 27, 2018
Solved

How to create Service of an existing Thing using REST api ?

  • June 27, 2018
  • 1 reply
  • 1516 views

Hi guys,
I know how to create thing, thing shape, set properties of thing, thing template etc.

But my question is about creation or addition of a thing service using REST api.

Like we can add property to an existing thing by the following method, I want to add services to a thing dynamically.

1.POST:-

http://localhost:8080/Thingworx/Things/SauravIsNotAThing/Services/AddPropertyDefinition
2.Body:-
{
"name" : "SomeNumber",
"type" : "NUMBER"
}

3.Header:-

ContentType : application/json ; Header=> appKey:hkhkhkxxxxxxxx 

Best answer by PaiChung

This is not actually possible. You can create a Service Definition that is bound to a Service on an agent (remote service) but not an actual service.

 

Why do you need to be able to create services dynamically?

1 reply

PaiChung22-Sapphire IAnswer
22-Sapphire I
June 27, 2018

This is not actually possible. You can create a Service Definition that is bound to a Service on an agent (remote service) but not an actual service.

 

Why do you need to be able to create services dynamically?