Automation Runs

An AutomationRun is a record with information about a single execution of a given Automation.

Automation Runs can be retried upon failure or partial_failure by setting the retry_on_failure_interval_in_minutes and retry_on_failure_number_of_attempts settings on the associated Automation.

When retries occur, a new AutomationRun will be created for each retry. The property retry_at on the original run, if set, represents when that run will be retried next. The properties retried_at and retried_in_run_id will be set in the original run that failed, at the time of retry. The property retry_of_run_id will be set in the new run.

List Automation Runs

Endpoint

GET/automation_runs

Return Object

AutomationRun[]

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
user_id
int64
User ID. Provide a value of 0 to operate the current session's user.
automation_id
int64
Required
ID of the associated Automation.

Additional Arguments

Example Request

curl "https://app.files.com/api/rest/v1/automation_runs.json?user_id=1&automation_id=1" \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

[
  {
    "id": 1,
    "completed_at": "2000-01-01T01:00:00Z",
    "created_at": "2000-01-01T01:00:00Z",
    "status": "success",
    "automation_id": 1,
    "automation_version_id": 1,
    "version": 1,
    "workspace_id": 1,
    "initiating_user_id": 1,
    "initiating_interface": "example",
    "cancel_requested_at": "2000-01-01T01:00:00Z",
    "retry_at": "2000-01-01T01:00:00Z",
    "retried_at": "2000-01-01T01:00:00Z",
    "retried_in_run_id": 1,
    "retry_of_run_id": 1,
    "rerun_of_run_id": 1,
    "rerun_from_node_id": "example",
    "runtime": 1.0,
    "successful_operations": 1,
    "failed_operations": 1,
    "definition": "example",
    "application_actions": "example",
    "node_states": "example",
    "execution_nodes": [
      {
        "node_id": "example",
        "node_type": "example",
        "status": "example",
        "run_stage": "example",
        "reused": true,
        "successful_operations": 1,
        "failed_operations": 1,
        "started_at": "2000-01-01T01:00:00Z",
        "completed_at": "2000-01-01T01:00:00Z",
        "duration_ms": 1,
        "inputs": [
          "example"
        ],
        "outputs": "example",
        "input_items": "example",
        "output_items": "example",
        "item_refs": [
          "example"
        ],
        "item_values": [
          "example"
        ]
      }
    ],
    "journal_url": "example",
    "status_messages_url": "https://www.example.com/log_file.txt"
  }
]

Show Automation Run

Endpoint

GET/automation_runs/{id}

Return Object

AutomationRun

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
id
int64
Required
Automation Run ID.

Example Request

curl https://app.files.com/api/rest/v1/automation_runs/{id}.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "completed_at": "2000-01-01T01:00:00Z",
  "created_at": "2000-01-01T01:00:00Z",
  "status": "success",
  "automation_id": 1,
  "automation_version_id": 1,
  "version": 1,
  "workspace_id": 1,
  "initiating_user_id": 1,
  "initiating_interface": "example",
  "cancel_requested_at": "2000-01-01T01:00:00Z",
  "retry_at": "2000-01-01T01:00:00Z",
  "retried_at": "2000-01-01T01:00:00Z",
  "retried_in_run_id": 1,
  "retry_of_run_id": 1,
  "rerun_of_run_id": 1,
  "rerun_from_node_id": "example",
  "runtime": 1.0,
  "successful_operations": 1,
  "failed_operations": 1,
  "definition": "example",
  "application_actions": "example",
  "node_states": "example",
  "execution_nodes": [
    {
      "node_id": "example",
      "node_type": "example",
      "status": "example",
      "run_stage": "example",
      "reused": true,
      "successful_operations": 1,
      "failed_operations": 1,
      "started_at": "2000-01-01T01:00:00Z",
      "completed_at": "2000-01-01T01:00:00Z",
      "duration_ms": 1,
      "inputs": [
        "example"
      ],
      "outputs": "example",
      "input_items": "example",
      "output_items": "example",
      "item_refs": [
        "example"
      ],
      "item_values": [
        "example"
      ]
    }
  ],
  "journal_url": "example",
  "status_messages_url": "https://www.example.com/log_file.txt"
}

