Skip to main content

NodeSwitch

Definition

NodeSwitch Type
nodeSwitch.json
{
"id": 0,
"ref": 0,
"key": 0,
"nodeID": 0,
"switchName": "",
"ratio": 0,
"value": 0,
"minPressure": 0,
"maxPressure": 0,
"switchDescription": "",
"status": 0,
"openedBy": 0,
"closedBy": 0,
"openedByName": "",
"closedByName": "",
"openedAt": "",
"closedAt": "",
"createdAt": "",
"updatedAt": "",
}

Get NodeSwitches

curl -X GET "https://${baseUrl}/node-switch/?\$filter=&\$orderBy=&\$page=1&\$pageSize=10" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Get NodeSwitch

curl -X GET "https://${baseUrl}/node-switch/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Apply NodeSwitch.ID

curl -X POST "https://${baseUrl}/apply/node-switch/id/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"

Create NodeSwitch

curl -X POST "https://${baseUrl}/node-switch/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @nodeSwitch.json
info
nodeSwitch.json
{
"ref": 0,
"key": 0,
"nodeID": 0,
"switchName": "",
"ratio": 0,
"value": 0,
"minPressure": 0,
"maxPressure": 0,
"switchDescription": "",
"status": 0,
"openedBy": 0,
"closedBy": 0,
"openedByName": "",
"closedByName": "",
"openedAt": "",
"closedAt": "",
}
tip

success status: 201

Update NodeSwitch

curl -X PUT "https://${baseUrl}/node-switch/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @nodeSwitch.json
info
nodeSwitch.json
{
"ref": 0,
"key": 0,
"nodeID": 0,
"switchName": "",
"ratio": 0,
"value": 0,
"minPressure": 0,
"maxPressure": 0,
"switchDescription": "",
"status": 0,
"openedBy": 0,
"closedBy": 0,
"openedByName": "",
"closedByName": "",
"openedAt": "",
"closedAt": "",
}

Update NodeSwitch Partial

curl -X PATCH "https://${baseUrl}/node-switch/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Attrs: ref,key,nodeID,switchName,ratio,value,minPressure,maxPressure,switchDescription,status,openedBy,closedBy,openedByName,closedByName,openedAt,closedAt" \
-d @nodeSwitch.json
info
nodeSwitch.json
{
"ref": 0,
"key": 0,
"nodeID": 0,
"switchName": "",
"ratio": 0,
"value": 0,
"minPressure": 0,
"maxPressure": 0,
"switchDescription": "",
"status": 0,
"openedBy": 0,
"closedBy": 0,
"openedByName": "",
"closedByName": "",
"openedAt": "",
"closedAt": "",
}

Update NodeSwitch Status

curl -X PATCH "https://${baseUrl}/node-switch/${id}/status/" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @nodeSwitch.json
info
nodeSwitch.json
{
"status": 0
}

Destroy NodeSwitch

curl -X DELETE "https://${baseUrl}/node-switch/${id}" \
-H "Authorization: Bearer ${accessToken}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"