# Enable drift automation for a workspace

Configures drift detection pipeline and schedule for the workspace.

Endpoint: PUT /iacm/api/orgs/{org}/projects/{project}/workspaces/{workspace}/drift-config
Version: 1.0
Security: x-api-key

## Path parameters:

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

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

  - `workspace` (string, required)
    Workspace identifier
    Example: "Debitis iure architecto."

## Header parameters:

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

## Request fields (application/json):

  - `pipeline_id` (string, required)
    Pipeline to run for drift detection
    Example: "Libero illum enim saepe officia repellendus."

  - `provisioner` (string)
    Provisioner key (defaults to opentofu when omitted)
    Example: "Dolores a amet voluptatem tempora amet repellat."

  - `run_every` (integer, required)
    Run drift detection every N hours or N days (see run_every_unit)
    Example: 6589902134771943000

  - `run_every_unit` (string, required)
    hours or days
    Enum: "seconds", "minutes", "hours", "days"

## Response 200 fields (application/json):

  - `status` (string, required)
    Outcome message
    Example: "Ut similique id facere."

## 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


