# Roll back workspace state to a previous version

Copies a historical state file to a new version and sets the workspace state pointer to it. Blocked when a pipeline execution is in flight.

Endpoint: POST /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/state-versions/{data_id}/rollback
Version: 1.0
Security: x-api-key

## Path parameters:

  - `org` (string, required)
    Org is the organisation identifier.
    Example: "s"

  - `project` (string, required)
    Project is the project identifier.
    Example: "kp"

  - `workspace` (string, required)
    Workspace identifier
    Example: "Enim eaque sint voluptate quo."

  - `data_id` (string, required)
    The unique identifier of the state version to roll back to
    Example: "73dfd8ae-c6d1-4e5c-bf16-f773716260a5"

## Header parameters:

  - `Harness-Account` (string, required)
    Account is the internal customer account ID.
    Example: "a"

## Request fields (application/json):

  - `rollback_reason` (string)
    Optional human-readable reason for the rollback
    Example: "Ut aut."

## Response 200 fields (application/json):

  - `activity_id` (string, required)
    The unique identifier of the audit activity record
    Example: "4fa941f5-9912-4d8b-b58e-1f41736a4e5a"

  - `new_data_id` (string, required)
    The unique identifier of the new state version created by the rollback
    Example: "cda4b82a-ac88-4dfd-a79b-eef211075127"

  - `new_file_version` (integer, required)
    The file version timestamp (microseconds) of the new state object
    Example: 7539318569312366000

## Response 400 fields (application/vnd.goa.error):

  - `fault` (boolean, required)
    Is the error a server-side fault?

  - `id` (string, required)
    ID is a unique identifier for this particular occurrence of the problem.
    Example: "123abc"

  - `message` (string, required)
    Message is a human-readable explanation specific to this occurrence of the problem.
    Example: "parameter 'p' must be an integer"

  - `name` (string, required)
    Name is the name of this class of errors.
    Example: "bad_request"

  - `temporary` (boolean, required)
    Is the error temporary?

  - `timeout` (boolean, required)
    Is the error a timeout?
    Example: true


