---
title: "Upload Raw"
url: "https://developer.migros.ch/apis/buckyput-1/versions/836065f9-cb40-4523-ae99-6b052f1a2e02/operations/upload_raw"
---

> Full API specification: https://developer.migros.ch/apis/buckyput-1/versions/836065f9-cb40-4523-ae99-6b052f1a2e02.md

# Upload Raw

`POST` `/migros/enterprise-support/adp-upload/v1/raw`

Operation ID: `upload_raw`

Route for uploading raw data to the desired folder of a bucket. The POST body is saved as a file to the bucket. The path to the file is determined by the `folder` parameter with a Year/Month/Day component added. The actual filename is created from the current time HourMinuteSecond augmented by optional pre- and suffix.

## Query parameters

- `folder` (string, optional) - The folder name inside the bucket, where the files will be stored
- `file_prefix` (string, optional) - The prefix of the autogenerated file name. It will be ignored if the file name is defined in the Content-Disposition header.
- `file_suffix` (string, optional) - The suffix of the autogenerated file name. It will be ignored if the file name is defined in the Content-Disposition header.

## Header parameters

- `Content-Disposition` (string, optional) - An optional header used to define the file name. Only the filname is used, the media type is ignored. Note: The use if this header is uncommon and included for backward compatibility only. If you are tempted to use it, you might want to consider switching to the "Upload File" route.

## Request body

Content types: `application/json`, `application/vnd.ms-excel`, `application/vnd.openxmlformats-officedocument.spreadsheetml.sheet`, `application/xml`, `text/csv`, `text/plain`

## Responses

- `201` - Upload was successful.
- `default` - Standard HTTP semantics; no machine-interpretable body.

## OpenAPI definition

```yaml
openapi: 3.0.1
info:
  title: Buckyput
  version: 1.1.0-beta.1
servers:
  - description: URL of upstream
    url: https://api.migros.ch
paths:
  /migros/enterprise-support/adp-upload/v1/raw:
    post:
      description: >-
        Route for uploading raw data to the desired folder of a bucket.


        The POST body is saved as a file to the bucket. The path to the file is
        determined by the `folder` parameter with a Year/Month/Day component
        added. The actual filename is created from the current time
        HourMinuteSecond augmented by optional pre- and suffix.
      operationId: upload_raw
      parameters:
        - $ref: "#/components/parameters/folder"
        - $ref: "#/components/parameters/file_prefix"
        - $ref: "#/components/parameters/file_suffix"
        - $ref: "#/components/parameters/content_dispo"
      requestBody:
        content:
          application/json:
            schema:
              format: binary
              type: string
          application/vnd.ms-excel:
            schema:
              format: binary
              type: string
          application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
            schema:
              format: binary
              type: string
          application/xml:
            schema:
              format: binary
              type: string
          text/csv:
            schema:
              format: binary
              type: string
          text/plain:
            schema:
              format: binary
              type: string
        description: Data to upload.
      responses:
        "201":
          $ref: "#/components/responses/CreatedResponse"
        default:
          $ref: "#/components/responses/DefaultResponse"
      security:
        - Basic-Auth: []
      summary: Upload Raw
      tags:
        - Upload
security:
  - Basic-Auth: []
components:
  parameters:
    folder:
      description: The folder name inside the bucket, where the files will be stored
      in: query
      name: folder
      required: false
      schema:
        type: string
    file_prefix:
      description: The prefix of the autogenerated file name. It will be ignored if
        the file name is defined in the Content-Disposition header.
      in: query
      name: file_prefix
      required: false
      schema:
        type: string
    file_suffix:
      description: The suffix of the autogenerated file name. It will be ignored if
        the file name is defined in the Content-Disposition header.
      in: query
      name: file_suffix
      required: false
      schema:
        type: string
    content_dispo:
      description: >-
        An optional header used to define the file name. Only the filname is
        used, the media type is ignored.


        Note: The use if this header is uncommon and included for backward
        compatibility only. If you are tempted to use it, you might want to
        consider switching to the "Upload File" route.
      in: header
      name: Content-Disposition
      required: false
      schema:
        title: Content-Disposition
        type: string
  responses:
    CreatedResponse:
      description: Upload was successful.
      headers:
        X-Created-File:
          description: Base file name under which data was saved.
          schema:
            type: string
        X-Created-Path:
          description: Full path under which data was saved.
          schema:
            type: string
    DefaultResponse:
      content:
        text/plain:
          schema:
            type: string
      description: Standard HTTP semantics; no machine-interpretable body.
  securitySchemes:
    Basic-Auth:
      description: Kong basic-auth authentication
      scheme: basic
      type: http
```
