API

RoderCodeRepair

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/agent/roder/code_repairs/{id}/cancel create Investigation launch record
POST /api/v1/agent/roder/code_repairs create Investigation launch record
GET /api/v1/agent/roder/code_repairs/{id} load Investigation launch record
GET /api/v1/agent/roder/code_repairs load Investigation launch record

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

roder_code_repair, err := client.RoderCodeRepair(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(roder_code_repair)
created, err := client.RoderCodeRepair(nil).Create(map[string]any{"base_sha": "example", "organization_id": "example", "repository_slug": "example", "scenario_run_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local roder_code_repair, err = client:RoderCodeRepair():load({ id = "example_id" })
local created, err = client:RoderCodeRepair():create({ base_sha = "example", organization_id = "example", repository_slug = "example", scenario_run_id = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$roder_code_repair = $client->RoderCodeRepair()->load(["id" => "example_id"]);
$created = $client->RoderCodeRepair()->create(["base_sha" => "example", "organization_id" => "example", "repository_slug" => "example", "scenario_run_id" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

roder_code_repair = client.RoderCodeRepair().load({"id": "example_id"})
created = client.RoderCodeRepair().create({ "base_sha": "example", "organization_id": "example", "repository_slug": "example", "scenario_run_id": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

roder_code_repair = client.RoderCodeRepair.load({ "id" => "example_id" })
created = client.RoderCodeRepair.create({ "base_sha" => "example", "organization_id" => "example", "repository_slug" => "example", "scenario_run_id" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const roder_code_repair = await client.RoderCodeRepair().load({ id: "example_id" })
const created = await client.RoderCodeRepair().create({ base_sha: "example", organization_id: "example", repository_slug: "example", scenario_run_id: "example" })

Fields

Field Type Required Description
base_sha string Yes Base Sha
cancel_requested boolean Yes Cancel Requested
failure_code one,string,null Yes Failure Code
id string Yes Id
launch_state string Yes Launch State
organization_id string Yes Organization Id
repository_slug string Yes Repository Slug
roder_thread_id one,string,null Yes Roder Thread Id
roder_turn_id one,string,null Yes Roder Turn Id
scenario_run_id string Yes Scenario Run Id
task one,object,null Yes Task
trigger_kind string Yes Trigger Kind

create

POST /api/v1/agent/roder/code_repairs/{id}/cancel

Operation ID: cancel_api_v1_code_repair.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Request body

application/json

The request body is object.

Responses

202: Investigation launch record

application/json

Property Type Required Description
base_sha string Yes
cancel_requested boolean Yes
failure_code string Yes
id string Yes
launch_state enum: queued, starting, started, unknown, failed, cancelled Yes
roder_thread_id string Yes
roder_turn_id string Yes
scenario_run_id string Yes
task object Yes
task.status string Yes
task.text string Yes
task.turn_id string Yes
trigger_kind enum: manual, automatic Yes
403: Internal operator access is required
404: Investigation is unavailable to this operator
422: Original workspace authority is unavailable
503: Cancellation recorded; interruption could not be confirmed with Roder

POST /api/v1/agent/roder/code_repairs

Operation ID: api_v1_code_repairs.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
base_sha string Yes
organization_id string Yes
repository_slug string Yes
scenario_run_id string Yes

Responses

202: Investigation launch record

application/json

Property Type Required Description
base_sha string Yes
cancel_requested boolean Yes
failure_code string Yes
id string Yes
launch_state enum: queued, starting, started, unknown, failed, cancelled Yes
roder_thread_id string Yes
roder_turn_id string Yes
scenario_run_id string Yes
task object Yes
task.status string Yes
task.text string Yes
task.turn_id string Yes
trigger_kind enum: manual, automatic Yes
403: Internal operator access is required
404: Source organization or scenario is unavailable
422: Disabled, ineligible, invalid or conflicting request

load

GET /api/v1/agent/roder/code_repairs/{id}

Operation ID: api_v1_code_repair.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
id path string Yes

Responses

200: Investigation launch record

application/json

Property Type Required Description
base_sha string Yes
cancel_requested boolean Yes
failure_code string Yes
id string Yes
launch_state enum: queued, starting, started, unknown, failed, cancelled Yes
roder_thread_id string Yes
roder_turn_id string Yes
scenario_run_id string Yes
task object Yes
task.status string Yes
task.text string Yes
task.turn_id string Yes
trigger_kind enum: manual, automatic Yes
403: Internal operator access is required
404: Investigation is unavailable to this operator
422: Original workspace authority is unavailable
503: Roder status is temporarily unavailable; no new task was started

GET /api/v1/agent/roder/code_repairs

Operation ID: api_v1_roder_code_repairs.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
scenario_run_id query string Yes

Responses

200: Investigation launch record

application/json

Property Type Required Description
base_sha string Yes
cancel_requested boolean Yes
failure_code string Yes
id string Yes
launch_state enum: queued, starting, started, unknown, failed, cancelled Yes
roder_thread_id string Yes
roder_turn_id string Yes
scenario_run_id string Yes
task object Yes
task.status string Yes
task.text string Yes
task.turn_id string Yes
trigger_kind enum: manual, automatic Yes
400: Scenario execution is required
403: Internal operator access is required
404: Investigation is unavailable to this operator
422: Source organization authority is unavailable