[Yandex Cloud documentation](../../../index.md) > [Yandex API Gateway](../../index.md) > [Concepts](../index.md) > [Specification extensions](index.md) > Integration options > Object Storage

# x-yc-apigateway-integration:object_storage extension

The `x-yc-apigateway-integration:object_storage` extension delegates request handling to Object Storage for static file distribution.

You can add an extension to a specification using the [specification constructor](../../operations/spec-constructor/index.md).

## Supported parameters {#parameters}

The table below lists the parameters specific to API Gateway API gateways. You can find the description of other parameters in the [OpenAPI 3.0 specification](https://github.com/OAI/OpenAPI-Specification).

Parameter | Type | Description 
----|----|----
`bucket` | `string` | [Bucket](../../../storage/concepts/bucket.md) name.
`object` | `string` | [Object](../../../storage/concepts/object.md) name. It supports parameter templating from the original request path. <br>The parameters are subsituted into `object`.
`error_object` | `string \| ErrorObjectSettings` | This is an optional parameter. The name of the [object](../../../storage/concepts/object.md) and the optional response code returned if `object` does not exist in the specified `bucket`. The parameters are subsituted into `error_object`.
`service_account_id` | `string` | ID of the service account used for authorization when accessing Object Storage. If you omit the parameter, the `service_account_id` [top-level](index.md#top-level) parameter value will be used. If the top-level parameter is also missing, the object will be available without authorization.

The `ErrorObjectSettings` object may contain the following parameters:

Argument | Type | Description
----|----|----
`object` | `string` | [Object](../../../storage/concepts/object.md) name. The parameters are subsituted into `object`.
`statusCode` | `number` |  Returned response code.


## Extension specification {#spec}

Specification example:

```yaml
  /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: <bucket_name>
        object: '{file}'
        error_object: error.html
        service_account_id: ajehfe65fhl********
```

## Use cases {#examples}

* [Deploying a web application using the Java Servlet API](../../tutorials/java-servlet-todo-list.md)
* [URL shortener](../../tutorials/serverless-url-shortener/index.md)
* [How to create a Telegram bot](../../tutorials/telegram-bot-serverless/index.md)