---
title: "terminateRepoExtensionInstallationWorkflowRun"
---

> Documentation Index
> Fetch the complete documentation index at: https://buildrforge.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# terminateRepoExtensionInstallationWorkflowRun

Path: Forge API › extensions

`POST /repos/{repo_id}/extension-installations/{name}/workflow-runs/{run_id}/terminate`

Stop a workflow run of the installation that hasn't finished and answer it terminated; a step already under way may finish, but the run records nothing more. A finished run is refused.

## Path parameters

- `repo_id` (`terminateRepoExtensionInstallationWorkflowRun.path.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `name` (`terminateRepoExtensionInstallationWorkflowRun.path.name`; string, required)
  - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
- `run_id` (`terminateRepoExtensionInstallationWorkflowRun.path.run_id`; string, required)
  - pattern: `^extension_workflow_run_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/repos/<repo_id>/extension-installations/<name>/workflow-runs/<run_id>/terminate'
```

### TypeScript

```typescript
const url = '<base-url>/repos/<repo_id>/extension-installations/<name>/workflow-runs/<run_id>/terminate';
const options = {method: 'POST'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/repos/<repo_id>/extension-installations/<name>/workflow-runs/<run_id>/terminate"

response = requests.post(url)

print(response.text)
```

## Responses

### 200

ExtensionWorkflowRun

#### Example

```json
{
  "id": "string",
  "extension_name": "string",
  "version": "string",
  "branch": "string",
  "workflow": "string",
  "key": "string",
  "enqueued_by_id": "string",
  "enqueued_by_extension": "string",
  "status": "queued",
  "waiting_for_signal": "string",
  "signal_sequence": -9007199254740991,
  "input": null,
  "output": {},
  "failure": "string",
  "queued_at": "string",
  "started_at": "string",
  "finished_at": "string"
}
```

- `id` (`terminateRepoExtensionInstallationWorkflowRun.response.200.id`; string, required)
  - pattern: `^extension_workflow_run_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `extension_name` (`terminateRepoExtensionInstallationWorkflowRun.response.200.extension_name`; string, required)
  - maxLength: `129` · pattern: `^[a-z0-9]+(?:-[a-z0-9]+)*\.[a-z0-9]+(?:-[a-z0-9]+)*$`
- `version` (`terminateRepoExtensionInstallationWorkflowRun.response.200.version`; any of, required)
  - any of the following: `string`, `string`
- `branch` (`terminateRepoExtensionInstallationWorkflowRun.response.200.branch`; string, required)
  - minLength: `1`
- `workflow` (`terminateRepoExtensionInstallationWorkflowRun.response.200.workflow`; string, required)
  - minLength: `1`
- `key` (`terminateRepoExtensionInstallationWorkflowRun.response.200.key`; string, required)
  - minLength: `1`
- `enqueued_by_id` (`terminateRepoExtensionInstallationWorkflowRun.response.200.enqueued_by_id`; string, required)
  - pattern: `^(?:user|extension)_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `enqueued_by_extension` (`terminateRepoExtensionInstallationWorkflowRun.response.200.enqueued_by_extension`; any of, required)
  - any of the following: `string`, `null`
- `status` (`terminateRepoExtensionInstallationWorkflowRun.response.200.status`; string, required)
  - one of `"queued"`, `"running"`, `"waiting"`, `"complete"`, `"errored"`, `"terminated"`
- `waiting_for_signal` (`terminateRepoExtensionInstallationWorkflowRun.response.200.waiting_for_signal`; any of, required)
  - any of the following: `string`, `null`
- `signal_sequence` (`terminateRepoExtensionInstallationWorkflowRun.response.200.signal_sequence`; integer, required)
  - maximum: `9007199254740991` · minimum: `-9007199254740991`
- `input` (`terminateRepoExtensionInstallationWorkflowRun.response.200.input`; unknown, required)
- `output` (`terminateRepoExtensionInstallationWorkflowRun.response.200.output`; any of, required)
  - any of the following: `Option 1`, `null`
- `failure` (`terminateRepoExtensionInstallationWorkflowRun.response.200.failure`; any of, required)
  - any of the following: `string`, `null`
- `queued_at` (`terminateRepoExtensionInstallationWorkflowRun.response.200.queued_at`; string, required)
- `started_at` (`terminateRepoExtensionInstallationWorkflowRun.response.200.started_at`; any of, required)
  - any of the following: `string`, `null`
- `finished_at` (`terminateRepoExtensionInstallationWorkflowRun.response.200.finished_at`; any of, required)
  - any of the following: `string`, `null`

### 400

InvalidRequest

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

- `_tag` (`terminateRepoExtensionInstallationWorkflowRun.response.400._tag`; string, required)
  - one of `"InvalidRequest"`
- `part` (`terminateRepoExtensionInstallationWorkflowRun.response.400.part`; string, required)
  - one of `"path"`, `"query"`, `"headers"`, `"body"`
- `issues` (`terminateRepoExtensionInstallationWorkflowRun.response.400.issues`; array of object, required)
  - `path` (`terminateRepoExtensionInstallationWorkflowRun.response.400.issues.path`; array\<any of\>, required)
    - any of the following: `string`, `integer`
  - `message` (`terminateRepoExtensionInstallationWorkflowRun.response.400.issues.message`; string, required)

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`terminateRepoExtensionInstallationWorkflowRun.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

ExtensionInstallationNotFound | ExtensionWorkflowRunNotFound | RepoNotFound

#### Example

```json
{
  "_tag": "ExtensionInstallationNotFound",
  "extension_name": "string",
  "message": "string"
}
```

Any of the following:

- `ExtensionInstallationNotFoundEncoded`
  - `_tag` (`ExtensionInstallationNotFoundEncoded._tag`; string, required)
    - one of `"ExtensionInstallationNotFound"`
  - `extension_name` (`ExtensionInstallationNotFoundEncoded.extension_name`; string, required)
    - minLength: `1`
  - `message` (`ExtensionInstallationNotFoundEncoded.message`; string, required)
- `ExtensionWorkflowRunNotFoundEncoded`
  - `_tag` (`ExtensionWorkflowRunNotFoundEncoded._tag`; string, required)
    - one of `"ExtensionWorkflowRunNotFound"`
  - `run_id` (`ExtensionWorkflowRunNotFoundEncoded.run_id`; string, required)
    - pattern: `^extension_workflow_run_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`

### 409

ExtensionWorkflowRunFinished

#### Example

```json
{
  "_tag": "ExtensionWorkflowRunFinished",
  "run_id": "string",
  "status": "complete"
}
```

- `_tag` (`terminateRepoExtensionInstallationWorkflowRun.response.409._tag`; string, required)
  - one of `"ExtensionWorkflowRunFinished"`
- `run_id` (`terminateRepoExtensionInstallationWorkflowRun.response.409.run_id`; string, required)
  - pattern: `^extension_workflow_run_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `status` (`terminateRepoExtensionInstallationWorkflowRun.response.409.status`; string, required)
  - one of `"complete"`, `"errored"`, `"terminated"`

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`terminateRepoExtensionInstallationWorkflowRun.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

RepoFailure

#### Example

```json
{
  "_tag": "RepoFailure",
  "reason": "string"
}
```

- `_tag` (`terminateRepoExtensionInstallationWorkflowRun.response.500._tag`; string, required)
  - one of `"RepoFailure"`
- `reason` (`terminateRepoExtensionInstallationWorkflowRun.response.500.reason`; string, required)

### 503

RepoBusy | SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "RepoBusy",
  "message": "string"
}
```

Any of the following:

- `RepoBusyEncoded`
  - `_tag` (`RepoBusyEncoded._tag`; string, required)
    - one of `"RepoBusy"`
  - `message` (`RepoBusyEncoded.message`; string, required)
- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/terminate-repo-extension-installation-workflow-run/index.md
