API Reference
Get a trigger
Get a trigger
GET /api/triggers/{id}
Get a trigger
Operation ID: getTrigger
Authentication
Option 1
- BearerAuth (
http bearer) API key token. Create via POST /api/api-keys. Format:envoy_<hex>
Option 2
- CookieAuth (
apiKey) Session cookie set after login + TOTP verification
Path parameters
id—integer,requiredResource ID
Success responses
200
Trigger details
Content type: application/json
- Reference:
Trigger- Type:
object - Properties:
id(integer)job_id(integer)task_key(string | null)- Nullable: yes
type(string) — cron repeats on a cron expression; one_off fires once at the datetime in cron_expression then auto-disables.- Description: cron repeats on a cron expression; one_off fires once at the datetime in cron_expression then auto-disables.
- Allowed values:
cron,one_off
cron_expression(string | null) — 5-field cron expression for type=cron; ISO-8601 datetime (UTC) for type=one_off.- Description: 5-field cron expression for type=cron; ISO-8601 datetime (UTC) for type=one_off.
- Nullable: yes
arguments(string | null) — JSON-encoded arguments- Description: JSON-encoded arguments
- Nullable: yes
enabled(integer)- Allowed values:
0,1
- Allowed values:
last_triggered_at(string | null)- Format:
date-time - Nullable: yes
- Format:
created_at(string)- Format:
date-time
- Format:
updated_at(string)- Format:
date-time
- Format:
- Type:
Error responses
404
Resource not found
Content type: application/json
- Reference:
Error- Type:
object - Properties:
error(string)- Example:
NOT_FOUND
- Example:
message(string)- Example:
Resource not found
- Example:
- Type:
Example:
{
"error": "NOT_FOUND",
"message": "Resource not found"
}Examples
cURL
curl --request GET \
--url 'https://your-envoy.example.com/api/triggers/YOUR_ID' \
--header 'Authorization: Bearer $API_KEY'JavaScript (fetch)
const response = await fetch('https://your-envoy.example.com/api/triggers/YOUR_ID', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
});
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);