> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.islo.dev/api-reference/factory/trigger-factory-line-run/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.islo.dev/_mcp/server. # Trigger a line run POST https://api.islo.dev/factory/lines/{name}/runs Content-Type: application/json Reference: https://docs.islo.dev/api-reference/factory/trigger-factory-line-run ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `name` (string, required) ### Body (application/json) This endpoint expects a LineRunCreate. - `version_id` (string, optional, nullable) — Deployed line version to run; defaults to latest - `region` (string, optional, nullable) — Compute region override - `params` (map from string to any, optional) - `trigger_payload` (map from string to any, optional) ## Response ### 202 Successful Response - `id` (string, required) - `line_name` (string, required) - `line_version_id` (string, required) - `workflow_run_id` (string, required) - `status` (string, required) - `trigger` (TriggerSummary, required) — What set a run off. `provider`, `event_name`, and `delivery_id` are lifted out of the nested `payload.trigger` object so a list row is readable without walking the envelope. The extracted trigger values are not repeated here; they land in the run's `run_params`. `payload` still carries the whole envelope, minus the raw webhook body on list responses. - `created_at` (datetime, required) - `region` (string, optional, nullable) - `run_params` (map from string to any, optional) - `result_payload` (map from string to any, optional, nullable) - `error_message` (string, optional, nullable) - `iteration_count` (integer, optional, default: 0) - `budget_used_usd` (string, optional, nullable) - `compute_cost_cents` (integer, optional, default: 0) - `inference_cost_cents` (integer, optional, default: 0) - `total_cost_cents` (integer, optional, default: 0) - `cost_rated_at` (datetime, optional, nullable) - `retry` (LineRunRetryAction, optional, nullable) - `stages` (list of LineRunStageDetail, optional) - `failure` (LineRunFailure, optional, nullable) — Why a line run ended, and which step surfaced it. Orchestrator classification (``code``, ``domain``) is written into ``result_payload`` on terminal paths. Step diagnostics are enriched in by the API without replacing those fields. Read out of ``result_payload`` rather than carried as its own request field. ``api`` and ``workflow-handlers`` are separate Deployments with no rollout ordering, so a new key on a request body is rejected by whichever old pods are still serving — and on ``LineControlWaitRequest``, which forbids extras, that rejection would finalize a succeeded run as failed. Unknown keys are tolerated for the same reason, in the other direction: a later orchestrator that adds a field here must not make every failure read as unclassified while the rollout is in flight. - `triggered_by_actor` (map from string to any, optional, nullable) - `started_at` (datetime, optional, nullable) - `completed_at` (datetime, optional, nullable) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### TriggerSummary What set a run off. `provider`, `event_name`, and `delivery_id` are lifted out of the nested `payload.trigger` object so a list row is readable without walking the envelope. The extracted trigger values are not repeated here; they land in the run's `run_params`. `payload` still carries the whole envelope, minus the raw webhook body on list responses. - `source` (string, required) - `provider` (string, optional, nullable) - `event_name` (string, optional, nullable) - `delivery_id` (string, optional, nullable) - `payload` (map from string to any, optional) ### LineRunRetryAction - `stage_name` (string, required) ### LineRunStageDetail - `stage_name` (string, required) - `stage_order` (integer, required) - `iteration` (integer, required) - `status` (string, required) - `outcome` (string, optional, nullable) - `job_run_id` (string, optional, nullable) - `compute_cost_cents` (integer, optional, default: 0) - `inference_cost_cents` (integer, optional, default: 0) - `total_cost_cents` (integer, optional, default: 0) - `cost_rated_at` (datetime, optional, nullable) - `started_at` (datetime, optional, nullable) - `completed_at` (datetime, optional, nullable) - `artifact_count` (integer, optional, default: 0) - `input_payload` (map from string to any, optional) - `result_payload` (map from string to any, optional, nullable) - `artifacts` (list of map from string to any, optional) ### LineRunFailure Why a line run ended, and which step surfaced it. Orchestrator classification (``code``, ``domain``) is written into ``result_payload`` on terminal paths. Step diagnostics are enriched in by the API without replacing those fields. Read out of ``result_payload`` rather than carried as its own request field. ``api`` and ``workflow-handlers`` are separate Deployments with no rollout ordering, so a new key on a request body is rejected by whichever old pods are still serving — and on ``LineControlWaitRequest``, which forbids extras, that rejection would finalize a succeeded run as failed. Unknown keys are tolerated for the same reason, in the other direction: a later orchestrator that adds a field here must not make every failure read as unclassified while the rollout is in flight. - `code` (enum, optional, nullable) — What specifically went wrong, one level below the domain. - Allowed values: `manifest_no_stages`, `manifest_trigger_invalid`, `unknown_stage`, `no_route`, `ambiguous_transition`, `ambiguous_agentic_transition`, `transition_params_invalid`, `max_iterations_exhausted`, `job_result_invalid`, `job_outputs_invalid`, `stage_params_invalid`, `line_state_invalid`, `dispatch_failed`, `control_payload_invalid`, `control_target_invalid`, `control_missing_id`, `control_wait_expired`, `control_wait_unknown_selection`, `control_stop_not_applied`, `retry_snapshot_invalid`, `stage_failed`, `routing_wait_expired`, `user_cancelled`, `unknown` - `domain` (enum, optional) — Who owns the fix for a failed line run. - Allowed values: `platform`, `config`, `contract`, `infra`, `agent`, `user`, `unknown` - `error_code` (string, optional, nullable) - `failure_class` (string, optional, nullable) - `error_message` (string, optional, nullable) - `error_details` (map from string to any, optional, nullable) - `stage_name` (string, optional, nullable) - `stage_step` (string, optional, nullable) - `task_name` (string, optional, nullable) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) - `input` (any, optional) - `ctx` (ValidationErrorCtx, optional) ### ValidationErrorLocItems ### ValidationErrorCtx ## Examples **Request** ```json {} ``` **Response** ```json { "id": "string", "line_name": "string", "line_version_id": "string", "workflow_run_id": "string", "status": "string", "trigger": { "source": "string", "provider": "string", "event_name": "string", "delivery_id": "string", "payload": {} }, "created_at": "2024-01-15T09:30:00Z", "region": "string", "run_params": {}, "result_payload": {}, "error_message": "string", "iteration_count": 0, "budget_used_usd": "string", "compute_cost_cents": 0, "inference_cost_cents": 0, "total_cost_cents": 0, "cost_rated_at": "2024-01-15T09:30:00Z", "retry": { "stage_name": "string" }, "stages": [ { "stage_name": "string", "stage_order": 1, "iteration": 1, "status": "string", "outcome": "string", "job_run_id": "string", "compute_cost_cents": 0, "inference_cost_cents": 0, "total_cost_cents": 0, "cost_rated_at": "2024-01-15T09:30:00Z", "started_at": "2024-01-15T09:30:00Z", "completed_at": "2024-01-15T09:30:00Z", "artifact_count": 0, "input_payload": {}, "result_payload": {}, "artifacts": [ {} ] } ], "failure": { "code": "manifest_no_stages", "domain": "platform", "error_code": "string", "failure_class": "string", "error_message": "string", "error_details": {}, "stage_name": "string", "stage_step": "string", "task_name": "string" }, "triggered_by_actor": {}, "started_at": "2024-01-15T09:30:00Z", "completed_at": "2024-01-15T09:30:00Z" } ``` **SDK Code** ```python import requests url = "https://api.islo.dev/factory/lines/name/runs" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.islo.dev/factory/lines/name/runs'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.islo.dev/factory/lines/name/runs" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://api.islo.dev/factory/lines/name/runs") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.islo.dev/factory/lines/name/runs") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://api.islo.dev/factory/lines/name/runs', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.islo.dev/factory/lines/name/runs"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.islo.dev/factory/lines/name/runs")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```