Automations

Get an automation

Changed on

Returns an automation the caller may read: its owner, any member when it is shared with the organization, any member of the workstream that created it when it runs as a service account, and the service account it runs as. canWrite says whether the caller may also change it. Any other automation answers 404, as an unknown id does.

get/api/v0/automations/{automationId}

Request

  • Base URL
    https://api.factory.ai
  • Auth
    HTTP bearer

Path parameters

automationId, string required

Automation ID

Query parameters

includeWebhookTriggers, boolean

Set to "true" to allow a webhook-triggered automation in the response.

includeAutomationTriggers, boolean

Set to "true" to allow a chained (automation-triggered) automation in the response.

Headers

X-Factory-Org-Id, string

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Response

Response for status 200

GetAutomation200ResponseBody required
id, string required
ownerId, string required
name, string required
description, string nullable
prompt, string required
triggerType, 'schedule' | 'ci' | 'slack' | 'webhook' | 'automation'
schedule, string required
triggerConfig, object
triggerChannelIds, string[]
triggerChannelPatterns, string[]
model, string nullable
reasoningEffort, string nullable
workingDirectory, string nullable
templateId, 'code-review' | 'qa' | 'wiki' | 'security-audit' | 'code-walkthrough' | 'triage' | 'incident-response' | 'ticket-to-pr' | 'pr-reviewer' | 'daily-status-digest' | 'code-health' | 'meeting-notes-sync' | 'error-triage' | 'slack-digest' | 'slack-bug-fixer' | 'channel-qa' | 'slack-ticket-filer' | 'alert-responder' | 'ci-failure-triage' | 'new-issue-investigator' | 'review-comment-fixer' | 'test-coverage' | 'docs-refresh'

More values may be added; treat a value you do not know as unknown.

tags, string[] required
status, 'active' | 'paused' | 'degraded' required

More values may be added; treat a value you do not know as unknown.

pausedReason, 'computer_deleted' | 'computer_over_capacity' | 'consecutive_failures' | 'invalid_payload_regex' | 'managed_computers_disabled' | 'owner_inactive' | 'org_deactivated' | 'computer_disk_full' | 'missed_runs' | 'workstream_inactive' | 'target_session_unavailable'
setupState, 'creating' | 'needs_input' | 'complete' | 'failed'
setupSessionId, string
computerId, string
executionTemplateId, string nullable
executionTemplateName, string
computerName, string
runConfig, 'org_default'
createdAt, number required

Unix timestamp, in milliseconds, when the automation was created.

updatedAt, number required

Unix timestamp, in milliseconds, when the automation last changed.

privacyLevel, 'private' | 'organization'
createdBy, object
creationSource, 'web' | 'desktop' | 'cli' | 'cli-menu' | 'api' | 'sync' | 'fork'

More values may be added; treat a value you do not know as unknown.

canWrite, boolean

Whether the caller may edit, pause or resume, delete, or run the automation: always for its owner; when it runs as a service account, for the creators and editors of the workstream that created it, and, when it is shared with the organization, for every other human member except that workstream's viewers.

forkedFrom, string nullable
workstreamId, string nullable
creationSessionId, string
creationWorkstreamId, string
nextAutomationIds, string[]
passUpstreamContext, boolean
machineId, string
hostId, string
targetSessionId, string
lastRunAt, string
lastRunSessionId, string
lastRunStatus, string
runCount, number
ciSetupStatus, 'pending_setup' | 'active' | 'inactive' | 'pending_removal'
ciPrUrl, string
ciPrNumber, number
ciWorkflowFilePath, string

Changes