# Browse GitHub source locations

Source: <https://everruns.com/docs/api/operations/get_agent_source_options/>

[Docs](https://everruns.com/docs/)/[API reference](https://everruns.com/docs/api/)/[Agents & authoring](https://everruns.com/docs/api/groups/agents-authoring/)/Browse GitHub source locations

# Browse GitHub source locations

Preview

Browse GitHub branches and Agent package paths.

Public APIEverruns Cloud and self-hosted Platform

POST`/v1/agents/{agent_id}/source/options`

See [authentication](https://everruns.com/docs/sre/runbooks/authentication/) for credentials and permissions.

## Parameters

### Path Parameters

**agent_id**

required

string

Prefixed public identifier

## Request Bodyrequired

Media typeapplication/json

Repository location to browse before selecting an Agent source package.

object

**branch**

Branch to browse; omitted uses the repository’s default branch.

string | null

### Example

```plaintext
main
```

**github_account**

One of:

* string

  Development GitHub account to read through; omitted prefers the caller’s own.

  string

  Allowed values: personal organization

* null

  null

**path**

Repository-relative directory to browse; empty selects the root.

string

### Example

```plaintext
agents
```

**repository**

required

GitHub repository in owner/name form.

string

### Example

```plaintext
acme/agents
```

## Responses

200Success

### 200

Success

Media typeapplication/json

### Example generated

```json
example
```

FetchcURL

Request

```js
const url = 'https://app.everruns.com/api/v1/agents/example/source/options';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"branch":"main","github_account":"personal","path":"agents","repository":"acme/agents"}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

Request

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/agents/example/source/options \
  --header 'Content-Type: application/json' \
  --data '{ "branch": "main", "github_account": "personal", "path": "agents", "repository": "acme/agents" }'
```

Additional language examples require JavaScript. The default request example is available above.

200

200 · Success

No response body example is declared for this status.

## Matching endpoints