Clone a Command Template

POST /api/v1.2/command_templates/<id>/duplicate

Use this API to clone a command template.

See Command Templates for more information on using the UI to create a command template.

Required Role

The following roles can make this API call:

  • A user who is part of the system-user/system-admin group.
  • A user invoking this API must be part of a group associated with a role that allows creating a template. See Managing Groups and Managing Roles for more information.

Parameters

None

Request API Syntax

Here is the syntax for the request API.

curl -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
"https://api.qubole.com/api/v1.2/command_templates/<id>/duplicate"

Note

The above syntax uses https://api.qubole.com as the endpoint. Qubole provides other endpoints to access QDS that are described in Supported Qubole Endpoints on Different Cloud Providers.

Sample API Request

Here is the sample API request to clone a command template with 200 as its ID.

curl -i -X POST -H "X-AUTH-TOKEN: $AUTH_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" \
"https://api.qubole.com/api/v1.2/command_templates/200/duplicate"