v1

latestOpenAPI 3.0.0CoreStack Inc License2026-07-248001,5071.7 MB
Automation

Create Script

Creates a new script under the tenant. However the script will be accessible based on its scope. Global Scripts - All user will have access to Corestack's Marketplace Scripts (Can view and execute). Account - All users under that account will have access (Can view and execute). Only Account admins can update/delete. Tenant - Users with access to the specific tenant will have access scripts (Can view and execute). Tenant admins can update/delete. Private - User who created will only have access.

post/operation/automation/scripts/{tenant_id}

Path parameters

tenant_idstring required

Specify the tenant ID. This is a unique ID and can be retrieved using the List Tenants API.

Request body

namestring required

Name of the script and it should be unique.

uristring

Unique URI for script - eg: script/ansi/linux/lamp_install. If not provided, corestack will generate it automatically

descriptionstring

Detailed description about script

categorystring[] required

Script Category

platformstring[] required

Platforms supported by script.

operating_systemstring[] required

OS supported by script

config_type'ansible' required

Config type of the script. Create is supported for ansible type scripts alone for now

scope'private' | 'account' | 'tenant' required

The scope of the script: Account scope - All users under that account will have access to view and execute Only Account admins can update/delete the scripts, Tenant Scope - Users with access to the specific tenant will have access to scripts who can describe or execute scripts. Tenant admins can only update/delete. Private Scope - User who created will only have access

playbook_yamlstring

Playbook yaml path - mandatory for ansible scripts

Example request

{
  "category": [
    "Application"
  ],
  "platform": [
    "linux"
  ],
  "operating_system": [
    "centos"
  ],
  "config_type": "ansible",
  "scope": "private",
  "script_info": [
    {
      "path_type": "file"
    }
  ],
  "dependencies": [
    {
      "path_type": "file"
    }
  ]
}

Response

Created

script_idstring

Unique ID of the script