> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Cancel an action execution

POST https://example.itential.io/lifecycle-manager/action-executions/{executionId}/cancel

Cancels an action execution, if targeting a bulk action execution, all its child executions will also be canceled.

Reference: https://docs.itential.com/itential-platform/6/api-reference/lifecycle-manager/cancel-action-execution

## Authentication

- `Authorization` header (basic auth, required) — Basic authentication of the form `Basic <base64(username:password)>`.

## Request

### Path parameters

- `executionId` (string, required) — executionId

## Response

### 200

response

- `data` (object or object or object, optional)
  - object
    - `_id` (any, required)
    - `modelId` (any, required)
    - `modelName` (string, required) — The name of the model as it was when the action was run
    - `instanceId` (any, required)
    - `instanceName` (string, required) — The name of the instance as it was when the action was run
    - `actionId` (any, required) — Identifier of the action that was run
    - `actionName` (string, required) — The name of the action as it was when the action was run
    - `jobId` (string, required, nullable) — Identifier of the job associated with the action
    - `startTime` (string, required) — The time at which the action was started
    - `endTime` (string, required, nullable) — The time at which the action ended
    - `progress` (object, required) — A sequence of key points in the action describing its overall progress
    - `status` (enum, required) — A single string describing the current activity status of this action
      - Allowed values: `running`, `error`, `complete`, `canceled`, `paused`
    - `errors` (list of object, required) — A list of any errors which occurred while the action was running
      - `message` (string, optional) — A human-readable message summarizing the issue
      - `origin` (enum, optional) — Designates where the error came from
        - Allowed values: `preTransformation`, `workflow`, `postTransformation`, `finishAction`, `system`
      - `timestamp` (string, optional) — An ISO 8601 date string
      - `metadata` (any, optional) — Additional properties that help describe the issue
      - `stepId` (string, optional) — A 4-digit hexadecimal id
    - `initiator` (any, required)
    - `initiatorName` (string, required) — The name of the user or automation trigger that initiated the action
    - `initialInstanceData` (object, required, nullable) — The data for the resource instance
    - `finalInstanceData` (object, required, nullable) — The data for the resource instance
    - `executionType` (enum, optional) — The type of execution action
      - Allowed values: `individual`, `parent`, `child`
    - `actionType` (any, optional) — The type of the action
  - object
    - `_id` (any, required)
    - `modelId` (any, required)
    - `modelName` (string, required) — The name of the model as it was when the action was run
    - `instanceId` (any, required)
    - `instanceName` (string, required) — The name of the instance as it was when the action was run
    - `actionId` (any, required) — Identifier of the action that was run
    - `actionName` (string, required) — The name of the action as it was when the action was run
    - `parentActionExecutionId` (any, required) — Identifier of the job associated with the action
    - `jobId` (string, required, nullable) — Identifier of the job associated with the action
    - `startTime` (string, required) — The time at which the action was started
    - `endTime` (string, required, nullable) — The time at which the action ended
    - `progress` (object, required) — A sequence of key points in the action describing its overall progress
    - `status` (enum, required) — A single string describing the current activity status of this action
      - Allowed values: `running`, `error`, `complete`, `canceled`, `paused`
    - `errors` (list of object, required) — A list of any errors which occurred while the action was running
      - `message` (string, optional) — A human-readable message summarizing the issue
      - `origin` (enum, optional) — Designates where the error came from
        - Allowed values: `preTransformation`, `workflow`, `postTransformation`, `finishAction`, `system`
      - `timestamp` (string, optional) — An ISO 8601 date string
      - `metadata` (any, optional) — Additional properties that help describe the issue
      - `stepId` (string, optional) — A 4-digit hexadecimal id
    - `initiator` (any, required)
    - `initiatorName` (string, required) — The name of the user or automation trigger that initiated the action
    - `initialInstanceData` (object, required, nullable) — The data for the resource instance
    - `finalInstanceData` (object, required, nullable) — The data for the resource instance
    - `executionType` (enum, optional) — The type of execution action
      - Allowed values: `individual`, `parent`, `child`
    - `actionType` (any, optional) — The type of the action
    - `groupId` (string, optional, nullable) — Identifier of the group the bulk action was run against
    - `groupName` (string, optional, nullable) — The name of the group the bulk action was run against
  - object
    - `_id` (any, required)
    - `modelId` (any, required)
    - `modelName` (string, required) — The name of the model as it was when the action was run
    - `instanceIds` (list of any, required) — The IDs of the instances that are being acted upon
    - `childStatuses` (object, required) — An object mapping the current status of child action executions
    - `actionId` (any, required) — Identifier of the action that was run
    - `actionName` (string, required) — The name of the action as it was when the action was run
    - `jobId` (string, required, nullable) — Identifier of the job associated with the action
    - `startTime` (string, required) — The time at which the action was started
    - `endTime` (string, required, nullable) — The time at which the action ended
    - `progress` (object, required) — A sequence of key points in the action describing its overall progress
    - `status` (enum, required) — A single string describing the current activity status of this action
      - Allowed values: `running`, `error`, `complete`, `canceled`, `paused`
    - `errors` (list of object, required) — A list of any errors which occurred while the action was running
      - `message` (string, optional) — A human-readable message summarizing the issue
      - `origin` (enum, optional) — Designates where the error came from
        - Allowed values: `preTransformation`, `workflow`, `postTransformation`, `finishAction`, `system`
      - `timestamp` (string, optional) — An ISO 8601 date string
      - `metadata` (any, optional) — Additional properties that help describe the issue
      - `stepId` (string, optional) — A 4-digit hexadecimal id
    - `initiator` (any or any, required)
    - `initiatorName` (string, required)
    - `executionType` (enum, optional) — The type of execution action
      - Allowed values: `individual`, `parent`, `child`
    - `actionType` (any, optional) — The type of the action
    - `groupId` (string, optional, nullable) — Identifier of the group the bulk action was run against
    - `groupName` (string, optional, nullable) — The name of the group the bulk action was run against
    - `initialInstanceData` (object, optional, nullable) — The data for the resource instance
    - `finalInstanceData` (object, optional, nullable) — The data for the resource instance

