> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://ref.scoutos.com/api-sdk/endpoints/workflow-logs/get-details/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://ref.scoutos.com/_mcp/server. # Get workflow log details GET https://api.scoutos.com/v2/run_logs/details Get full log details for a specific workflow run. Requires either session_id or workflow_run_id to identify the log. Reference: https://ref.scoutos.com/api-sdk/endpoints/workflow-logs/get-details ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Query parameters - `workflow_id` (string, required) — The workflow ID - `session_id` (string, optional, nullable) — The session ID to identify the log. Either session_id or workflow_run_id must be provided. - `workflow_run_id` (string, optional, nullable) — The workflow run ID to identify the log. Either session_id or workflow_run_id must be provided. ## Response ### 200 Successful Response - `workflow_display_name` (string, required) - `workflow_run_id` (string, required) - `workflow_id` (string, required) - `status` (string, required) - `session_id` (string, required) - `cost` (double, required) - `blocks` (map from string to BlockRun, required) - `output` (any, required) - `elapsed_time_ms` (integer, required) - `timestamp_start` (datetime, required) - `timestamp_end` (datetime, required) - `environment` (string, optional, nullable) - `revision_id` (string, optional, nullable) - `message` (string, optional, default: ) - `gcs_log_path` (string, optional, nullable) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### BlockRun - `block_archetype_id` (string, required) - `block_type` (string, required) - `block_id` (string, required) - `block_inputs` (BlockRunBlockInputs, required) - `block_output` (any, required) - `config` (BlockRunConfig, required) - `block_display_name` (string, optional, default: ) - `metadata` (BlockRunMetadata, optional) - `elapsed_time_ms` (integer, optional, default: 0) - `cost` (double, optional, default: 0) - `message` (string, optional, default: ) - `workflow_state` (BlockRunWorkflowState, optional) - `status` (string, optional, default: unknown) - `timestamp_start` (datetime, optional, nullable) - `timestamp_end` (datetime, optional, nullable) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) ### BlockRunBlockInputs ### BlockRunConfig ### BlockRunMetadata ### BlockRunWorkflowState ### ValidationErrorLocItems ## Examples **Response** ```json { "workflow_display_name": "Data Ingestion Pipeline", "workflow_run_id": "run_20240115_093000_abc123", "workflow_id": "wf_9a8b7c6d5e4f3g2h1i0j", "status": "completed", "session_id": "sess_1234567890abcdef", "cost": 3.75, "blocks": { "block_1": { "block_archetype_id": "arch_001", "block_type": "extract", "block_id": "block_1", "block_inputs": { "source": "user_database", "query": "SELECT * FROM users WHERE active = true" }, "block_output": { "rows_extracted": 1500, "status": "success" }, "config": { "retry": 3, "timeout_seconds": 300 }, "block_display_name": "Extract User Data", "metadata": { "executed_by": "system", "priority": "high" }, "elapsed_time_ms": 120000, "cost": 1.25, "message": "Extraction completed without errors.", "workflow_state": { "step": "extraction" }, "status": "success", "timestamp_start": "2024-01-15T09:30:00Z", "timestamp_end": "2024-01-15T09:32:00Z" }, "block_2": { "block_archetype_id": "arch_002", "block_type": "transform", "block_id": "block_2", "block_inputs": { "input_format": "json", "transformation_rules": [ "normalize_names", "filter_inactive" ] }, "block_output": { "rows_transformed": 1450, "status": "success" }, "config": { "retry": 2, "timeout_seconds": 600 }, "block_display_name": "Transform User Data", "metadata": { "executed_by": "transform_service", "priority": "medium" }, "elapsed_time_ms": 180000, "cost": 1.5, "message": "Transformation applied successfully.", "workflow_state": { "step": "transformation" }, "status": "success", "timestamp_start": "2024-01-15T09:32:00Z", "timestamp_end": "2024-01-15T09:35:00Z" } }, "output": { "total_rows_processed": 1450, "result_status": "success" }, "elapsed_time_ms": 300000, "timestamp_start": "2024-01-15T09:30:00Z", "timestamp_end": "2024-01-15T09:35:00Z", "environment": "production", "revision_id": "rev_20240110_01", "message": "Workflow completed successfully.", "gcs_log_path": "gs://scoutos-logs/workflows/wf_9a8b7c6d5e4f3g2h1i0j/run_20240115_093000_abc123/log.txt" } ``` **SDK Code** ```python import requests url = "https://api.scoutos.com/v2/run_logs/details" querystring = {"workflow_id":"workflow_id"} headers = {"Authorization": "Bearer "} response = requests.get(url, headers=headers, params=querystring) print(response.json()) ``` ```typescript import { ScoutClient } from "scoutos"; const client = new ScoutClient({ apiKey: "YOUR_API_KEY" }); await client.workflowLogs.getDetails({ workflow_id: "workflow_id", session_id: "session_id", workflow_run_id: "workflow_run_id" }); ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.scoutos.com/v2/run_logs/details?workflow_id=workflow_id" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "Bearer ") 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.scoutos.com/v2/run_logs/details?workflow_id=workflow_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.scoutos.com/v2/run_logs/details?workflow_id=workflow_id") .header("Authorization", "Bearer ") .asString(); ``` ```php request('GET', 'https://api.scoutos.com/v2/run_logs/details?workflow_id=workflow_id', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.scoutos.com/v2/run_logs/details?workflow_id=workflow_id"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.scoutos.com/v2/run_logs/details?workflow_id=workflow_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers 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() ```