Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
Yandex API Gateway
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Creating API gateways
    • Updating API gateways and their specifications
    • Connecting a domain
    • Deleting API gateways
    • Monitoring
    • Viewing the execution log
  • Tutorials
    • All practical guidelines
    • Deploying a web application using the Java Servlet API
    • Developing a skill for Alice and a website with authorization
    • Developing a Slack bot
    • Developing a Telegram bot
    • Developing user integration
    • Developing CRUD APIs for movie services
    • Communicating with an API gateway using the WebSocket protocol
  • Concepts
    • Relationships between service resources
    • Specification extensions
      • Overview
      • Static response
      • Invoking a function
      • Integration with Serverless Containers
      • Access via HTTP
      • Integration with Object Storage
      • Integration with DataSphere
      • Integration with Data Streams
      • Integration with Message Queue
      • Integration with YDB
      • Greedy parameters
      • Generalized HTTP method
      • Authorization using a function
      • WebSocket protocol support
    • Quotas and limits
  • Access management
  • Pricing policy
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ApiGatewayService
      • OperationService
    • REST
      • Overview
      • ApiGateway
        • Overview
        • addDomain
        • create
        • delete
        • get
        • getOpenapiSpec
        • list
        • listAccessBindings
        • listOperations
        • removeDomain
        • setAccessBindings
        • update
        • updateAccessBindings
  • Websocket API reference
    • Authentication in the API
    • gRPC
      • Overview
      • ConnectionService
    • REST
      • Overview
      • Connection
        • Overview
        • disconnect
        • get
        • send
  • Questions and answers
  1. Concepts
  2. Specification extensions
  3. Static response

x-yc-apigateway-integration:dummy extension

Written by
Yandex Cloud
  • Supported parameters
  • Extension specification

The x-yc-apigateway-integration:dummy extension returns fixed content with the specified response code and required headers without any third-party service involved.

Supported parameters

The table below lists the parameters specific to API Gateway API gateways. Read more about other parameters in the OpenAPI Specification 3.0.

Parameter Type Description
http_code int HTTP response code.
http_headers map[string](string|[]string) List of headers to be sent in response. Parameters are substituted in http_headers.
content map[string]string Data to be sent in response.
Can be either real content or mapping from the requested Content-Type into data. This lets you send errors in the requested format: JSON or XML. The * key is used for the default value. Parameters are substituted in content.

Extension specification

Sample specification:

x-yc-apigateway-integration:
  type: dummy
  http_code: 302
  http_headers:
    Location: "/some/location"
    Set-Cookie: ["a={number}", "b=2"]
  content:
    "application/json": "{ \"message\": \"You've been redirected.\" }"

Extension specifics:

  • If the request has the header Accept:
    • The best match is selected first.
    • If there is no match, the * key is selected.
    • If there is no key, the 415 Media not supported response is returned.
  • If the Accept header is missing, an arbitrary response is selected.
  • If the content option is selected by the * key, the response's Content-Type is picked from http_headers. If it isn't specified there, the actual Content-Type is returned.

Was the article helpful?

Language / Region
Yandex project
© 2023 Yandex.Cloud LLC
In this article:
  • Supported parameters
  • Extension specification