| title | Get Function |
|---|---|
| description | Get a function by ID or name |
You can retrieve a function by either its ID or name.
```bash cURL (by ID) curl -X GET "https://api.sequinstream.com/api/functions/550e8400-e29b-41d4-a716-446655440000" \ -H "Authorization: Bearer YOUR_API_TOKEN" ```curl -X GET "https://api.sequinstream.com/api/functions/my-filter" \
-H "Authorization: Bearer YOUR_API_TOKEN"const response = await fetch('https://api.sequinstream.com/api/functions/my-filter', {
headers: {
'Authorization': 'Bearer YOUR_API_TOKEN'
}
});
const function = await response.json();Returns a function object.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "my-filter",
"description": "Filter records with value greater than 40",
"type": "filter",
"code": "def filter(action, record, changes, metadata) do\n record[\"value\"] > 40\nend"
}