API

AgentPullRequest

Operations

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

Method Route SDK operation Returns
GET /api/v1/organizations/{organization_id}/agents/{id}/spark/pull_requests list Pull requests with current GitHub status and owning conversations

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:

agent_pull_requests, err := client.AgentPullRequest(nil).List(map[string]any{"agent_id": "example", "organization_id": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(agent_pull_requests)

Lua

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

local agent_pull_requests, err = client:AgentPullRequest():list({ agent_id = "example", organization_id = "example" })

PHP

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

$agent_pull_requests = $client->AgentPullRequest()->list(["agent_id" => "example", "organization_id" => "example"]);

Python

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

agent_pull_requests = client.AgentPullRequest().list({"agent_id": "example", "organization_id": "example"})

Ruby

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

agent_pull_requests = client.AgentPullRequest.list({ "agent_id" => "example", "organization_id" => "example" })

TypeScript

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

const agent_pull_requests = await client.AgentPullRequest().list({ agent_id: "example", organization_id: "example" })

Fields

Field Type Required Description
id string Yes Id
number integer Yes Number
owners array Yes Owners
repository string Yes Repository
status string Yes Status
title string Yes Title
url string Yes Url

list

GET /api/v1/organizations/{organization_id}/agents/{id}/spark/pull_requests

Operation ID: spark_pull_requests_api_v1_organization_persistent_agent.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
organization_id path string Yes
id path string Yes
scope query enum: opened No
cursor query string No

Responses

200: Pull requests with current GitHub status and owning conversations

application/json

Property Type Required Description
items array of object Yes
items[].id string Yes
items[].number integer Yes
items[].owners array of object Yes
items[].owners[].id string Yes
items[].owners[].kind enum: conversation, subagent Yes
items[].owners[].relationship enum: created, monitored No
items[].owners[].title string Yes
items[].repository string Yes
items[].status enum: open, draft, merged, closed, unavailable Yes
items[].title string Yes
items[].url string (uri) Yes
next_cursor string,null Yes
total_count integer No Total visible recorded openings when scope is opened.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway