Skip to main content
POST
/
gateway
/
{gateway_topic}
/
mapping
/
version
Create a new mapping version
curl --request POST \
  --url https://api.quiva.ai/gateway/{gateway_topic}/mapping/version \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "resource_type": "function",
  "resource": "user-service.getUsers",
  "resource_version": "latest",
  "active": true,
  "description": "Gets all users with pagination"
}
'
{
  "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",
    "version": 1,
    "modified": 1713531894,
    "type": "created"
  },
  "metadata": {
    "subject": "ms.gateway.abcdef123456.mapping-version.get.api.users.1"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

gateway_topic
string
required

Unique topic identifier of the gateway

Query Parameters

method
enum<string>
required

HTTP method for the mapping in uppercase

Available options:
GET,
POST,
PUT,
DELETE,
PATCH,
OPTIONS,
HEAD
path
string
required

URL path for the mapping including the leading slash

Body

application/json
resource_type
string
required

Type of resource that will handle requests

Example:

"function"

resource
string
required

Resource identifier that will handle requests

Example:

"user-service.getUsers"

resource_version
string
default:latest

Version of the resource

Example:

"latest"

active
boolean
default:true

Whether the mapping version is active

Example:

true

description
string

Description of the mapping version

Example:

"Gets all users with pagination"

middleware
object[]

List of middleware to be applied to the mapping version

exact_match
boolean
default:false

Whether the path should be matched exactly

Example:

false

attributes
string[]

Attributes for the mapping version

Example:
[]
boolean_logic
string

Boolean logic expression for request routing

Example:

""

invocation_type
string

Type of invocation for the resource

Example:

"RequestResponse"

Response

Mapping version created successfully

body
object
metadata
object