Add device port
POST
/api/devices/{id}/ports
const url = 'http://localhost:3000/api/devices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ports';const options = { method: 'POST', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"name":"example","portType":"1000base-t","status":"enabled","linkStatus":"up","description":"example","portGroupLabel":"example","portIndex":1,"connectorType":"example","speeds":["example"],"poeStandard":"example","poeWatts":1,"transceiver":"example","mgig":false,"breakoutCapable":false,"moduleSlot":"example","macAddress":"example","vlan":"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 http://localhost:3000/api/devices/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/ports \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "name": "example", "portType": "1000base-t", "status": "enabled", "linkStatus": "up", "description": "example", "portGroupLabel": "example", "portIndex": 1, "connectorType": "example", "speeds": [ "example" ], "poeStandard": "example", "poeWatts": 1, "transceiver": "example", "mgig": false, "breakoutCapable": false, "moduleSlot": "example", "macAddress": "example", "vlan": "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
required
string
portType
string
status
string
linkStatus
string
description
string
portGroupLabel
string
portIndex
integer
connectorType
string
speeds
Array<string>
poeStandard
string
poeWatts
integer
transceiver
string
mgig
boolean
breakoutCapable
boolean
moduleSlot
string
macAddress
string
vlan
string
Responses
Section titled “ Responses ”Port created
Media type application/json
object
data
object
id
required
string format: uuid
deviceId
required
string format: uuid
name
required
string
portType
required
string
status
required
string
linkStatus
required
string
peer
string
vlan
string
lldp
string
errs
integer
description
string
portGroupLabel
string
portIndex
integer
connectorType
string
speeds
Array<string>
poeStandard
string
poeWatts
integer
transceiver
string
mgig
boolean
breakoutCapable
boolean
moduleSlot
string
macAddress
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "data": { "portType": "1000base-t", "status": "enabled", "linkStatus": "up" }}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"}Device not found
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}