## Errors

### 500 Internal Server Error

Error response from API

- `any`

## Examples

**Response**

```json
{
  "data": {
    "actionId": null,
    "actionName": "string",
    "actionType": null,
    "endTime": "2024-01-15T09:30:00Z",
    "errors": [
      {
        "message": "string",
        "metadata": null,
        "origin": "preTransformation",
        "stepId": "0a2f",
        "timestamp": "2024-01-15T09:30:00Z"
      }
    ],
    "executionType": "individual",
    "finalInstanceData": {},
    "initialInstanceData": {},
    "initiatorName": "string",
    "instanceName": "string",
    "jobId": "62a1f3d2ebedfc54e6e0065c",
    "modelName": "string",
    "progress": {},
    "startTime": "2024-01-15T09:30:00Z",
    "status": "running"
  },
  "message": "Successfully created the requested item",
  "metadata": {}
}
```

**SDK Code**

```python
import requests

url = "https://example.itential.io/lifecycle-manager/action-executions/executionId/cancel"

response = requests.post(url)

print(response.json())
```

```javascript
const url = 'https://example.itential.io/lifecycle-manager/action-executions/executionId/cancel';
const options = {method: 'POST'};

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

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://example.itential.io/lifecycle-manager/action-executions/executionId/cancel"

	req, _ := http.NewRequest("POST", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://example.itential.io/lifecycle-manager/action-executions/executionId/cancel")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://example.itential.io/lifecycle-manager/action-executions/executionId/cancel")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://example.itential.io/lifecycle-manager/action-executions/executionId/cancel');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://example.itential.io/lifecycle-manager/action-executions/executionId/cancel");
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://example.itential.io/lifecycle-manager/action-executions/executionId/cancel")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```