rulesets_RewriteRule

APIs.ioEngineeringPlatform
View JSON Schema on GitHub

JSON Schema

apis-io-engineering-platform-rulesets-rewriterule-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/rulesets_RewriteRule",
  "title": "rulesets_RewriteRule",
  "allOf": [
    {
      "$ref": "#/components/schemas/rulesets_Rule"
    },
    {
      "properties": {
        "action": {
          "enum": [
            "rewrite"
          ]
        },
        "action_parameters": {
          "properties": {
            "headers": {
              "additionalProperties": {
                "oneOf": [
                  {
                    "description": "Remove the header from the request.",
                    "properties": {
                      "operation": {
                        "enum": [
                          "remove"
                        ],
                        "title": "Operation",
                        "type": "string"
                      }
                    },
                    "required": [
                      "operation"
                    ],
                    "title": "Remove header",
                    "type": "object"
                  },
                  {
                    "description": "Set a request header with a static value.",
                    "properties": {
                      "operation": {
                        "enum": [
                          "set"
                        ],
                        "title": "Operation",
                        "type": "string"
                      },
                      "value": {
                        "description": "Static value for the header.",
                        "example": "static-header-value",
                        "minLength": 1,
                        "title": "Value",
                        "type": "string"
                      }
                    },
                    "required": [
                      "operation",
                      "value"
                    ],
                    "title": "Static header",
                    "type": "object"
                  },
                  {
                    "description": "Set a request header with a dynamic value.",
                    "properties": {
                      "expression": {
                        "description": "Expression for the header value.",
                        "example": "ip.src",
                        "minLength": 1,
                        "title": "Expression",
                        "type": "string"
                      },
                      "operation": {
                        "enum": [
                          "set"
                        ],
                        "title": "Operation",
                        "type": "string"
                      }
                    },
                    "required": [
                      "operation",
                      "expression"
                    ],
                    "title": "Dynamic header",
                    "type": "object"
                  }
                ]
              },
              "description": "Map of request headers to modify.",
              "example": {
                "client-http-version": {
                  "expression": "http.request.version",
                  "operation": "set"
                }
              },
              "title": "Headers",
              "type": "object"
            },
            "uri": {
              "description": "URI to rewrite the request to.",
              "properties": {
                "path": {
                  "allOf": [
                    {
                      "description": "Path portion rewrite.",
                      "example": {
                        "expression": "regex_replace(http.request.uri.path, \"/bar$\", \"/baz\")"
                      },
                      "title": "Path"
                    },
                    {
                      "$ref": "#/components/schemas/rulesets_RewriteUriPart"
                    }
                  ]
                },
                "query": {
                  "allOf": [
                    {
                      "description": "Query portion rewrite.",
                      "example": {
                        "expression": "regex_replace(http.request.uri.query, \"foo=bar\", \"\")"
                      },
                      "title": "Query"
                    },
                    {
                      "$ref": "#/components/schemas/rulesets_RewriteUriPart"
                    }
                  ]
                }
              },
              "title": "URI",
              "type": "object"
            }
          }
        },
        "description": {
          "example": "Add a header when the IP address is not 1.1.1.1"
        }
      },
      "title": "Rewrite rule"
    }
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/apis-io-engineering-platform-rulesets-rewriterule"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.