> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.islo.dev/api-reference/jobs/stop-job-run/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.islo.dev/_mcp/server. # Stop a job run POST https://api.islo.dev/jobs/{name}/runs/{run_id}/stop Content-Type: application/json Reference: https://docs.islo.dev/api-reference/jobs/stop-job-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) - `run_id` (string, required) ### Body (application/json) This endpoint expects a JobRunStopRequest. - `reason` (string, optional, nullable) ## Response ### 202 Successful Response - `id` (string, required) - `job_name` (string, required) - `job_version_id` (string, required) - `status` (string, required) - `region` (string, required, nullable) - `run_params` (map from string to any, required) - `result_payload` (map from string to any, required, nullable) - `step_timeline` (list of JobRunStepTimelineEntry, required) - `artifact_refs` (list of ArtifactRef, required) - `started_at` (datetime, required, nullable) - `completed_at` (datetime, required, nullable) - `error_message` (string, required, nullable) - `created_at` (datetime, required) - `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) - `error_code` (string, optional, nullable) - `error_details` (map from string to any, optional, nullable) - `failure_class` (string, optional, nullable) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### JobRunStepTimelineEntry - `name` (string, required) - `action` (string, required) - `status` (string, required) - `task_name` (string, required) - `sandbox_name` (string, optional, nullable) - `agent_session_id` (string, optional, nullable) - `started_at` (datetime, optional, nullable) - `completed_at` (datetime, optional, nullable) - `error_message` (string, optional, nullable) - `error_code` (string, optional, nullable) - `error_details` (map from string to any, optional, nullable) - `failure_class` (string, optional, nullable) - `exit_code` (integer, optional, nullable) - `compute_command_id` (string, optional, nullable) ### ArtifactRef Durable external resource created or materially changed by a job step. - `type` (string, required) — Resource type, normally external_ref.kind - `provider` (string, required) — Must match external_ref.provider - `external_ref` (ArtifactRefExternalRef, required) — Stable provider-specific identity - `operation` (string, optional, nullable) — What the step did, such as created, updated, or published - `url` (string, optional, nullable) — Canonical resource URL - `title` (string, optional, nullable) - `status` (string, optional, nullable) - `metadata` (map from string to any, optional) — Provider-specific details that are not identity ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) - `input` (any, optional) - `ctx` (ValidationErrorCtx, optional) ### ArtifactRefExternalRef Stable provider-specific identity - `provider`: `github` (GitHubExternalRef) - `kind` (string, required) - `id` (string, optional, nullable) - `node_id` (string, optional, nullable) - `number` (integer, optional, nullable) - `owner` (string, optional, nullable) - `repo` (string, optional, nullable) - `provider`: `islo` (IsloKnowledgeItemExternalRef) - `slug` (string, required) - `kind` ("knowledge_item", optional, default: knowledge_item) - `provider`: `jira` (JiraExternalRef) - `id` (string, optional, nullable) - `key` (string, optional, nullable) - `kind` (string, optional, default: issue) - `project` (string, optional, nullable) - `site` (string, optional, nullable) — Atlassian site hostname, e.g. myteam.atlassian.net - `provider`: `linear` (LinearExternalRef) - `id` (string, optional, nullable) - `identifier` (string, optional, nullable) - `issue_id` (string, optional, nullable) - `kind` (string, optional, default: issue) - `team` (string, optional, nullable) - `provider`: `slack` (SlackMessageExternalRef) - `channel` (string, required) - `ts` (string, required) - `kind` ("message", optional, default: message) - `provider`: `url` (UrlExternalRef) - `url` (string, required) — Public HTTP(S) URL - `display_hint` (DisplayHint, optional, nullable) — Optional safe display metadata for richer rendering of unknown URL artifacts - `kind` ("url", optional, default: url) ### ValidationErrorLocItems ### ValidationErrorCtx ### DisplayHint Safe display metadata for unknown URL artifacts. - `title` (string, optional, nullable) - `icon_url` (string, optional, nullable) — HTTPS-only icon URL for rendering - `provider_name` (string, optional, nullable) ## Examples **Request** ```json {} ``` **Response** ```json { "id": "string", "job_name": "string", "job_version_id": "string", "status": "string", "region": "string", "run_params": {}, "result_payload": {}, "step_timeline": [ { "name": "string", "action": "string", "status": "string", "task_name": "string", "sandbox_name": "string", "agent_session_id": "string", "started_at": "2024-01-15T09:30:00Z", "completed_at": "2024-01-15T09:30:00Z", "error_message": "string", "error_code": "string", "error_details": {}, "failure_class": "string", "exit_code": 1, "compute_command_id": "string" } ], "artifact_refs": [ { "type": "string", "provider": "string", "external_ref": { "provider": "string", "kind": "string", "owner": "string", "repo": "string", "number": 1, "node_id": "string", "id": "string" }, "operation": "string", "url": "string", "title": "string", "status": "string", "metadata": {} } ], "started_at": "2024-01-15T09:30:00Z", "completed_at": "2024-01-15T09:30:00Z", "error_message": "string", "created_at": "2024-01-15T09:30:00Z", "compute_cost_cents": 0, "inference_cost_cents": 0, "total_cost_cents": 0, "cost_rated_at": "2024-01-15T09:30:00Z", "error_code": "string", "error_details": {}, "failure_class": "string" } ``` **SDK Code** ```python import requests url = "https://api.islo.dev/jobs/name/runs/run_id/stop" 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/jobs/name/runs/run_id/stop'; 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/jobs/name/runs/run_id/stop" 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/jobs/name/runs/run_id/stop") 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/jobs/name/runs/run_id/stop") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://api.islo.dev/jobs/name/runs/run_id/stop', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.islo.dev/jobs/name/runs/run_id/stop"); 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/jobs/name/runs/run_id/stop")! 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() ```