Show a Shared Workflow run started by the recipient

Endpoint

GET/shared_workflows/{id}/runs/{run_id}

Return Object

AutomationRun

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
id
int64
Required
Shared Workflow ID.
run_id
int64
Required
ID of the run returned by the Shared Workflow submission.

Example Request

curl https://app.files.com/api/rest/v1/shared_workflows/{id}/runs/{run_id}.json \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "completed_at": "2000-01-01T01:00:00Z",
  "created_at": "2000-01-01T01:00:00Z",
  "status": "success",
  "automation_id": 1,
  "automation_version_id": 1,
  "version": 1,
  "workspace_id": 1,
  "initiating_user_id": 1,
  "initiating_interface": "example",
  "cancel_requested_at": "2000-01-01T01:00:00Z",
  "retry_at": "2000-01-01T01:00:00Z",
  "retried_at": "2000-01-01T01:00:00Z",
  "retried_in_run_id": 1,
  "retry_of_run_id": 1,
  "rerun_of_run_id": 1,
  "rerun_from_node_id": "example",
  "runtime": 1.0,
  "successful_operations": 1,
  "failed_operations": 1,
  "definition": "example",
  "application_actions": "example",
  "node_states": "example",
  "execution_nodes": [
    {
      "node_id": "example",
      "node_type": "example",
      "status": "example",
      "run_stage": "example",
      "reused": true,
      "successful_operations": 1,
      "failed_operations": 1,
      "started_at": "2000-01-01T01:00:00Z",
      "completed_at": "2000-01-01T01:00:00Z",
      "duration_ms": 1,
      "inputs": [
        "example"
      ],
      "outputs": "example",
      "input_items": "example",
      "output_items": "example",
      "item_refs": [
        "example"
      ],
      "item_values": [
        "example"
      ]
    }
  ],
  "journal_url": "example",
  "status_messages_url": "https://www.example.com/log_file.txt"
}

Re-run Automation from Node

Endpoint

POST/automation_runs/{id}/rerun

Return Object

AutomationRun

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
id
int64
Required
Automation Run ID.
node_id
string
Required
Node ID at which execution should resume.

Example Request

curl https://app.files.com/api/rest/v1/automation_runs/{id}/rerun.json \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"node_id":"node_id"}' \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "completed_at": "2000-01-01T01:00:00Z",
  "created_at": "2000-01-01T01:00:00Z",
  "status": "success",
  "automation_id": 1,
  "automation_version_id": 1,
  "version": 1,
  "workspace_id": 1,
  "initiating_user_id": 1,
  "initiating_interface": "example",
  "cancel_requested_at": "2000-01-01T01:00:00Z",
  "retry_at": "2000-01-01T01:00:00Z",
  "retried_at": "2000-01-01T01:00:00Z",
  "retried_in_run_id": 1,
  "retry_of_run_id": 1,
  "rerun_of_run_id": 1,
  "rerun_from_node_id": "example",
  "runtime": 1.0,
  "successful_operations": 1,
  "failed_operations": 1,
  "definition": "example",
  "application_actions": "example",
  "node_states": "example",
  "execution_nodes": [
    {
      "node_id": "example",
      "node_type": "example",
      "status": "example",
      "run_stage": "example",
      "reused": true,
      "successful_operations": 1,
      "failed_operations": 1,
      "started_at": "2000-01-01T01:00:00Z",
      "completed_at": "2000-01-01T01:00:00Z",
      "duration_ms": 1,
      "inputs": [
        "example"
      ],
      "outputs": "example",
      "input_items": "example",
      "output_items": "example",
      "item_refs": [
        "example"
      ],
      "item_values": [
        "example"
      ]
    }
  ],
  "journal_url": "example",
  "status_messages_url": "https://www.example.com/log_file.txt"
}

