Itential Automation Gateway

On this page:

Validation

Once Itential Automation Gateway is installed and configured, use the information in this guide to change the default password, get started with the API, and set your security keys.

  • Default User Name: admin@itential.
  • Default Password: admin.

Change Default Password

You must first login to obtain the authorization token and then paste the token into the change password curl command.

An example curl script is provided below.

$ curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v1.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "new_password": "super-secure-password",
   "old_password": "admin"
 }' 'http://localhost:8083/api/v1.0/account/admin%40itential/change_password'

Login to Automation Gateway

Login to the Automation Gateway UI running at https://servername:8443.

  • The username will be admin@itential.
  • The password will be the <super-secure-password> that was selected in the previous step.

Password Reset Functionality Enabled

During initial (first time) login as admin, a straightforward Change Password feature is enabled that allows the user to enter a new password.

  • You will be asked to set security questions and a strong password that meets security guidelines.

  • The default email for admin is set to admin@itential.com but it can be changed to an email that complies to organization standards. The email and security answers that are set will be used as an identifier for the account, in case of password or username recovery.

  • For creation of user accounts, the email id is a mandatory field.

Figure 1: First Time Login

First Time Login


Note: More information about this functionality is explained in the Itential Automation Gateway User Guides.


Getting Started with the API

For a complete API reference, use the API Documentation link in the Automation Gateway UI. This page allows you to browse and interact with the Automation Gateway API.

Add a Device

If an existing Ansible Inventory is not already configured, you can add a new device to Automation Gateway using the API. The following is an example curl script to add a device.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v1.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "name": "ios02",
   "variables": {
     "ansible_host": "192.168.32.79",
     "ansible_port": 22,
     "ansible_user": "ios-user",
     "ansible_ssh_private_key_file": "/path/to/key",
     "ansible_network_os": "ios",
     "ansible_connection": "network_cli"
   }
 }' 'https://localhost:8083/api/v1.0/devices'

Get a Device List

Use the following command to get a list of managed devices.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v1.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X GET --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Accept: application/json' 'http://localhost:8083/api/v1.0/devices'

Get Configuration for a Device

Use the following command to retrieve the configuration for a managed device.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v1.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "hosts": [ "ios01" ],
   "template": "ios_config"
 }' 'https://localhost:8083/api/v1.0/getConfig'

Run a Command on a Device

Use the following command to run a command on a managed device.

curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ "password": "admin", "username": "admin@itential" }' 'http://localhost:8083/api/v1.0/login'
{"token": "NTAuMjczOTA4MTYwNDM5OTY2"}
curl -X POST --header 'Authorization: <COPY TOKEN VALUE FROM PREVIOUS CMD HERE>' --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
   "command": [ "show version" ],
   "hosts": [ "ios01" ],
   "template": "ios_command"
 }' 'https://localhost:8083/api/v1.0/runCommand'