Skip to content

Create automations

Last updated on

This guide explains how to create an automation using the STACKIT Automation Service API or the STACKIT Portal. Automations are created from predefined templates and can be configured with specific parameters.

To create a new automation via API, you need to provide the following information:

  • projectId
  • regionId
  • Automation configuration including template ID and parameters

Use the following POST request to create an automation:

POST https://automation-service.api.stackit.cloud/v1beta/projects/{projectId}/regions/{region}/services/volumes/automations
{
"description": "Creates daily recovery points for all volumes with specified label",
"input": {
"inheritVolumeLabels": true,
"kind": "VolumeRecoveryPointManagement",
"recoveryPointLabels": {
"exampleLabelKey1": "exampleLabelValue1",
"exampleLabelKey2": "exampleLabelValue2"
},
"snapshotRetentionPolicy": {
"kind": "count",
"value": 2
},
"volumeLabelSelector": "myLabelkey1=myLabelValue,myLabelKey2=myOtherLabelValue"
},
"name": "My Daily Volume Recovery Point Creation Automation",
"templateId": "62c5178a-87fb-437f-88c8-c6f26b3ee4f6",
"triggers": {
"schedule": {
"rrule": "DTSTART;TZID=Europe/Sofia:20200803T023000\nRRULE:FREQ=DAILY;INTERVAL=1"
}
}
}
  1. Choose an automation template: Use the Fetch automation templates guide to get available templates.

  2. Prepare your request: Fill in the required parameters based on the template you selected.

  3. Send the POST request: Execute the API call with your automation configuration.

  4. Store the automation ID: The response will include an automationId that you’ll need for future operations.

API Reference: CreateAutomation.

Once created, you can execute the automation manually or it will run according to its schedule. See Execute automations for manual execution.