Upserts Request Validations

POST /request-validations

Upsert Request Validation

Headers

  • x-integration-id string

    Unique identifier of an integration

    Minimum length is 24, maximum length is 24. Format should match the following pattern: IN[A-Za-z0-9_\-]+.

application/json

Body Required

Request Validation Details

  • route object Required
    Hide route attributes Show route attributes object
    • method string

      HTTP method (GET, POST, PUT, DELETE, etc.)

      Values are GET, HEAD, POST, PUT, DELETE, CONNECT, OPTIONS, TRACE, or PATCH.

    • host string(uri)

      Host name

      Minimum length is 1, maximum length is 65535.

    • port integer(int32)

      Minimum value is 1, maximum value is 65535.

    • path string(uri)

      URL path pattern

      Minimum length is 1, maximum length is 8192.

  • requestSchema object
    Hide requestSchema attributes Show requestSchema attributes object
    • headerSchemaID string

      Minimum length is 24, maximum length is 24. Format should match the following pattern: SC[A-Za-z0-9_\-]+.

    • querySchemaID string

      Minimum length is 24, maximum length is 24. Format should match the following pattern: SC[A-Za-z0-9_\-]+.

    • bodySchemaID string

      Minimum length is 24, maximum length is 24. Format should match the following pattern: SC[A-Za-z0-9_\-]+.

  • responseSchema object
    Hide responseSchema attributes Show responseSchema attributes object
    • headerSchemaID string

      Minimum length is 24, maximum length is 24. Format should match the following pattern: SC[A-Za-z0-9_\-]+.

    • bodySchemaID string

      Minimum length is 24, maximum length is 24. Format should match the following pattern: SC[A-Za-z0-9_\-]+.

Responses

  • 200 application/json

    Updated Service Levels

    Hide response attribute Show response attribute object
    • routeKey string Required

      Minimum length is 13, maximum length is 13. Format should match the following pattern: RK[A-Za-z0-9_\-]+.

  • 201 application/json

    Created Service Levels

    Hide response attribute Show response attribute object
    • routeKey string Required

      Minimum length is 13, maximum length is 13. Format should match the following pattern: RK[A-Za-z0-9_\-]+.

  • 400 application/json

    Bad request

    Hide response attributes Show response attributes object
    • code string(string) Required

      Error code

      Minimum length is 1, maximum length is 64.

    • message string(string) Required

      Human-readable error message

      Minimum length is 1, maximum length is 1024.

  • 401 application/json

    Unauthorized request

    Hide response attributes Show response attributes object
    • code string(string) Required

      Error code

      Minimum length is 1, maximum length is 64.

    • message string(string) Required

      Human-readable error message

      Minimum length is 1, maximum length is 1024.

  • 429 application/json

    Too many requests

    Hide response attributes Show response attributes object
    • code string(string) Required

      Error code

      Minimum length is 1, maximum length is 64.

    • message string(string) Required

      Human-readable error message

      Minimum length is 1, maximum length is 1024.

  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • code string(string) Required

      Error code

      Minimum length is 1, maximum length is 64.

    • message string(string) Required

      Human-readable error message

      Minimum length is 1, maximum length is 1024.

POST /request-validations
curl \
 --request POST '/api/v1/request-validations' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --header "x-integration-id: INx3zt0ygAcQGBAQEBAQEBAQ" \
 --data '{"route":{"method":"GET","host":"api.example.com","port":8080,"path":"/api/users/{id}"},"requestSchema":{"headerSchemaID":"SCx3zt0ygAcQGBAQEBAQEBAQ","querySchemaID":"SCx3zt0ygAcQGBAQEBAQEBAQ","bodySchemaID":"SCx3zt0ygAcQGBAQEBAQEBAQ"},"responseSchema":{"headerSchemaID":"SCx3zt0ygAcQGBAQEBAQEBAQ","bodySchemaID":"SCx3zt0ygAcQGBAQEBAQEBAQ"}}'
Request examples
# Headers
x-integration-id: INx3zt0ygAcQGBAQEBAQEBAQ

# Payload
{
  "route": {
    "method": "GET",
    "host": "api.example.com",
    "port": 8080,
    "path": "/api/users/{id}"
  },
  "requestSchema": {
    "headerSchemaID": "SCx3zt0ygAcQGBAQEBAQEBAQ",
    "querySchemaID": "SCx3zt0ygAcQGBAQEBAQEBAQ",
    "bodySchemaID": "SCx3zt0ygAcQGBAQEBAQEBAQ"
  },
  "responseSchema": {
    "headerSchemaID": "SCx3zt0ygAcQGBAQEBAQEBAQ",
    "bodySchemaID": "SCx3zt0ygAcQGBAQEBAQEBAQ"
  }
}
Response examples (200)
{
  "routeKey": "RKyx_d19M6zrA"
}
Response examples (201)
{
  "routeKey": "RKyx_d19M6zrA"
}
Response examples (400)
{
  "code": "string",
  "message": "string"
}
Response examples (401)
{
  "code": "string",
  "message": "string"
}
Response examples (429)
{
  "code": "string",
  "message": "string"
}
Response examples (500)
{
  "code": "string",
  "message": "string"
}