Create an IP Network

post

/ipNetwork

Creates an IP network with the given details. The natural subnet for the network is also created.

The following fields are mandatory fields for successful creation:

  • @type
  • name
  • ipAddress
  • ipAddressVersion
  • ipAddressDomain
  • prefixLength

The created IP network will be shown in the response along with the location URL, except when "fields=none" is provided in the request.

Request

Query Parameters
Supported Media Types
Request Body - application/json ()
The IP Network to create.
Root Schema : schema
An IP network or IP subnet.
Match All
Show Source
Nested Schema : LogicalResource
Type: object
The base class for logical resources.
Match All
Show Source
Nested Schema : Discriminator: @type
Type: object
A base resource Class.
Show Source
Nested Schema : LogicalResource-allOf[1]
Type: object
Nested Schema : type
Type: object
Show Source
Nested Schema : NetworkAddressDomain
A network address domain.
Match All
Show Source
Nested Schema : RelatedPartyRef
Type: object
A related party, which defines a party or party role linked to a specific entity.
Show Source
Nested Schema : NetworkAddressDomain-allOf[1]
Type: object
Show Source
Back to Top

Response

Supported Media Types

201 Response

The IP Network was created successfully.
Body ()
Root Schema : schema
An IP network or IP subnet.
Match All
Show Source
Nested Schema : LogicalResource
Type: object
The base class for logical resources.
Match All
Show Source
Nested Schema : Discriminator: @type
Type: object
A base resource Class.
Show Source
Nested Schema : LogicalResource-allOf[1]
Type: object
Nested Schema : type
Type: object
Show Source
Nested Schema : NetworkAddressDomain
A network address domain.
Match All
Show Source
Nested Schema : RelatedPartyRef
Type: object
A related party, which defines a party or party role linked to a specific entity.
Show Source
Nested Schema : NetworkAddressDomain-allOf[1]
Type: object
Show Source

400 Response

The request isn't valid.
Body ()
Root Schema : Error
Type: object
Used when an API throws an error. This is typically used with HTTP error response codes (3xx, 4xx, 5xx).
Show Source
  • The error code.
  • Allowed Values: [ "CustomObject", "CustomNetworkAddress", "DeviceInterface", "Equipment", "EquipmentHolder", "FlowIdentifier", "GeographicLocation", "GeographicSite", "GeographicAddress", "PropertyLocation", "LogicalDevice", "LogicalDeviceAccount", "MediaStream", "Network", "PhysicalConnector", "PhysicalDevice", "PhysicalPort", "Pipe", "Service", "TelephoneNumber", "IPV4Address", "IPV6Address", "IPSubnet", "NetworkAddressDomain", "Connectivity", "Party" ]
    The list of valid values for an entity class.
  • message
    The text that provides more details about the error as well as corrective actions.
  • The short, user-friendly summary of the problem, which does not change for subsequent occurrences of the problem.
  • The URL pointing to the documentation that describes the error.
  • The HTTP error code extension, such as 400-2.
Nested Schema : message
Type: array
The text that provides more details about the error as well as corrective actions.
Show Source

401 Response

You aren't authorized to make this request.
Body ()
Root Schema : Error
Type: object
Used when an API throws an error. This is typically used with HTTP error response codes (3xx, 4xx, 5xx).
Show Source
  • The error code.
  • Allowed Values: [ "CustomObject", "CustomNetworkAddress", "DeviceInterface", "Equipment", "EquipmentHolder", "FlowIdentifier", "GeographicLocation", "GeographicSite", "GeographicAddress", "PropertyLocation", "LogicalDevice", "LogicalDeviceAccount", "MediaStream", "Network", "PhysicalConnector", "PhysicalDevice", "PhysicalPort", "Pipe", "Service", "TelephoneNumber", "IPV4Address", "IPV6Address", "IPSubnet", "NetworkAddressDomain", "Connectivity", "Party" ]
    The list of valid values for an entity class.
  • message
    The text that provides more details about the error as well as corrective actions.
  • The short, user-friendly summary of the problem, which does not change for subsequent occurrences of the problem.
  • The URL pointing to the documentation that describes the error.
  • The HTTP error code extension, such as 400-2.
Nested Schema : message
Type: array
The text that provides more details about the error as well as corrective actions.
Show Source

403 Response

The request is forbidden.
Body ()
Root Schema : Error
Type: object
Used when an API throws an error. This is typically used with HTTP error response codes (3xx, 4xx, 5xx).
Show Source
  • The error code.
  • Allowed Values: [ "CustomObject", "CustomNetworkAddress", "DeviceInterface", "Equipment", "EquipmentHolder", "FlowIdentifier", "GeographicLocation", "GeographicSite", "GeographicAddress", "PropertyLocation", "LogicalDevice", "LogicalDeviceAccount", "MediaStream", "Network", "PhysicalConnector", "PhysicalDevice", "PhysicalPort", "Pipe", "Service", "TelephoneNumber", "IPV4Address", "IPV6Address", "IPSubnet", "NetworkAddressDomain", "Connectivity", "Party" ]
    The list of valid values for an entity class.
  • message
    The text that provides more details about the error as well as corrective actions.
  • The short, user-friendly summary of the problem, which does not change for subsequent occurrences of the problem.
  • The URL pointing to the documentation that describes the error.
  • The HTTP error code extension, such as 400-2.
