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

# Functions API

> List and invoke device functions with an API key.

# Functions API

Mounted under `/v1/devices`. Authenticate with an API key:

```http theme={"system"}
Authorization: Bearer sk_live_…
```

| Method | Path                                   |
| ------ | -------------------------------------- |
| `GET`  | `/{device_id}/functions`               |
| `POST` | `/{device_id}/functions/{function_id}` |

## List

Returns registry functions for the device adapter **plus** org saved SQL entries as `{ data, meta }`.

Each item includes `params[]` with `name`, `kind`, `required`, `hint`, optional `options`, limits, etc. Optional `page` / `per_page` (max 100); omit both for the full catalog. `meta` also includes `device_id` and `adapter`.

```bash theme={"system"}
curl -s "$API/v1/devices/$DEVICE_ID/functions" \
  -H "Authorization: Bearer $ORQUESTR_API_KEY"
```

```json theme={"system"}
{
  "data": [
    {
      "id": "sicarv4.products.search",
      "adapter": "sicarv4",
      "description": "Search articulo by text…",
      "kind": "registry",
      "params": [
        { "name": "q", "kind": "string", "required": false, "hint": "…" }
      ],
      "input": []
    }
  ],
  "meta": {
    "page": 1,
    "per_page": 1,
    "total_pages": 1,
    "total_count": 1,
    "device_id": "…",
    "adapter": "sicarv4"
  }
}
```

## Invoke

See [Invoke guide](/functions/invoke) and adapter catalogs under **Functions**.

```bash theme={"system"}
curl -s -X POST \
  "https://api.orquestr.dev/cloud/v1/devices/$DEVICE_ID/functions/device.health" \
  -H "Authorization: Bearer $ORQUESTR_API_KEY" \
  -H "Content-Type: application/json"
```

With parameters:

```bash theme={"system"}
curl -s -X POST \
  "https://api.orquestr.dev/cloud/v1/devices/$DEVICE_ID/functions/sicarv4.products.search" \
  -H "Authorization: Bearer $ORQUESTR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"q":"coca 600","status":"1","limit":"50"}}'
```

Device must have `status: enrolled`.

See [API reference](/api/introduction).