Cancel Automation Run

Endpoint

POST/automation_runs/{id}/cancel

Return Object

AutomationRun

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
id
int64
Required
Automation Run ID.

Example Request

curl https://app.files.com/api/rest/v1/automation_runs/{id}/cancel.json \
  -X POST \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "completed_at": "2000-01-01T01:00:00Z",
  "created_at": "2000-01-01T01:00:00Z",
  "status": "success",
  "automation_id": 1,
  "automation_version_id": 1,
  "version": 1,
  "workspace_id": 1,
  "initiating_user_id": 1,
  "initiating_interface": "example",
  "cancel_requested_at": "2000-01-01T01:00:00Z",
  "retry_at": "2000-01-01T01:00:00Z",
  "retried_at": "2000-01-01T01:00:00Z",
  "retried_in_run_id": 1,
  "retry_of_run_id": 1,
  "rerun_of_run_id": 1,
  "rerun_from_node_id": "example",
  "runtime": 1.0,
  "successful_operations": 1,
  "failed_operations": 1,
  "definition": "example",
  "application_actions": "example",
  "node_states": "example",
  "execution_nodes": [
    {
      "node_id": "example",
      "node_type": "example",
      "status": "example",
      "run_stage": "example",
      "reused": true,
      "successful_operations": 1,
      "failed_operations": 1,
      "started_at": "2000-01-01T01:00:00Z",
      "completed_at": "2000-01-01T01:00:00Z",
      "duration_ms": 1,
      "inputs": [
        "example"
      ],
      "outputs": "example",
      "input_items": "example",
      "output_items": "example",
      "item_refs": [
        "example"
      ],
      "item_values": [
        "example"
      ]
    }
  ],
  "journal_url": "example",
  "status_messages_url": "https://www.example.com/log_file.txt"
}

Run a Shared Workflow

Endpoint

POST/shared_workflows/{id}/run_workflow

Return Object

AutomationRun

Authorization Requirement

Available to all authenticated keys or sessions.

Request Parameters

ParameterDescription
id
int64
Required
Shared Workflow ID.
submission_revision
string
Required
Revision returned when opening the Shared Workflow.
submission_id
string
Required
Client-generated UUID used to retry the same submission without starting another run.
file_path
string
Required
Path of a file the recipient can read, including a file uploaded to a Snapshot created for this workflow.

Example Request

curl https://app.files.com/api/rest/v1/shared_workflows/{id}/run_workflow.json \
  -X POST \
  -H 'Content-Type: application/json' \
  -d '{"submission_revision":"submission_revision","submission_id":"submission_id","file_path":"file_path"}' \
  -H 'X-FilesAPI-Key: YOUR_API_KEY'

Example Response

{
  "id": 1,
  "completed_at": "2000-01-01T01:00:00Z",
  "created_at": "2000-01-01T01:00:00Z",
  "status": "success",
  "automation_id": 1,
  "automation_version_id": 1,
  "version": 1,
  "workspace_id": 1,
  "initiating_user_id": 1,
  "initiating_interface": "example",
  "cancel_requested_at": "2000-01-01T01:00:00Z",
  "retry_at": "2000-01-01T01:00:00Z",
  "retried_at": "2000-01-01T01:00:00Z",
  "retried_in_run_id": 1,
  "retry_of_run_id": 1,
  "rerun_of_run_id": 1,
  "rerun_from_node_id": "example",
  "runtime": 1.0,
  "successful_operations": 1,
  "failed_operations": 1,
  "definition": "example",
  "application_actions": "example",
  "node_states": "example",
  "execution_nodes": [
    {
      "node_id": "example",
      "node_type": "example",
      "status": "example",
      "run_stage": "example",
      "reused": true,
      "successful_operations": 1,
      "failed_operations": 1,
      "started_at": "2000-01-01T01:00:00Z",
      "completed_at": "2000-01-01T01:00:00Z",
      "duration_ms": 1,
      "inputs": [
        "example"
      ],
      "outputs": "example",
      "input_items": "example",
      "output_items": "example",
      "item_refs": [
        "example"
      ],
      "item_values": [
        "example"
      ]
    }
  ],
  "journal_url": "example",
  "status_messages_url": "https://www.example.com/log_file.txt"
}

