Creating resources - BlueCat Integrity - 9.6.0

Address Manager RESTful v2 API Guide

Locale
English
Product name
BlueCat Integrity
Version
9.6.0
Resources are created by sending a POST request to a collection endpoint. The body of the request will be a resource (JSON) containing at least the minimum required fields for creating the desired resource. The following example creates a Configuration resource named Warehouse belonging to the Configuration Group West Coast. name is the only required field when creating a Configuration resource but any field can be specified to initialize the resource. Fields not set by the client will be given default values by the API. If the POST request is successful, a representation of the newly created Configuration resource is returned. The complete state of the resource is returned.
Attention: For resources provided in request bodies, the Address Manager RESTful v2 API ignores unknown fields and will not throw an error if included. Only the expected fields detailed in the resource schemas are validated.

Request

POST http://{Address_Manager_IP}/api/v2/configurations
Authorization: Basic {basicAuthenticationCredentials}
Content-Type: application/hal+json

{
  "name": "Warehouse",
  "configurationGroup": "West Coast"
}

Response

HTTP/1.1 201 Created
Content-Type: application/hal+json

{
  "id": 100934,
  "type": "Configuration",
  "name": "Warehouse",
  "description": null,
  "configurationGroup": "West Coast",
  ...
  "_links": {
    "self": {
      "href": "/api/v2/configurations/100934"
    },
    "collection": {
      "href": "/api/v2/configurations"
    },
    "up": {
      "href": "/api/v2/1"
    },
    "accessControlLists": {
      "href": "/api/v2/configurations/100934/accessControlLists"
    },
    "blocks": {
      "href": "/api/v2/configurations/100934/blocks"
    },
    ...
  }
}