User Decorations
  • Dark
    Light
  • PDF

User Decorations

  • Dark
    Light
  • PDF

Overview

Automation Gateway aggregates all of your Ansible modules, roles, playbooks, and scripts. Along with this attribute is the ability to decorate or enhance each module, role, playbook, and script. With decoration, users have the flexibility to edit JSON schemas for identifying and modifying metadata such as input parameters, descriptions, or types. Decoration is currently stored in the database.

Use the following set of APIs to export, import, and remove JSON schemas.

Export

Description: Retrieve the schema from a module, role, playbook, or script. The response from this call can be saved and used as direct input for importing a schema to another Automation Gateway server.

API:

GET hostname:port/modules/{module_name}/schema
GET hostname:port/roles/{role_name}/schema
GET hostname:port/playbooks/{playbook_name}/schema
GET hostname:port/scripts/{script_name}/schema

Sample Response

{
    "schema": {
        "properties": {
            "command": {
                "type": "string",
                "description": "CLI command to execute on network device"
            }
        },
        "required": [
            "command"
        ],
        "title": "sample_playbook",
        "type": "object"
    }
}

Import

Description: Add/update the schema for a module, role, playbook, or script.

API:

PUT hostname:port/modules/{module_name}/schema
PUT hostname:port/roles/{role_name}/schema
PUT hostname:port/playbooks/{playbook_name}/schema
PUT hostname:port/scripts/{script_name}/schema

Sample Request

{
    "schema": {
        "properties": {
            "command": {
                "type": "string",
                "description": "CLI command to execute on a network device"
            }
        },
        "required": [
            "command"
        ],
        "title": "sample_playbook_1",
        "type": "object"
    }
}

Sample Response

{
    "type": "playbook",
    "name": "sample_playbook_1",
    "schema": {
        "properties": {
            "command": {
                "type": "string",
                "description": "CLI command to execute on a network device"
            }
        },
        "required": [
            "command"
        ],
        "title": "sample_playbook_1",
        "type": "object"
    }
}

Removal

Description: Delete the user decorated schema for a module, role, playbook, or script.

Note: This call will only remove a user decorated schema. It does not apply to the certified schemas provided by Itential for roles and modules. It also does not apply to a module's native schema that is automatically created at discovery time by the AG server.

API:

DELETE hostname:port/modules/{module_name}/schema
DELETE hostname:port/roles/{role_name}/schema
DELETE hostname:port/playbooks/{playbook_name}/schema
DELETE hostname:port/scripts/{script_name}/schema

Sample Response

{
    "code": 200,
    "message": "deleted"
}

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.