Open navClose nav

Tree

Get the hierarchical tree

Returns the current hierarchy tree.

Request URL

GET https://api.stackl.io/tree/

A valid client certificate is required to able to access the REST API. See section Authentication

Parameters

None

Request Example

curl -X GET "https://api.stackl.io/tree" -H "accept: application/json"

Response Example

{
  "name": "common",
  "description": "Common configuration data",
  "type": "common",
  "children": [
    {
      "name": "production",
      "description": "Production Environment",
      "type": "environment",
      "children": [
        {
          "description": "AWS EU WEST 01",
          "type": "location",
          "children": [
            {
              "type": "zone",
              "name": "subnet-xxx1234",
              "description": "Inner VPC subnet"
            }
          ],
          "name": "aws-eu-west-1"
        }
      ]
    },
    {
      "name": "development",
      "description": "Development Environment",
      "type": "environment",
      "children": [
        {
          "name": "vmw-clu-x",
          "description": "VMware vSphere Cluster x",
          "type": "location",
          "children": [
            {
              "type": "zone",
              "name": "vlan101",
              "description": "VLAN 101"
            }
          ]
        }
      ]
    }
  ]
}

Create or Update the hierarchical tree

Creates or updates the hierarchy tree

Request URL

POST https://api.stackl.io/tree/

A valid client certificate is required to able to access the REST API. See section Authentication

Parameters

Parameter Type Description
payload json string Request Body

Request Example

curl -X POST "https://api.stackl.io/tree" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"description\": \"Common configuration data\", .....}"

Response Example

{
  "message": "Created",
  "return_code": 201
}

api


Last updated on August 23, 2018