---
title: "Validate UDFs"
---

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

# Validate UDFs

Path: Arroyo REST API › udfs

`POST /v1/udfs/validate`

URL: `http://localhost:5115/api/v1/udfs/validate`

## Request body

_Required._

- `definition` (`validate_udf.definition`; string, required)
- `language` (`validate_udf.language`; string, optional)
  - one of `"python"`, `"rust"`

## Example request

```json
{
  "definition": "string",
  "language": "python"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url http://localhost:5115/api/v1/udfs/validate \
  --header 'Content-Type: application/json' \
  --data '
{
  "definition": "string",
  "language": "python"
}
'
```

### TypeScript

```typescript
const url = 'http://localhost:5115/api/v1/udfs/validate';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: JSON.stringify({definition: 'string', language: 'python'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "http://localhost:5115/api/v1/udfs/validate"

payload = {
    "definition": "string",
    "language": "python"
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Validated query

#### Example

```json
{
  "errors": [
    "string"
  ],
  "udf_name": "string"
}
```

- `errors` (`validate_udf.response.200.errors`; array of string, required)
- `udf_name` (`validate_udf.response.200.udf_name`; string, optional, nullable)


Source: https://www.arroyo.dev/docs/api/validate-udf/index.md
