List triggers
Lists the triggers packs provide (webhook, poll and schedule), with their configuration and event schemas. Routines subscribe to them from their definition with a `type: action` trigger; each published one becomes a trigger subscription (`GET /v1/actions/subscriptions`).
GET
/v1/actions/triggers
Lists the triggers packs provide (webhook, poll and schedule), with their configuration and event schemas.
Routines subscribe to them from their definition with a `type: action` trigger; each published one becomes a
trigger subscription (`GET /v1/actions/subscriptions`).
Authentication
Bearer Token (b3os_sk_ API key or b3os_pat_ token) API Key (cookie: __Host-b3os_session)
Query Parameters
q
string
optional
query
Words to search for.
pack
string
optional
query
Only triggers of this pack.
kind
string
optional
query
limit
integer
optional
query
Page size, from 1 to 100.
cursor
string
optional
query
Opaque cursor from the previous page's `next_cursor`. Omit it for the first page.
Responses
200
A page of triggers.
application/jsonobject
string
REQUIRED
Enum:
listdata
object[]
REQUIRED
Array of:
ref
string
REQUIRED
pack
string
REQUIRED
key
string
REQUIRED
title
string
REQUIRED
description
string
REQUIRED
kind
string
REQUIRED
Enum:
webhook, poll, scheduleconfig_schema
object | boolean
REQUIRED
A JSON Schema (draft 2020-12) document, such as a routine's `inputs` or an action's `inputSchema`. B3OS checks
it against the meta-schema when it is published. References to the meta-schema in `schemas/*.json` resolve
here.
Any of:
Option 1object
Option 2boolean
event_schema
object | boolean
REQUIRED
A JSON Schema (draft 2020-12) document, such as a routine's `inputs` or an action's `inputSchema`. B3OS checks
it against the meta-schema when it is published. References to the meta-schema in `schemas/*.json` resolve
here.
Any of:
Option 1object
Option 2boolean
connections
string[]
REQUIRED
Array of:
string
next_cursor
string | null
REQUIRED
400
The request failed validation (`invalid_request`, `invalid_url`).
401
Missing, malformed, expired or revoked credentials (`unauthorized`).
403
Authenticated but not allowed (`forbidden`, `egress_denied`).
429
A rate, concurrency or quota limit applies (`rate_limited`, `concurrency_limited`, `quota_exceeded`).
500
Something failed inside B3OS (`internal`). Retry with backoff.
503
The node or the product is not available right now (`node_unavailable`, `product_unavailable`, `capacity_unavailable`).
curl -X GET 'https://beta-api.b3os.org/v1/actions/triggers' \ -H 'Authorization: Bearer YOUR_API_TOKEN'
const response = await fetch('https://beta-api.b3os.org/v1/actions/triggers', { method: 'GET', headers: { "Authorization": "Bearer YOUR_API_TOKEN" }});const data = await response.json();console.log(data);
import requestsheaders = { 'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.get('https://beta-api.b3os.org/v1/actions/triggers', headers=headers)print(response.json())
200
Response
{ "object": "list", "data": [ { "ref": "io.b3os/github/issue-opened@1.2.0", "pack": "io.b3os/github", "key": "issue-opened", "title": "Issue opened", "description": "Fires when an issue is opened in a repository.", "kind": "webhook", "config_schema": { "type": "object", "required": [ "owner", "repo" ], "properties": { "owner": { "type": "string" }, "repo": { "type": "string" } } }, "event_schema": { "type": "object", "properties": { "number": { "type": "integer" }, "title": { "type": "string" } } }, "connections": [ "api" ] } ], "next_cursor": null}
API Playground
Try this endpoint
GET
/v1/actions/triggers