---
title: "create rule"
method: POST
path: "/api/{env}/traffic/gray"
tags: ["TrafficGray"]
---

# create rule

`POST /api/{env}/traffic/gray`

create rule

## Request body

- ModelGray
  - `application` string, required
  - `tags` ModelTag[], required
    - `addresses` string[]
    - `match` ModelParamMatch[], required
      - `key` string
      - `value` ModelStringMatch
        - `empty` string
        - `exact` string
        - `noempty` string
        - `prefix` string
        - `regex` string
        - `wildcard` string
    - `name` string, required

## Response `200`

OK

- unknown

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.dev/apache/apis/dubbo-admin-api.md) · [All operations](https://skmtc.dev/apache/apis/dubbo-admin-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/apache/dubbo-admin-api/revisions/3620d40f4941/schema)
