Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 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
  • Practical guidelines
    • Deploying a web application
    • Developing a skill for Alice and a website with authorization
    • Developing a Slack bot
    • Developing a Telegram bot
  • Concepts
    • Relationship between service resources
    • Specification extensions
      • Overview
      • Static response
      • Invoking a function
      • Integration with Serverless Containers
      • Access via HTTP
      • Integration with Object Storage
      • DataSphere integration
      • Data Streams integration
      • Message Queue integration
      • Greedy parameters
      • Generalized HTTP method
      • Authorization using a function
    • 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
  • Questions and answers
  1. Concepts
  2. Specification extensions
  3. Integration with Object Storage

x-yc-apigateway-integration:object_storage extension

Written by
Yandex Cloud
,
improved by
Nikolay M.
  • Supported parameters
  • Extension specification

The x-yc-apigateway-integration:object_storage extension passes the request handling control to Object Storage for distributing static files. Lets you manage the object access key and enables static data distribution directly from Object Storage by redirecting to a signed URL.

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
bucket string Name of the bucket.
object string Object name. Supports parameter standardization from the path of the original request.
Parameters are substituted in object.
error_object string Optional parameter. Object name returned if HTTP error code 4xx is received instead of object.
presigned_redirect bool If the value is true, a pre-signed URL is generated and a redirect is returned to the client.
service_account_id string ID of the service account used for authorization when accessing Object Storage. If the parameter is omitted, the value of the top-level service_account_id parameter is used. If there is no top-level parameter, the object is accessed without authorization.

Extension specification

Sample specification:

  /static/{file}:
    get:
      summary: Serve static file from Yandex Cloud Object Storage
      parameters:
        - name: file
          in: path
          required: true
          schema:
            type: string
      x-yc-apigateway-integration:
        type: object_storage
        bucket: my-example-bucket
        object: '{file}'
        error_object: error.html
        presigned_redirect: true
        service_account_id: ajehfe65fhliq4n28q1

Was the article helpful?

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