v1

latestOpenAPI 3.1.02026-07-1324323188.8 KB
Draft

Retrieves a Draft resource.

Use this endpoint to retrieve the details of a draft rule.

get/drafts/{id}

Path parameters

idstring required

Draft identifier

Response

Draft resource

idstring required
status'add' | 'update' | 'delete' required

The type of change that this draft represents.

Example response

{
  "rule": {
    "actions": [
      {
        "mode": "default"
      }
    ],
    "markers": [
      {
        "description": "My enum marker that only allow \"dog\" or \"cat\"",
        "name": "MyEnum",
        "transformers": [
          {
            "something": "foo",
            "with": "bar"
          }
        ]
      }
    ],
    "trigger": {
      "date": [
        {
          "operator": "equals"
        }
      ],
      "datetime": [
        {
          "operator": "after"
        }
      ],
      "ipAddress": {
        "ip": "1.2.3.4"
      },
      "methods": [
        "GET",
        "POST"
      ],
      "requestHeaders": [
        {
          "name": "Accept",
          "operator": "isNotEqualTo",
          "value": "application/json"
        }
      ],
      "responseStatusCodes": [
        500,
        503
      ],
      "sampling": 47,
      "source": "/old-url",
      "time": [
        {
          "operator": "after"
        }
      ]
    },
    "variables": [
      {
        "marker": "markerName",
        "name": "myVariable",
        "transformers": [
          {
            "something": "foo",
            "with": "bar"
          }
        ]
      }
    ]
  },
  "status": "add"
}