POST/api/networks/{networkId}/resources

Create a network resource

Creates a network resource within the specified network. Provide its name, address, enabled status, and groups; the address can be a host, subnet, or domain. You can include an optional description.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 5 body fields
networkIdstringrequired
The unique identifier of the network in which to create the resource.

Network resource details. When you send a body, name, address, enabled, and groups are required.

addressstringrequired
Network resource address (either a direct host like 1.1.1.1 or 1.1.1.1/32, or a subnet like 192.168.178.0/24, or domains like example.com and *.example.com)
descriptionstringoptional
Network resource description
enabledbooleanrequired
Network resource status
namestringrequired
Network resource name
groupsarray<string>required
Group IDs containing the resource

5 status codes
200Returns the created network resource, including its identifier, type, groups, address, name, enabled status, and description.
groupsarray<object>required
Groups that the resource belongs to
idstringrequired
Network Resource ID
typestringrequired
Network resource type based of the address
Allowed:hostsubnetdomain
addressstringrequired
Network resource address (either a direct host like 1.1.1.1 or 1.1.1.1/32, or a subnet like 192.168.178.0/24, or domains like example.com and *.example.com)
descriptionstringoptional
Network resource description
enabledbooleanrequired
Network resource status
namestringrequired
Network resource name
400Returned when the request is invalid.
401Returned when the request lacks valid authentication.
403Returned when the authenticated user is not permitted to create the network resource.
500Returned when an internal server error occurs.

Error handling

A 400 indicates an invalid request; a 401 indicates missing or invalid authentication; a 403 indicates insufficient permission; and a 500 indicates an internal server error. The networkId path parameter must identify the network. When you send a body, name, address, enabled, and groups are required.