Interlaken
API referenceApplicationsApplications

The agent's "done": in pull-request mode opens the pull request for a human; in main mode merges the branch into the tracked branch with no pull request

POST
/api/v1/applications/{id}/chats/{chat}/finish

Requires the apps:manage permission.

Refused (409) when the chat's latest proposal run did not succeed, in either mode. The mode is the change request's ship_mode (the application's default unless overridden when it was started). Finishing twice is a no-op.

Authorization

AuthorizationBearer <token>

An access token from this zone's POST /oauth/token, or a session token from POST /api/v1/auth/login. Send it as Authorization: Bearer <token>.

In: header

Path Parameters

id*string
chat*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/applications/string/chats/string/finish" \  -H "Content-Type: application/json" \  -d '{}'
{  "agent_gone": true,  "base": "string",  "branch": "string",  "created_at": "2019-08-24T14:15:22Z",  "decided_by": "string",  "environment": "string",  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "kind": "string",  "pr_number": 0,  "pr_url": "string",  "reason": "string",  "ref_id": "58ed4a6c-926f-4b2f-b688-ecd86db2ed34",  "run_id": "dded282c-8ebd-44cf-8ba5-9a234973d1ec",  "ship_mode": "string",  "source": "string",  "state": "string",  "title": "string",  "updated_at": "2019-08-24T14:15:22Z"}