---
title: "Create a troubleshooting action"
method: POST
path: "/scope/{scopeId}/action"
tags: ["Scope"]
---

# Create a troubleshooting action

`POST /scope/{scopeId}/action`

Submits an action to kill a specific instance or pod.

## Path parameters

- `scopeId` string, required

## Request body

- ScopeActionInstanceKillCreate
  - `name` 'instance_kill' | 'instance_restart' | 'autoscaling_fix' | 'autoscaling_stop' | 'autoscaling_start', required — The name of the troubleshooting action
  - `parameters` ScopeActionParameters, required — Defines the parameters required for troubleshooting actions. > **Note**: Actions with the name `autoscaling_stop` and `autoscaling_start` do not require parameters.
    - `instance_id` string — The ID of the instance to terminate. Applies only to the `instance_kill` action.
    - `desired_instances` integer — The target number of instances. Applies only to the `autoscaling_fix` action.
    - `autoscaling_enabled` boolean — Indicates whether autoscaling should be enabled. Applies only to the `autoscaling_fix` action.

## Response `200`

The operation was successful.

- ScopeAction
  - `id` string — The ID of the troubleshooting action.
  - `name` string — The name of the troubleshooting action.
  - `status` 'pending_approval' | 'pending_approval_denied' | 'pending' | 'executed' | 'cancelled' | 'failed' — The status of the troubleshooting action.
  - `entity` string — The entity that the troubleshooting action is associated with.
  - `entity_id` string — The ID of the entity that the troubleshooting action is associated with.
  - `parameters` object — The parameters for the troubleshooting action.
  - `messages` string[] — The messages for the troubleshooting action.
  - `nrn` string — The NRN of the entity that the troubleshooting action is associated with.
  - `created_at` string, date-time — The ISO-8601 UTC timestamp of when the troubleshooting action was created.
  - `updated_at` string, date-time, nullable — The ISO-8601 UTC timestamp of when the troubleshooting action was last updated.

## Other responses

- `4XX` — Client error responses due to invalid input or missing parameters.
- `5XX` — Server error responses indicating an issue on the API side.

---

[API](https://skmtc.dev/nullplatform/apis/nullplatform-api.md) · [All operations](https://skmtc.dev/nullplatform/apis/nullplatform-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nullplatform/nullplatform-api/revisions/1c4ea154b159/schema)
