> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orkeia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Obter Versão da Ferramenta

> Retorna o snapshot de uma versão específica da ferramenta.

## Endpoint

`GET https://gateway.orkeia.ai/tools/{id}/version-control/{versionId}`

**Autenticação**\
Requer cabeçalho `authorization:  <seu_token>`.

## Parâmetros de Caminho

| Nome      | Tipo   | Obrigatório | Descrição                                 | Exemplo      |
| --------- | ------ | ----------- | ----------------------------------------- | ------------ |
| id        | string | Sim         | Identificador único da ferramenta.        | TOOL\_123456 |
| versionId | string | Sim         | Identificador/slug da versão do snapshot. | v1.0.1       |

## Exemplo (cURL)

```bash theme={null}
curl -X GET "https://gateway.orkeia.ai/tools/TOOL_123456/version-control/v1.0.1"   -H "authorization:  <seu_token>"
```

## Respostas

### Response - Success

```json response theme={null}
{
  "status": "OK",
  "data": {
    "id": "TOOL_123456",
    "snapshot": {
      "name": "Ferramenta X",
      "description": "Descrição",
      "code": "export async function run(input){ return { ok: true }; }",
      "entryFunctionName": "run",
      "sectors": ["engineering"],
      "publisher": "Orkeia",
      "enabled": true,
      "environments": ["prod"],
      "mcp": {
        "url": "https://tools.orkeia.ai/my-tool",
        "transport": "sse"
      }
    },
    "versionId": "v1.0.1",
    "createdAt": "2024-07-10T09:30:00Z"
  }
}
```

### 500 — Server Error

```json theme={null}
{
  "status": "ERROR",
  "code": "server/error",
  "data": null
}
```

### 400 — Client Error

```json theme={null}
{
  "status": "ERROR",
  "code": "client/error",
  "data": null
}
```
