# List Function Triggers

`GET /functions/{name}/triggers` · Core · Compute & Automation

Returns the named function's EVENT triggers, newest first. Each entry has `id`, `functionName`, `collection`, `events`, `filter`, `enabled`, `logOkInvocations` and `createdAt`. Scheduled triggers are listed at `GET /@{projectSlug}/forge/schedules`, not here. Requires `PROJECT_ADMIN`.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `name` | path | yes | The function's name. A module's operation is named `<module>:<operation>`. Example: `"greet"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | array of object | yes | The function's collection and bucket triggers, newest first. Schedules and erasure triggers are listed by their own endpoints. |
| `data.[]id` | string (uuid) | yes | The trigger's id, a UUID. |
| `data.[]functionName` | string | yes | The function the trigger runs. |
| `data.[]collection` | object | yes | The collection whose writes fire the trigger; null on a bucket trigger. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.[]bucket` | object | yes | The bucket whose object events fire the trigger; null on a collection trigger. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.[]events` | array of object | yes | The events that fire the trigger: `insert`, `update`, `delete` and `upsert` on a collection; on a bucket, `object.created` (an upload, an overwrite included), `object.deleted` (a delete through the API) and `object.expired` (removed by the bucket's `deleteAfterDays`). A function that receives `object.deleted` or `object.expired` can't read the object any more. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.[]filter` | object | yes | The condition an event must match: a record predicate on a collection trigger, object conditions on a bucket trigger. Null when the trigger fires on every matching event. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.[]enabled` | boolean | yes | Whether the trigger fires. |
| `data.[]logOkInvocations` | boolean | yes | Whether successful invocations are logged as well as failed ones. |
| `data.[]createdAt` | string (date-time) | yes | When the trigger was created. |
| `meta` | object | yes |  |


## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_UNAUTHENTICATED` | The caller presented no authenticated session. |
| 400 | `K9O_INVALID_FIELD_VALUE` | The project slug or the function name is not a valid identifier. |
| 403 | `K9O_ACCESS_DENIED` | The caller has no access to this project. |
| 403 | `K9O_IAM_POLICY_DENIED` | The bound IAM policy ceiling denies reading function triggers; the default floor is PROJECT_ADMIN. |
| 404 | `K9O_FUNCTION_NOT_FOUND` | No function with that name exists in this project, or it is retired. |

## Code samples

### cURL

```bash
curl -X GET 'https://<org>.api-<region>.k9o.io/@storefront/functions/<name>/triggers' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/functions/<name>/triggers', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o function trigger list <function>
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.functions.triggers.list('greet')
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.functions.triggers.list("greet")
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Functions.Triggers.List(ctx, "greet")
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.functions.triggers.list("greet").await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.functions().triggers().list("greet")
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Functions.Triggers.ListAsync("greet")
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.functions.triggers.list("greet")
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->functions->triggers->list('greet')
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/list-function-triggers
