---
title: "Update an automation"
method: PUT
path: "/api/v1/automations/{id}"
tags: ["automations"]
---

# Update an automation

`PUT /api/v1/automations/{id}`

Updates the full definition of an automation. The requesting user must be the owner of the automation and either be assigned the `AutomationCreator` role or have at least one of the following scopes: `automations`, `admin.automations`, `automations.private` or `automations.shared`.

## Path parameters

- `id` string, required

## Request body

- AutomationDetailUpdateRequestObject
  - `name` string
  - `schedules` ScheduleRequestObject[]
    - `stopAt` string
    - `startAt` string
    - `interval` integer — Interval in seconds; must be a multiple of 60. Values are rounded to the nearest minute (≥30 seconds rounded up, otherwise down).
    - `timezone` string
  - `workspace` object — The workspace generated by the Qlik Automate editor.
  - `description` string
  - `maxConcurrentRuns` integer — Maximum number of concurrent runs allowed for this automation. The maximum value is defined in automations settings.

## Response `200`

OK Response

- AutomationDetailResponseObject
  - `id` string, uuid
  - `name` string — The name of the automation.
  - `state` 'available' | 'unavailable' | 'disabled' — The state of the automation.
  - `lastRun` RunDetailResponseObject
    - `id` string, uuid — The unique identifier of the run.
    - `error` object[], nullable — List of errors that occurred during the automation run.
    - `title` string — The title of the automation run.
    - `status` 'failed' | 'finished' | 'finished with warnings' | 'must stop' | 'not started' | 'running' | 'starting' | 'stopped' | 'exceeded limit' | 'queued' — The current status of the automation run.
    - `context` 'test_run' | 'editor' | 'detail' | 'api_sync' | 'api_async' | 'webhook' | 'lookup' — The source that triggers the automation will set the context. Certain contexts impact the execution of an automation (for example, The "test_run" context will not process all results when listing items).
    - `metrics` object, nullable
      - `blocks` object[] — List of blocks used during execution. Note: this list currently only contains endpointBlocks and snippetBlocks
        - `type` 'snippetBlock' | 'endpointBlock', required — Type of the block.
        - `rxBytes` integer, required — Total amount of received bytes sent by the current block.
        - `txBytes` integer, required — Total amount of sent bytes sent by the current block.
        - `apiCalls` integer — API calls to external resources made by the current block.
        - `snippetId` string, uuid — Unique identifier for the snippet block used within the execution.
        - `endpointId` string, uuid — Unique identifier for the endpoint block used within the execution.
        - `connectorId` string, uuid — Unique identifier for the connector used within the block of the execution.
      - `network` object
        - `rxBytes` integer — The number of received bytes.
        - `txBytes` integer — The number of sent bytes.
      - `totalApiCalls` integer — The number of API calls made.
    - `ownerId` string — The unique identifier of the owner of the automation run.
    - `spaceId` string — The unique identifier of the space in which the automation run is created.
    - `testRun` boolean — Indicates if this automation run is a test run.
    - `archived` boolean — Indicates if this automation run is archived.
    - `stopTime` string, date-time, nullable — The date and time at which the automation run stopped.
    - `createdAt` string, date-time
    - `isTestRun` boolean — Indicates if this automation run is a test run.
    - `startTime` string, date-time, nullable — The date and time at which the automation run started.
    - `updatedAt` string, date-time
    - `isArchived` boolean — Indicates if this automation run is archived.
    - `executedById` string — The unique identifier of the user who executed the automation run.
    - `scheduledStartTime` string, date-time, nullable — The date and time at which the automation run is scheduled to start.
  - `ownerId` string — The unique identifier of the owner of the automation.
  - `runMode` 'manual' | 'scheduled' | 'triggered' | 'webhook' — Defines how the automation run is started.
  - `spaceId` string — The unique identifier of the space that contains the automation.
  - `createdAt` string, date-time
  - `lastRunAt` string, date-time — The date and time when the last automation run was finished.
  - `schedules` ScheduleResponseObject[]
    - `id` string, uuid
    - `stopAt` string
    - `startAt` string
    - `interval` integer — Interval in seconds.
    - `timezone` string
    - `lastStartedAt` string, date-time
  - `updatedAt` string, date-time
  - `workspace` object — The workspace generated by the Qlik Automate editor.
  - `snippetIds` string[] — A list of snippets that were detected in the workspace. This includes snippet blocks that are not connected to other blocks. Order of GUIDs is not guaranteed.
  - `description` string — The description of the automation.
  - `endpointIds` string[] — A list of endpoints that were detected in the workspace. This includes endpoints present in blocks that are not connected to other blocks. Order of GUIDs is not guaranteed.
  - `connectorIds` string[] — A list of connectors that were detected in the workspace. This includes connectors present in blocks that are not connected to other blocks. Order of GUIDs is not guaranteed.
  - `lastRunStatus` 'failed' | 'finished' | 'finished with warnings' | 'must stop' | 'not started' | 'paused' | 'running' | 'starting' | 'stopped' | 'exceeded limit' — The status of the last run of the automation.
  - `executionToken` string — Execution token required to authorize the execution of the automation.
  - `maxConcurrentRuns` integer — Maximum number of concurrent runs allowed for this automation.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not found
- `500` — Internal Server Error
- `503` — Service Unavailable

---

[API](https://skmtc.dev/qlik/apis/automations.md) · [All operations](https://skmtc.dev/qlik/apis/automations/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/qlik/automations/revisions/df32e9ca584a/schema)
