CreateController
POST
/api/sites/{siteId}/controllers
const url = 'https://demo.consystence.com/api/sites/example/controllers';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","platform":0,"firmwareVersion":"example","connection":{"protocol":"example","ipAddress":"example","port":1,"cipPath":"example","pollIntervalMs":1,"timeoutMs":1,"retryDelayMs":1,"maxRetries":1},"assetNumber":"example"}'};
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://demo.consystence.com/api/sites/example/controllers \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "platform": 0, "firmwareVersion": "example", "connection": { "protocol": "example", "ipAddress": "example", "port": 1, "cipPath": "example", "pollIntervalMs": 1, "timeoutMs": 1, "retryDelayMs": 1, "maxRetries": 1 }, "assetNumber": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”siteId
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
platform
required
integer format: int32
firmwareVersion
string
connection
required
object
protocol
required
string
ipAddress
required
string
port
integer format: int32
cipPath
string
pollIntervalMs
integer format: int32
timeoutMs
integer format: int32
retryDelayMs
integer format: int32
maxRetries
integer format: int32
assetNumber
required
string
Responses
Section titled “Responses”OK