Inventory API (v0.3)

http://localhost

Table of contents

Batch API

API for interacting with an inventory of physical resources

Instances batch API

POST /inventory/instances/batch

Create collection of instances in one request

POST /inventory/instances/batch
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "A collection of instance records",
  "type": "object",
  "properties": {
    "instances": {
      "description": "List of instance records",
      "id": "instances",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "instance.json"
      }
    },
    "totalRecords": {
      "type": "integer"
    }
  },
  "required": [
    "instances",
    "totalRecords"
  ]
}

Response 201

Instances are created

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Response schema for instances batch request",
  "type": "object",
  "properties": {
    "instances": {
      "id": "instancesList",
      "description": "List of Instances",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "instance.json"
      }
    },
    "errorMessages": {
      "id": "errorMessagesList",
      "description": "List of error messages",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "totalRecords": {
      "description": "Total number of successfully saved instances",
      "type": "integer"
    }
  },
  "required": [
    "instances",
    "errorMessages",
    "totalRecords"
  ]
}

Response 500

Internal server error

Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "description": "Response schema for instances batch request",
  "type": "object",
  "properties": {
    "instances": {
      "id": "instancesList",
      "description": "List of Instances",
      "type": "array",
      "items": {
        "type": "object",
        "$ref": "instance.json"
      }
    },
    "errorMessages": {
      "id": "errorMessagesList",
      "description": "List of error messages",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "totalRecords": {
      "description": "Total number of successfully saved instances",
      "type": "integer"
    }
  },
  "required": [
    "instances",
    "errorMessages",
    "totalRecords"
  ]
}