Add device type module
POST
/api/device-types/{id}/modules
const url = 'http://localhost:3000/api/device-types/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/modules';const options = { method: 'POST', headers: {cookie: 'session=<session>', 'Content-Type': 'application/json'}, body: '{"sku":"example","name":"example","description":"example","slotLabel":"example","connectorType":"example","speeds":["example"],"portCount":1,"poeStandard":"example","poeWatts":1,"notes":"example","sortOrder":0}'};
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/device-types/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/modules \ --header 'Content-Type: application/json' \ --cookie session=<session> \ --data '{ "sku": "example", "name": "example", "description": "example", "slotLabel": "example", "connectorType": "example", "speeds": [ "example" ], "portCount": 1, "poeStandard": "example", "poeWatts": 1, "notes": "example", "sortOrder": 0 }'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
sku
required
string
name
required
string
description
string
slotLabel
string
connectorType
string
speeds
Array<string>
portCount
integer
poeStandard
string
poeWatts
integer
notes
string
sortOrder
integer
Responses
Section titled “ Responses ”Module created
Media type application/json
object
data
object
id
required
string format: uuid
deviceTypeId
required
string format: uuid
sku
required
string
name
required
string
description
string
slotLabel
string
connectorType
string
speeds
Array<string>
portCount
integer
poeStandard
string
poeWatts
integer
notes
string
sortOrder
integer
source
string
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{ "data": { "source": "vendor" }}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 type not found
Media type application/json
object
error
required
string
Example
{ "error": "Not found"}