Update cable
PATCH
/api/cables/{id}
const url = 'http://localhost:3000/api/cables/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = { method: 'PATCH', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"label":"example","type":"cat5e","status":"connected","color":"example","length":1,"lengthUnit":"m","aPortId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","bPortId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","description":"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/cables/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "label": "example", "type": "cat5e", "status": "connected", "color": "example", "length": 1, "lengthUnit": "m", "aPortId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "bPortId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "description": "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
label
string
type
string
status
string
color
string
length
number
lengthUnit
string
aPortId
string format: uuid
bPortId
string format: uuid
description
string
Responses
Section titled “ Responses ”Cable updated
Media type application/json
object
data
object
id
required
string format: uuid
label
string
type
required
string
status
required
string
color
string
length
Numeric serialised as string
string
lengthUnit
string
aPortId
required
string format: uuid
bPortId
required
string format: uuid
description
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "data": { "type": "cat5e", "status": "connected", "lengthUnit": "m" }}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"}Cable not found
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}