레퍼런스HTTP APIAgents

The agent's GitHub switch, settings and what may be turned on

GET
/v1/agents/{id}/github

enabled is the switch that applies at once (PUT …/github/enabled). github is the agent's own GitHub settings, or the active release's pin while the agent has none; null when neither exists, when legacy_defaults is what a first save starts from (no repository, push approval off, nothing optional; the release itself keeps asking a person before each push until settings are saved). settings_revision is the row's revision (null without a row) and start_repository_id a repository kept for compatibility: once the agent has a settings row, a session naming none starts without a repository whatever this holds, and attaches what the task needs. push_attached (allow, ask or deny) says whether a push to a repository the session attached needs a person: the row's value, ask for a row saved before the field existed, and allow while there is no row (what a first save writes). Settings are saved with PUT …/github/settings, never as a release. options.repositories lists the catalog's GitHub repositories with why one cannot be picked (repository_not_allowed by the workspace's repository ceiling; repository_ceiling_unset is true while the workspace has none yet, and the list is then judged against the default the first save writes, without writing it on this read), and installed: whether the author and the reviewer App are installed on each, as GitHub answers now (null when there is no such App or no answer). options.features says, per optional permission, why it cannot be turned on: github_host_unsupported (every chosen repository is on a GitHub Enterprise host), over_workspace_ceiling, no_reviewer_app, or app_permission_missing (the App's permissions as last read lack it; the token request decides). Whoever manages the agent reads it, and so do the live members of its managing team.

Auth: cookie session only; no scope.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Path Parameters

id*string

The agent's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Response Body

The switch, the pinned settings and the options.

application/json
  1. response
enabled*boolean
active_release_id*string|null
github*|null
settings_revision*|null
selected_repositories?array<>
start_repository_id*string|null
push_attached*string
Value in"allow""ask""deny"
legacy_defaults*|null
options*
Example Request
curl -X GET 'https://example.com/v1/agents/497f6eca-6276-4993-bfeb-53cbbbba6f08/github'
Example Response
{  "enabled": true,  "active_release_id": "rel_example",  "settings_revision": 3,  "start_repository_id": "werft-sandbox",  "push_attached": "allow",  "github": {    "repositories": [      "werft-sandbox"    ],    "push_approval": true,    "features": {      "workflows": false,      "actions": true,      "checks": false,      "issues": false,      "review": false    },    "actions_allow": [      {        "workflow": "ci.yml",        "ref": "release/*"      }    ]  },  "legacy_defaults": null,  "options": {    "repository_ceiling_unset": false,    "repositories": [      {        "id": "werft-sandbox",        "url": "https://github.com/example/werft-sandbox",        "available": true,        "reason": null,        "installed": {          "author": true,          "reviewer": null        }      }    ],    "features": {      "workflows": {        "available": false,        "reason": "app_permission_missing"      },      "actions": {        "available": true,        "reason": null      },      "checks": {        "available": false,        "reason": "over_workspace_ceiling"      },      "issues": {        "available": false,        "reason": "over_workspace_ceiling"      },      "review": {        "available": false,        "reason": "no_reviewer_app"      }    }  }}