# 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: "ss"

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

  - `workspace` (string, required)
    Workspace identifier
    Example: "Sed et consequatur alias expedita sed voluptas."

  - `data_id` (string, required)
    The unique identifier of the state version to roll back to
    Example: "d4b12b65-9946-424f-ab4c-a214cffd7538"

## Header parameters:

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

## Request fields (application/json):

  - `rollback_reason` (string)
    Optional human-readable reason for the rollback
    Example: "Provident sed eum maxime sed."

## Response 200 fields (application/json):

  - `activity_id` (string, required)
    The unique identifier of the audit activity record
    Example: "47c4b355-63cf-4d28-9f22-f94e87c12ccf"

  - `new_data_id` (string, required)
    The unique identifier of the new state version created by the rollback
    Example: "2f109bd8-9bd2-4f60-8b97-e2e0a8702bf3"

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

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

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

  - `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?
    Example: true

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


