# lg_api: Call the REST API

Call any Restolayer REST route (the spec is /v1/openapi.json) with your credentials. DELETE and merges need confirm: true.

- **Changes data:** yes, and it can't be undone from here: it needs `confirm: true`
- **Credential scope:** any signed-in key
- **Assistant level:** any connected assistant (Read only and up)

## Inputs

| Field | Type | Required | Notes |
|---|---|---|---|
| `method` | "GET" \\| "POST" \\| "PATCH" \\| "PUT" \\| "DELETE" | yes |  |
| `path` | string | yes |  |
| `query` | object | no |  |
| `body` | any | no |  |
| `confirm` | boolean | no |  |

## Example MCP call

A `tools/call` request to `https://manage.restolayer.com/mcp`:

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lg_api",
    "arguments": {
      "method": "GET",
      "path": "/v1/workspaces"
    }
  }
}
```

All tools: [MCP tools](https://www.restolayer.com/docs/mcp/tools). Connecting: [connect your assistant](https://www.restolayer.com/docs/connect).
