Skip to content

Latest commit

 

History

History
51 lines (40 loc) · 1.11 KB

File metadata and controls

51 lines (40 loc) · 1.11 KB
title Get Function
description Get a function by ID or name

Request

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();

Path Parameters

Function ID (UUID) or name

Response

Returns a function object.

Example Response

{
  "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"
}