Requested Action
|
Notes
|
Sample URL
|
HTTP Action
|
Content Type
|
---|---|---|---|---|
UPDATE
|
Updates require specifying the entity part (“thing_name” in the sample)
|
http://host/Thingworx/Things/thing_name/
|
PUT
|
application/json or text/xml
|
DELETE
|
Deletes require specifying the entity part as well
|
http://host/Thingworx/Things/thing_name
|
DELETE
|
n/a
|
INVOKING SERVICES
|
Calling a service requires specifying the complete URL, including the specific characteristic
|
http://host/Thingworx/Things/MyThing/Services/myService
If your service requires them, these inputs should be passed in the form fields of your POST.
|
POST
|
application/json
|
|
Use HTTPS in production or any time network integrity is in question.
|
Use
|
To
|
---|---|
GET
|
Retrieve a value.
|
PUT
|
Write a value or create new things or properties.
|
POST
|
Execute a service.
|
DELETE
|
Delete a Thing or property.
|
For Content Type
|
In Accept Header, Use
|
---|---|
JSON
|
application/json
|
XML
|
text/xml
|
HTML
|
text/html (or omit Accept header)
|
|
To view it, this information must be in JSON format.
|
|
Although you can pass in a username and password combination with your REST call, the recommended best practice is to use an application key. Generate the key in ThingWorx Composer and then pass it with your REST call. The user account associated with the application key should have privileges to read/write properties and run services on the related devices/machines in the ThingWorx Platform.
|