---
updatedAt: 2026-06-11T09:20:22.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# List drifted workspaces.

This endpoint lists drifted workspaces.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "DriftedWorkspace": {
        "description": "Represents a drifted workspace.",
        "properties": {
          "drift-report-id": {
            "description": "The ID of the drift report associated with the workspace.",
            "type": "string"
          },
          "drifted-resources-count": {
            "description": "The number of the drifted resources in the workspace.",
            "nullable": true,
            "type": "integer"
          },
          "environment-id": {
            "description": "The ID of the environment.",
            "type": "string"
          },
          "environment-name": {
            "description": "The name of the environment.",
            "type": "string"
          },
          "last-check-at": {
            "description": "The time when the last check was performed.",
            "format": "date-time",
            "nullable": true,
            "type": "string"
          },
          "next-check-at": {
            "description": "The time when the next check will be performed.",
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "description": "The status of the drift report.",
            "enum": [
              "pending",
              "errored",
              "in_progress",
              "no_drift_detected",
              "awaiting_manual_action",
              "discarded",
              "accept_state",
              "reset_state",
              "resolved"
            ],
            "type": "string"
          },
          "workspace-id": {
            "description": "The ID of the workspace.",
            "type": "string"
          },
          "workspace-name": {
            "description": "The name of the workspace.",
            "type": "string"
          }
        },
        "type": "object"
      },
      "DriftedWorkspaceFieldsetsListingDocument": {
        "description": "Document Listing.",
        "properties": {
          "data": {
            "items": {
              "$ref": "#/components/schemas/DriftedWorkspace"
            },
            "type": "array"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "links": {
            "additionalProperties": {
              "type": "string"
            },
            "readOnly": true,
            "type": "object"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/reports/environments/{environment}/drifted-workspaces": {
      "get": {
        "description": "This endpoint lists drifted workspaces.",
        "operationId": "list_drifted_workspaces_for_environment",
        "parameters": [
          {
            "description": "Filter by drift report status.",
            "in": "query",
            "name": "filter[status]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by whether the workspace has detected resource drift.",
            "in": "query",
            "name": "filter[is-drifted]",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Filter by workspace tags.",
            "in": "query",
            "name": "filter[tag]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Filter by last drift check date range. Example: `filter[last-check-at]=between:2026-01-01T00:00:00Z,2026-02-01T00:00:00Z`.",
            "in": "query",
            "name": "filter[last-check-at]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The search string. Supports search by workspace id or workspace name.",
            "in": "query",
            "name": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page number",
            "in": "query",
            "name": "page[number]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Page size",
            "in": "query",
            "name": "page[size]",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The comma-separated list of attributes. `status` sorts by priority: `awaiting_manual_action` and `errored` first, `no_drift_detected` last. Ties are ordered by workspace name.",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "items": {
                "enum": [
                  "drifted-resources-count",
                  "status",
                  "workspace-name"
                ],
                "type": "string"
              },
              "type": "array"
            }
          },
          {
            "description": "Format of the response. It can be 'json' or 'csv'.",
            "in": "query",
            "name": "format",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "The ID of the environment",
            "in": "path",
            "name": "environment",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriftedWorkspaceFieldsetsListingDocument"
                }
              },
              "text/csv": {
                "schema": {
                  "format": "csv",
                  "type": "string"
                }
              }
            },
            "description": "Success."
          },
          "403": {
            "description": "User unauthorized to perform this action."
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "List drifted workspaces.",
        "tags": [
          "drifted-workspaces"
        ],
        "x-mcp-tool": true,
        "x-resource": null,
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```