---
title: "Legacy endpoint for creating K8s attacks. Please consider `POST /attacks` endpoint instead"
method: POST
path: "/kubernetes/attacks/new"
tags: ["kubernetes.attacks"]
deprecated: true
---

# Legacy endpoint for creating K8s attacks. Please consider `POST /attacks` endpoint instead

`POST /kubernetes/attacks/new`

> **Deprecated.**

Requires the privilege [`EXPERIMENTS_WRITE`](https://www.gremlin.com/docs/user-management/access-control/#privileges)

## Query parameters

- `teamId` string, required

## Request body

- Attack
  - `impactDefinition` Command
    - `providers` string[]
    - `args` string[]
    - `trafficImpactMapping` TaskTrafficImpactMappingInput
      - `multiSelectTags` object
      - `dependencyIds` string[]
    - `trafficImpactFromWithSelectTags` object
    - `trafficImpactWithDependencyIds` string[]
    - `type` string
    - `templateId` string
    - `optionalTemplateId` string
    - `empty` boolean
  - `targetDefinition` TargetObject
    - `strategy` StrategyObject
      - `k8sObjects` object[]
      - `containerSelection` ContainerSelection
        - `selectionType` 'EXACT' | 'ALL' | 'ANY'
        - `containerNames` string[]
      - `k8sObjectsInternal` K8sObjectOnAttack[]
        - `clusterId` string
        - `uid` string
        - `namespace` string
        - `name` string
        - `kind` 'DEPLOYMENT' | 'REPLICASET' | 'POD' | 'DAEMONSET' | 'STATEFULSET' | 'SERVICE' | 'INGRESS' | 'DEPLOYMENTCONFIG' | 'REPLICATIONCONTROLLER' | 'ROLLOUT' | 'HORIZONTALPODAUTOSCALER' | 'PODDISRUPTIONBUDGET'
        - `labels` object
        - `annotations` object
        - `ownerReferences` string
        - `createdAt` string, date-time
        - `resolvedContainers` string[]
        - `data` string
        - `clientId` string
        - `teamId` string
        - `resolved` boolean
        - `attackUid` string
      - `count` integer
      - `percentage` integer
  - `includeNewTargets` boolean
  - `continueOnEmptyTargets` boolean

## Other responses

- `401` — Authorization header missing or malformed. Please provide proper credentials in the authorization header.
- `403` — User requires privilege for target team: EXPERIMENTS_WRITE
- `HttpStatus.SC_CREATED` — Attack created, attackId returned

---

[API](https://skmtc.net/gremlin/apis/gremlin-api.md) · [All operations](https://skmtc.net/gremlin/apis/gremlin-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gremlin/gremlin-api/revisions/36ee938323f0/schema)