The AutomationRun Object

Some of the endpoints above return a AutomationRun object. The attributes of this object are listed below.

AttributeDescription
id
int64
ID.
completed_at
date-time
Automation run completion/failure date/time.
created_at
date-time
Automation run start date/time.
status
string
The status of the AutomationRun. One of queued, running, success, partial_failure, failure, skipped, or canceled.
Possible values: running, success, partial_failure, failure, skipped, queued, canceled
automation_id
int64
ID of the associated Automation.
automation_version_id
int64
ID of the immutable Automation version pinned by this run.
version
int64
Pinned Automation v2 definition version.
workspace_id
int64
Workspace ID.
initiating_user_id
int64
User who initiated a Shared Workflow run.
initiating_interface
string
Interface from which the Shared Workflow was started.
cancel_requested_at
date-time
Date/time at which cancellation was requested.
retry_at
date-time
If set, this automation will be retried at this date/time due to failure or partial_failure.
retried_at
date-time
If set, this Automation run was retried due to failure or partial_failure.
retried_in_run_id
int64
ID of the run that is or will be retrying this run.
retry_of_run_id
int64
ID of the original run that this run is retrying.
rerun_of_run_id
int64
ID of the run whose persisted node outputs this run reused.
rerun_from_node_id
string
Node at which this run resumed execution.
runtime
double
Automation run runtime.
successful_operations
int64
Count of successful operations.
failed_operations
int64
Count of failed operations.
definition
object
Automation definition snapshot pinned by this run. For performance reasons, this is not provided when listing Automation runs.
application_actions
object
Normalized application action metadata keyed by pinned action fingerprint.
node_states
object
Status and execution stage for each node in this run. For performance reasons, this is not provided when listing Automation runs.
execution_nodes
array(object)
Execution status, timing, and bounded output summaries for each node. For performance reasons, this is not provided when listing Automation runs.
journal_url
string
Link to the run journal artifact.
status_messages_url
string
Link to status messages log file.

Example AutomationRun Object

{
  "id": 1,
  "completed_at": "2000-01-01T01:00:00Z",
  "created_at": "2000-01-01T01:00:00Z",
  "status": "success",
  "automation_id": 1,
  "automation_version_id": 1,
  "version": 1,
  "workspace_id": 1,
  "initiating_user_id": 1,
  "initiating_interface": "example",
  "cancel_requested_at": "2000-01-01T01:00:00Z",
  "retry_at": "2000-01-01T01:00:00Z",
  "retried_at": "2000-01-01T01:00:00Z",
  "retried_in_run_id": 1,
  "retry_of_run_id": 1,
  "rerun_of_run_id": 1,
  "rerun_from_node_id": "example",
  "runtime": 1.0,
  "successful_operations": 1,
  "failed_operations": 1,
  "definition": "example",
  "application_actions": "example",
  "node_states": "example",
  "execution_nodes": [
    {
      "node_id": "example",
      "node_type": "example",
      "status": "example",
      "run_stage": "example",
      "reused": true,
      "successful_operations": 1,
      "failed_operations": 1,
      "started_at": "2000-01-01T01:00:00Z",
      "completed_at": "2000-01-01T01:00:00Z",
      "duration_ms": 1,
      "inputs": [
        "example"
      ],
      "outputs": "example",
      "input_items": "example",
      "output_items": "example",
      "item_refs": [
        "example"
      ],
      "item_values": [
        "example"
      ]
    }
  ],
  "journal_url": "example",
  "status_messages_url": "https://www.example.com/log_file.txt"
}