Skip to content

Fetch command templates via API

After activating the Run Command service, you need to retrieve the available command templates to execute scripts. This guide explains how to fetch currently supported templates for use in API requests or the STACKIT Cloud Portal.

For a complete list of supported templates, see the Command templates table.

To obtain a JSON list of all available Remote Command templates, use the following GET request:

GET https://run-command.api.eu01.stackit.cloud/v1/command-templates

Once you have identified a template from this list, you can execute it remotely on your machine. See Run a command via API for instructions. API Reference: GetCommandTemplates.

Get information about a specific command template

Section titled “Get information about a specific command template”

Provide the following information in your API requests:

  • projectId
  • serverId
  • commandTemplateName

Use this GET request to obtain more information about a command template:

GET https://run-command.api.eu01.stackit.cloud/v1/projects/{projectId}/servers/{serverId}/command-templates/{commandTemplateName}

Swagger API definition for the STACKIT Run Commands service API: GetCommandTemplate.