Nested Schema : message
Type: array
The text that provides more details about the error as well as corrective actions.
Show Source

500 Response

An internal server error occurred.
Body ()
Root Schema : Error
Type: object
Used when an API throws an error. This is typically used with HTTP error response codes (3xx, 4xx, 5xx).
Show Source
  • The error code.
  • Allowed Values: [ "CustomObject", "CustomNetworkAddress", "DeviceInterface", "Equipment", "EquipmentHolder", "FlowIdentifier", "GeographicLocation", "GeographicSite", "GeographicAddress", "PropertyLocation", "LogicalDevice", "LogicalDeviceAccount", "MediaStream", "Network", "PhysicalConnector", "PhysicalDevice", "PhysicalPort", "Pipe", "Service", "TelephoneNumber", "IPV4Address", "IPV6Address", "IPSubnet", "NetworkAddressDomain", "Connectivity", "Party" ]
    The list of valid values for an entity class.
  • message
    The text that provides more details about the error as well as corrective actions.
  • The short, user-friendly summary of the problem, which does not change for subsequent occurrences of the problem.
  • The URL pointing to the documentation that describes the error.
  • The HTTP error code extension, such as 400-2.
Nested Schema : message
Type: array
The text that provides more details about the error as well as corrective actions.
Show Source
Back to Top

Examples

This example shows how to create an IPv4 or IPv6 network with the given specification by submitting a POST request on the REST resource using cURL. For more information about cURL, see "Install and Use cURL".

cURL Command

curl -X POST "http://hostname:port/InventoryRSOpenAPI/resourceInventoryManagement/version/ipNetwork -H 'content-type: application/json' -H credentials -d @ipNetworkcreate.json

where:

  • hostname is the URL for the UIM REST server.
  • port is the port for the UIM REST server.
  • version is the version of the API you're using.
  • credentials is the base64 encoding of the user ID and password joined by a single colon (ID:password). See "Authentication and Authorization".
  • ipNetworkcreate.json is the JSON file that specifies the IPv4 or IPv6 network to create.

Example of Request Body

This shows an example of the contents of the ipNetworkcreate.json file sent as the request body.

{
   "@type": "IPNetwork",
   "@baseType": "LogicalResource",
   "name": "WebHosting",
   "ipAddress": "1.19.93.0",
   "prefixLength": 28,
   "isIPNetwork": true,
   "ipAddressDomain": {
      "id": "25-Public",
      "href": "http://hostname:port/InventoryRSOpenAPI/resourceInventoryManagement/version/resource/25-Public",
      "@type": "NetworkAddressDomain"
   },
   "ipAddressVersion": "IPV4"
}

Example of Response Body

This example shows the contents of the response body in JSON format. The ID is auto-generated as a composite value of the business object identifier, IP address, prefix length, and IP address domain separated by a hyphen (-), and it's included in the response.

{
   "id": "23-1.19.93.0-28 - Public",
   "href": "http://hostname:port/InventoryRSOpenAPI/resourceInventoryManagement/version/resource/23-1.19.93.0-28 - Public",
   "@type": "IPNetwork",
   "@baseType": "LogicalResource",
   "name": "DIA_School",
   "version": "1",
   "lifecycleState": "INSTALLED",
   "lifecycleSubState": "UNASSIGNED",
   "startDate": "2019-12-31T11:48:56.446Z",
   "endDate": "2038-01-19T08:44:07.000Z",
   "resourceSpecification": {
      "id": "IPv4Network",
      "href": "http://hostname:port/InventoryRSOpenAPI/specification/IPv4Network",
      "name": "IPv4Network",
      "version": "1",
      "entityType": "IPSubnet",
      "startDate": "2019-11-18T00:00:01.000Z",
      "endDate": "2038-01-19T08:44:07.000Z"
   },
   "ipAddress": "1.19.93.0",
   "prefixLength": 28,
   "isIPNetwork": true,
   "availableHostCount": 14,
   "allowHostAtSubnetBoundaries": false,
   "ipAddressDomain": {
      "id": "25- Public",
      "href": "http://hostname:port/InventoryRSOpenAPI/resourceInventoryManagement/version/resource/25 - Public",
      "@type": "NetworkAddressDomain"
   },
   "ipAddressVersion": "IPV4",
   "prefix": "255.255.255.240"
}
Back to Top