---
title: "Legacy Create Attack."
method: POST
path: "/attacks/new"
tags: ["attacks"]
deprecated: true
---

# Legacy Create Attack.

`POST /attacks/new`

> **Deprecated.**

Note that this endpoint is considered deprecated but is maintained for existing consumers.  Please consider using the new `POST /attacks` endpoint instead.

For a list of attack parameters, please visit: https://www.gremlin.com/docs/infrastructure-layer/attacks/#parameter-reference.
Please note that if the `labels` or `tags` fields are not provided, no filtering will be employed and an attack will target all active clients within your team.
For more information on creating a new attack using the API, please visit: https://www.gremlin.com/docs/api-reference/examples/
Requires the privilege [`EXPERIMENTS_RUN`](https://www.gremlin.com/docs/user-management/access-control/#privileges)

## Query parameters

- `teamId` string, required

## Request body

- CreateAttackInput
  - `includeNewTargets` boolean
  - `continueOnEmptyTargets` boolean
  - `command` object
    - `providers` string[]
    - `args` string[]
    - `trafficImpactMapping` TaskTrafficImpactMappingInput
      - `multiSelectTags` object
      - `dependencyIds` string[]
    - `trafficImpactFromWithSelectTags` object
    - `trafficImpactWithDependencyIds` string[]
    - `type` string
    - `templateId` string
    - `optionalTemplateId` string
    - `empty` boolean
  - `multiSelectTags` object
  - `multiSelectLabels` object
  - `target` object
    - `multiSelectTags` object
    - `strategyInput` TargetStrategy
      - `type` 'Exact' | 'Regex' | 'Random'
      - `strategy` Strategy
        - `type` 'Exact' | 'RandomCount' | 'RandomPercent'
        - `tags` object
        - `multiSelectLabels` object
        - `labels` object
        - `allHosts` boolean
        - `allContainers` boolean
        - `hostIds` string[]
        - `containerIds` string[]
        - `multiSelectTags` object
      - `containerLabels` object
      - `hostTags` object
      - `allContainers` boolean
      - `allHosts` boolean
      - `hostIds` string[]
      - `containerIds` string[]
      - `hostsInput` object
      - `containersInput` object
    - `multiSelectLabels` object
    - `type` string
    - `templateId` string
    - `optionalTemplateId` string
    - `empty` boolean
    - `tags` object
  - `annotations` object
  - `source` 'WebApp' | 'Api' | 'Scheduled' | 'Manual' | 'Spinnaker' | 'Concord' | 'GremlinFeeder' | 'GremlinSdkPython' | 'Scenario' | 'Chao' | 'K8sBackend' | 'Website' | 'Neotys' | 'IntegrationClient' | 'Validation'

## Response `default`

default response

## Other responses

- `401` — Authorization header missing or malformed. Please provide proper credentials in the authorization header.
- `403` — User requires privilege for target team: EXPERIMENTS_RUN

---

[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)
