---
title: "Create a new Mirror config"
method: POST
path: "/config/mirror"
---

# Create a new Mirror config

`POST /config/mirror`

Create a new Mirror config.

## Request body

- MirrorEntry
  - `mirrorIdent` string, required — Mirror name
  - `mirrorInfo` object
    - `type` 0 | 1 | 2 — One of MirrTypeSpan, MirrTypeRspan or MirrTypeErspan(0-MirrTypeSpan, 1-MirrTypeRspan, 2-MirrTypeErspan)
    - `port` string — Port where mirrored traffic needs to be sent
    - `vlan` integer — For RSPAN we may need to send tagged mirror traffic
    - `remoteIP` string — For ERSPAN we may need to send tunnelled mirror traffic
    - `sourceIP` string — For ERSPAN we may need to send tunnelled mirror traffic
    - `tunnelID` integer — mirror tunnel-id. For ERSPAN we may need to send tunnelled mirror traffic
  - `targetObject` object, required
    - `attachment` 0 | 1, required — Target Attachment(0-RuleName, 1-PortName)
    - `mirrObjName` string, required — Target Names

## Response `204`

OK

## Other responses

- `400` — Malformed arguments for API call
- `401` — Invalid authentication credentials
- `403` — Capacity insufficient
- `404` — Resource not found
- `409` — Resource Conflict. VLAN already exists OR dependency VRF/VNET not found
- `500` — Internal service error
- `503` — Maintenance mode

---

[API](https://skmtc.net/loxilb-io/apis/loxilb-rest-api.md) · [All operations](https://skmtc.net/loxilb-io/apis/loxilb-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loxilb-io/loxilb-rest-api/revisions/45e9f0a95af0/schema)
