v6

latestOpenAPI 3.0.3raw.githubusercontent.com2025-11-28172255.4 KB
Mapping Versions

Create a new mapping version

Creates a new version for an existing mapping.

post/gateway/{gateway_topic}/mapping/version

Path parameters

gateway_topicstring required

Unique topic identifier of the gateway

Query parameters

method'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'OPTIONS' | 'HEAD' required

HTTP method for the mapping in uppercase

pathstring required

URL path for the mapping including the leading slash

Request body

resource_typestring required

Type of resource that will handle requests

resourcestring required

Resource identifier that will handle requests

resource_versionstring

Version of the resource

activeboolean

Whether the mapping version is active

descriptionstring

Description of the mapping version

exact_matchboolean

Whether the path should be matched exactly

attributesstring[]

Attributes for the mapping version

boolean_logicstring

Boolean logic expression for request routing

invocation_typestring

Type of invocation for the resource

Example request

{
  "resource_type": "function",
  "resource": "user-service.getUsers",
  "resource_version": "latest",
  "active": true,
  "description": "Gets all users with pagination",
  "middleware": [
    {
      "order": 1,
      "resource": "auth-middleware",
      "resource_type": "function",
      "resource_version": "latest",
      "type": "pre-request"
    }
  ],
  "attributes": [],
  "invocation_type": "RequestResponse"
}

Response

Mapping version created successfully

Example response

{
  "body": {
    "subject": "ms.gateway.abcdef123456.mapping-version.get.api.users.1",
    "resource_type": "function",
    "resource": "user-service.getUsers",
    "resource_version": "latest",
    "active": true,
    "description": "Gets all users with pagination",
    "middleware": [
      {
        "order": 1,
        "resource": "auth-middleware",
        "resource_type": "function",
        "resource_version": "latest",
        "type": "pre-request"
      }
    ],
    "attributes": [],
    "invocation_type": "RequestResponse",
    "version": 1,
    "modified": 1713531894,
    "type": "created"
  },
  "metadata": {
    "subject": "ms.gateway.abcdef123456.gateway"
  }
}