Update power feed
PATCH
/api/power-feeds/{id}
const url = 'http://localhost:3000/api/power-feeds/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"name":"example","powerPanelId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","rackId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","type":"primary","supply":"AC","phase":"single","voltage":1,"amperage":1,"maxUtilization":80,"status":"active","comments":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url http://localhost:3000/api/power-feeds/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "name": "example", "powerPanelId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "rackId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "type": "primary", "supply": "AC", "phase": "single", "voltage": 1, "amperage": 1, "maxUtilization": 80, "status": "active", "comments": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
string
powerPanelId
string format: uuid
rackId
string format: uuid
type
string
supply
string
phase
string
voltage
integer
amperage
integer
maxUtilization
integer
status
string
comments
string
Responses
Section titled “ Responses ”PowerFeed updated
Media type application/json
object
data
object
id
required
string format: uuid
name
required
string
powerPanelId
required
string format: uuid
rackId
string format: uuid
type
string
supply
string
phase
string
voltage
required
integer
amperage
required
integer
maxUtilization
Percent, default 80
integer
status
required
string
comments
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "data": { "type": "primary", "supply": "AC", "phase": "single", "status": "active" }}Validation error
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}Not authenticated
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}PowerFeed not found
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}