AS3 Template

Overview

A Network Engineer can use this API to store Application Services 3 Extension (AS3) templates on BIG-IQ. AS3 is a flexible, low-overhead mechanism for managing application-specific configurations on a BIG-IP system. An Enterprise DevOps Engineer can send a declaration to Application Services 3 Extension (AS3) on BIG-IQ to apply the template to the system when creating an application. The Network Engineer can set custom default values and restrict the fields in the template which will be editable by the Enterprise DevOps Engineer. The system rejects the application of the AS3 template if the Enterprise DevOps Engineer provides fields other than those defined to be editable by the Network Engineer. For information about AS3 please see the Application Services 3 Extension Documentation .

REST Endpoint: /mgmt/cm/global/appsvcs-templates

Requests

POST /mgmt/cm/global/appsvcs-templates

This creates an AS3 template on BIG-IQ.

Request Parameters

Name Type Description
name string The name of the AS3 template. This is the only field required by BIG-IQ.
schemaOverlay various The various subfields of schemaOverlay change depending upon the application. The AS3 application declarations are validated using the contents of this field and the contents must be a valid JSON Schema draft 7 .

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
name string The name of the AS3 template. This is the only field required by BIG-IQ.
schemaOverlay various The various subfields of schemaOverlay change depending upon the application. The AS3 application declarations are validated using the contents of this field and the contents must be a valid JSON Schema draft 7.

Permissions

Role Allow
Application_Creator Yes
Application_Manager Yes

GET /mgmt/cm/global/appsvcs-templates

This lists the collection of AS3 templates on BIG-IQ.

Request Parameters

None

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
name string The name of the AS3 template. This is the only field required by BIG-IQ.
schemaOverlay various The various subfields of schemaOverlay change depending upon the application. The AS3 application declarations are validated using the contents of this field and the contents must be a valid JSON Schema draft 7.

Permissions

Role Allow
Application_Creator Yes
Application_Manager Yes

GET /mgmt/cm/global/appsvcs-templates/<id>

This lists a specific AS3 template on BIG-IQ.

Request Parameters

None

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
name string The name of the AS3 template. This is the only field required by BIG-IQ.
schemaOverlay various The various subfields of schemaOverlay change depending upon the application. The AS3 application declarations are validated using the contents of this field and the contents must be a valid JSON Schema draft 7.

Permissions

Role Allow
Application_Creator Yes
Application_Manager Yes

DELETE /mgmt/cm/global/appsvcs-templates/<id>

This deletes a specific AS3 template on BIG-IQ.

Request Parameters

None

Query Parameters

None

Response

HTTP/1.1 200 OK

Name Type Description
name string The name of the AS3 template. This is the only field required by BIG-IQ.
schemaOverlay various The various subfields of schemaOverlay change depending upon the application. The AS3 application declarations are validated using the contents of this field and the contents must be a valid JSON Schema draft 7.

Permissions

Role Allow
Application_Creator No
Application_Manager Yes

Examples

Example 1: Simple HTTP application template

This example creates a simple http template and makes use of the following template features.

Feature Meaning
additionalProperties Applications created using this example template will not provide classes or properties other than those defined in this template because the value of additionalProperties has been set to false.
serviceMain.class Any declaration which uses this example template will always use “Service_HTTP” as the serviceMain.class because the values of const and default have both been set to “Service_HTTP”.
serviceMain.pool This specifies the serviceMain.pool.
     const The field const is absent in the example template, which means the serviceMain.pool can be changed.
     default In this example, the default web_pool will be used for the serviceMain.pool because const has not been specified.
virtualAddresses The example allows any value to be specified at declaration time, because this field in the example template has a blank schema. Note that this does not mean any value provided in a declaration will succeed during deployment, only that the template will not prevent it.
virtualPort The example allows any value to be specified at declaration time, because this field in the example template has a blank schema. Note that this does not mean any value provided in a declaration will succeed during deployment, only that the template will not prevent it.
members The example allows any value to be specified at declaration time, because this field in the example template has a blank schema. Note that this does not mean any value provided in a declaration will succeed during deployment, only that the template will not prevent it.
POST http://<bigiq-address>/mgmt/cm/global/appsvcs-templates
{
    "name": "http-template",
    "schemaOverlay": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
            "template": {
                "const": "http",
                "default": "http"
            },
            "class": {},
            "schemaOverlay": {},
            "serviceMain": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "class": {
                        "const": "Service_HTTP",
                        "default": "Service_HTTP"
                    },
                    "virtualPort": {},
                    "virtualAddresses": {},
                    "pool": {
                        "default": "web_pool"
                    }
                }
            },
            "web_pool": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "class": {
                        "const": "Pool",
                        "default": "Pool"
                    },
                    "members": {}
                }
            }
        }
    }
}

Example 2: HTTPS application template

This example creates an HTTPS template.

POST http://<bigiq-address>/mgmt/cm/global/appsvcs-templates
{
    "name": "https-template",
    "schemaOverlay": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
            "template": {
                "const": "https",
                "default": "https"
            },
            "class": {},
            "schemaOverlay": {},
            "serviceMain": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "class": {
                        "const": "Service_HTTPS",
                        "default": "Service_HTTPS"
                    },
                    "virtualPort": {},
                    "virtualAddresses": {},
                    "serverTLS": {
                        "default": "webtls",
                        "const": "webtls"
                    }
                    "pool": {
                        "default": "web_pool"
                    }
                }
            },
            "web_pool": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "class": {
                        "const": "Pool",
                        "default": "Pool"
                    },
                    "loadBalancingMode": {
                        "default": "predictive-node"
                    },
                    "monitors": {
                        "default": ["http"],
                    },
                    "members": {}
                }
            },
            "webtls": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "class": {
                        "const": "TLS_Server",
                        "default": "TLS_Server"
                    },
                    "certificates": {
                        "type": "array",
                        "default": [{
                            "certificate": "webcert"
                        }]
                    }
                }
            },
            "webcert": {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                    "class": {
                        "const": "Certificate",
                        "default": "Certificate"
                    },
                    "certificate": {},
                    "privateKey": {},
                    "passphrase": {}
                }
            }
        }
    }
}