Listar Pastas

Listar as pastas de files do workspace com ordenação e filtro opcional por caminho do pai. O conjunto limitado é retornado em uma única página; nextCursor é sempre null.

GET/api/v2/files/folders
X-API-Key<token>

Sua API key do Studio, pessoal ou com escopo de workspace. Gere uma em Settings e depois API Keys. As operações que rejeitam API keys de workspace dizem isso na própria descrição.

Em: header

Parâmetros de query

workspaceId*string

Workspace cujas pastas devem ser listadas.

Tamanho1 <= length <= 128
parentPath?Folder path input

Restrict results to direct children of this parent path. Unknown folder paths contribute no matches.

Tamanholength <= 4096
search?string

Correspondência de substring com o nome da pasta, sem diferenciar maiúsculas de minúsculas.

Tamanho1 <= length <= 200
sortBy?string

Campo usado para ordenar o resultado. A ordenação por name diferencia maiúsculas de minúsculas e segue a collation do armazenamento, então não conte com uma ordem que ignore maiúsculas e minúsculas.

Padrão"name"
Valor em"name" | "createdAt" | "updatedAt"
sortOrder?string

Direção da ordenação.

Padrão"asc"
Valor em"asc" | "desc"
scope?string

Which lifecycle set to list: active (default) returns live folders only; archived returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both.

Padrão"active"
Valor em"active" | "archived"
recursive?string

Whether parentPath includes every descendant instead of direct children only.

Valor em"true" | "1" | "yes" | "on" | "y" | "enabled" | "false" | "0" | "no" | "off" | "n" | "disabled"
depth?integer

Deepest level below parentPath to include when recursive is true.

Intervalo1 <= value <= 64

Corpo da resposta

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://agent-studio.seeyu.ai/api/v2/files/folders?workspaceId=string" \  -H "X-API-Key: YOUR_API_KEY"
{
  "data": [
    {
      "name": "string",
      "path": "string",
      "parentPath": "string",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "nextCursor": "string"
}
{
  "error": {
    "code": "BAD_REQUEST",
    "message": "Invalid request"
  }
}
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Authentication required"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "Insufficient workspace permissions",
    "details": {
      "code": "INSUFFICIENT_WORKSPACE_ROLE"
    }
  }
}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Not found"
  }
}
{
  "error": {
    "code": "RATE_LIMITED",
    "message": "API rate limit exceeded",
    "details": {
      "retryAfter": "2026-01-01T00:00:30.000Z"
    }
  }
}
{
  "error": {
    "code": "INTERNAL_ERROR",
    "message": "Internal server error"
  }
}
{
  "error": {
    "code": "SERVICE_UNAVAILABLE",
    "message": "Service temporarily unavailable"
  }
}