/api/v1/things/{id}/save-as-template
POST
/api/v1/things/{id}/save-as-template
const url = 'https://example.com/api/v1/things/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/save-as-template';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"name":"example","locationIds":["2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/things/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/save-as-template \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "locationIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
locationIds
required
Array<string>
Examplegenerated
{ "name": "example", "locationIds": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]}Responses
Section titled “Responses”Default Response
Media typeapplication/json
object
Examplegenerated
{ "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example", "typeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "typeIcon": "example", "payload": { "additionalProperty": "example" }, "locations": [ { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "name": "example" } ], "rowVersion": 1}