Open navClose nav

Hiera

Get all key/values pairs for all resources

Returns all key-value pairs from the configuration store for all resources.

Request URL

GET https://api.stackl.io/hiera/all

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

Parameters

Parameter Type Description
info boolean Optional parameter. Provides source object type information for key/value pairs

Request Example

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

Response Example

{
  "srv01.domain.local": {
    "name": "srv01.domain.local",
    "description": "srv01.domain.local",
    "type": "clientcert",
    "environment": "production",
    "zone": "vlan111",
    "location": "vmware",
    "role": "centos",
    "shape": "small",
    "dns_servers": [
      "x.x.x.x"
    ],
    "vmw_vcenter_portgroup": "pg_vlan111",
    "memory_mb": 2048,
    "last_stack_update": "2018-02-30 08h14m05s",
    "domain": "domain.local",
    "automationHandler": "ansible",
    "vmw_vcenter_datacenter": "DC01",
    "domain_ou_path": "OU=servers,DC=domain,DC=local",
    "vmw_vcenter_datastore": "vsanDatastore",
    "provisioning_platform": "esx",
    "vmw_vcenter_template": "tpl-cent-7.2",
    "aws_image": "ami-03xxx12301",
    "vmw_vcenter_password": "/secret/production/vcenter",
    "vmw_vcenter_fqdn": "vcenter.domain.local",
    "stackInstance": [
      "stack-instance-01"
    ],
    "aws_instance_type": "t2.small",
    "vmw_vcenter_vmfolder": "/production/servers",
    "shape_cpu_num": 2
  },
  "srv02.domain.local": {
    "name": "srv02.domain.local",
    "description": "srv02.domain.local",
    "type": "clientcert",
    "environment": "production",
    "zone": "vlan101",
    "location": "vmware",
    "role": "db-mssql",
    "shape": "large",
    "dns_servers": [
      "x.x.x.x"
    ],
    "vmw_vcenter_portgroup": "pg_vlan101",
    "memory_mb": 4096,
    "last_stack_update": "2018-03-30 08h14m05s",
    "domain": "domain.local",
    "automationHandler": "terraform",
    "vmw_vcenter_datacenter": "DC01",
    "domain_ou_path": "OU=servers,DC=domain,DC=local",
    "vmw_vcenter_datastore": "vsanDatastore",
    "provisioning_platform": "esx",
    "vmw_vcenter_template": "win-base-2016",
    "aws_image": "ami-03xxx12301",
    "vmw_vcenter_password": "/secret/production/vcenter",
    "vmw_vcenter_fqdn": "vcenter.domain.local",
    "stackInstance": [
      "stack-instance-03"
    ],
    "aws_instance_type": "t2.small",
    "vmw_vcenter_vmfolder": "/production/servers",
    "shape_cpu_num": 4
  }
}

Get all key/values pairs for a specific resource

Returns all key-value pairs from the configuration store for a specific resources.

Request URL

GET https://api.stackl.io/hiera/{clientcert}/

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

Parameters

Parameter Type Description
info boolean Optional paramter, provides source object type information for key/value pairs
clientcert string Name of the resource object

Request Example

curl -X GET "https://api.stackl.io/hiera/srv01.domain.local" -H "accept: application/json"

Response Example

{
  "name": "srv01.domain.local",
  "description": "srv01.domain.local",
  "type": "clientcert",
  "environment": "production",
  "zone": "vlan111",
  "location": "vmware",
  "role": "centos",
  "shape": "small",
  "dns_servers": [
    "x.x.x.x"
  ],
  "vmw_vcenter_portgroup": "pg_vlan111",
  "memory_mb": 2048,
  "last_stack_update": "2018-02-30 08h14m05s",
  "domain": "domain.local",
  "automationHandler": "ansible",
  "vmw_vcenter_datacenter": "DC01",
  "domain_ou_path": "OU=servers,DC=domain,DC=local",
  "vmw_vcenter_datastore": "vsanDatastore",
  "provisioning_platform": "esx",
  "vmw_vcenter_template": "tpl-cent-7.2",
  "aws_image": "ami-03xxx12301",
  "vmw_vcenter_password": "/secret/production/vcenter",
  "vmw_vcenter_fqdn": "vcenter.domain.local",
  "stackInstance": [
    "stack-instance-01"
  ],
  "aws_instance_type": "t2.small",
  "vmw_vcenter_vmfolder": "/production/servers",
  "shape_cpu_num": 2
}

Get a specific key/values pair for a specific resource

Returns a specific key-value pair from the configuration store for a specific resources.

Request URL

GET https://api.stackl.io/hiera/{clientcert}/{key}/

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

Parameters

Parameter Type Description
clientcert string Name of the resource object
key string Name of the key to retrieve. important: key names are case sensitive

Request Example

curl -X GET "https://api.stackl.io/hiera/srv01.domain.local/automationHandler" -H "accept: application/json"

Response Example

"terraform"

Last updated on August 23, 2018