Yandex Cloud
Search
Contact UsGet started
  • Services
  • Solutions
  • Why Yandex Cloud
  • Blog
  • Pricing
  • Documentation
Language / Region
Yandex project
© 2023 Intertech Services AG
Yandex API Gateway
  • Getting started
    • Relationships between service resources
    • Networking
      • Overview
      • Greedy parameters
      • Generalized HTTP method
      • Authorization using a function
      • Authorization using a JWT
      • WebSocket protocol support
      • Data validation
      • CORS
    • Quotas and limits
  • Access management
  • Pricing policy
  • FAQ
  1. Concepts
  2. Specification extensions
  3. Overview

Specification extensions API Gateway. Overview

Written by
Yandex Cloud
  • x-yc-apigateway extension
    • Supported parameters
    • Extension specification
  • x-yc-apigateway-integration extension
    • Supported parameters
    • Extension specification

x-yc-apigateway extensionx-yc-apigateway extension

The x-yc-apigateway extension allows you to set top-level API gateway parameters whose values will be inherited by nested extensions.

Supported parametersSupported 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
service_account_id string The ID of the service account on behalf of which the API gateway will perform operations.
validator ValidatorObject HTTP request and response validator or a link to it. It can be overridden at the level of a specific operation.
cors CorsRuleObject Rule for handling CORS preflight requests or a link to it. It can be overridden at the level of a specific path.

Extension specificationExtension specification

x-yc-apigateway:
  service_account_id: <service_account_ID>
  validator: <ValidatorObject or a link to it>
  cors: <CorsRuleObject or a link to it>

x-yc-apigateway-integration extensionx-yc-apigateway-integration extension

The x-yc-apigateway-integration extension is the entry point for integrating the API gateway with other services.

Supported parametersSupported 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
type string Extension type. Acceptable values: dummy, cloud_functions, http, object_storage, cloud_datasphere, cloud_datastreams, serverless_containers, cloud_ymq, and cloud_ydb.

Extension specificationExtension specification

<Request>:
  <Method>:
    x-yc-apigateway-integration:
      type: <Type>
      <List of parameters as key:value pairs>

The extension's content changes depending on the type specified in the x-yc-apigateway-integration section:

  • dummy: Returns fixed content with the specified response code and required headers without any third-party service involved.
  • cloud-functions: Invokes the specified function, passes it the HTTP request data as input, and returns this function's results to the client.
  • http: Redirects the request to the specified URL.
  • object_storage: Passes request handling control to Object Storage to share static files.
  • cloud_datasphere: Calls the specified DataSphere node, passing it the request body with input variable values and returning the node output in the response body.
  • cloud_datastreams: Accesses Yandex Data Streams to perform an operation with the specified stream.
  • serverless_containers: Redirects a request to a specified container.
  • cloud_ymq: Accesses Yandex Message Queue to perform an operation with the specified queue.
  • cloud_ydb: Accesses Yandex Managed Service for YDB to perform an operation with the specified document tables.

All types support parameter substitution when all keys are replaced with the appropriate value. A key should be defined as a parameter of the corresponding operation (all types of parameters defined in the OpenAPI-Specification are allowed: path, query, header, and cookie).

Parameters are only substituted in some values, depending on the type of extension.

Was the article helpful?

Previous
Networking
Next
Static response
Language / Region
Yandex project
© 2023 Intertech Services AG
In this article:
  • x-yc-apigateway extension
  • Supported parameters
  • Extension specification
  • x-yc-apigateway-integration extension
  • Supported parameters
  • Extension specification