---
title: "Validate/Upload File"
url: "https://developer-qual.migros.ch/apis/buckyput-1/versions/9a8f669f-ef64-4b7d-966d-153612b20270/operations/validate_file"
---

> Full API specification: https://developer-qual.migros.ch/apis/buckyput-1/versions/9a8f669f-ef64-4b7d-966d-153612b20270.md

# Validate/Upload File

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

Operation ID: `validate_file`

Route for validating the file uploaded via the UI and uploading it to the desired folder if the option was selected and validation was successful.

## Query parameters

- `folder` (string, optional) - The folder name inside the bucket, where the files will be stored

## Request body

Content types: `multipart/form-data`

## Responses

- `200` - Request was successful
- `201` - Upload was successful.
- `400` - The request body had invalid format (file validation failed) or was missing required parameters.
- `500` - There was a serverside error on your request.
- `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-qual.migros.ch
paths:
  /migros/enterprise-support/adp-upload/v1/upload:
    post:
      description: Route for validating the file uploaded via the UI and uploading it
        to the desired folder if the option was selected and validation was
        successful.
      operationId: validate_file
      parameters:
        - $ref: "#/components/parameters/folder"
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  type: string
                validate_upload:
                  type: string
              type: object
        description: File to validate/upload.
      responses:
        "200":
          $ref: "#/components/responses/OkayResponse"
        "201":
          $ref: "#/components/responses/CreatedResponse"
        "400":
          $ref: "#/components/responses/BadRequestResponse"
        "500":
          $ref: "#/components/responses/InternalServerError"
        default:
          $ref: "#/components/responses/DefaultResponse"
      security:
        - Basic-Auth: []
      summary: Validate/Upload File
      tags:
        - GUI
      x-kong-plugin-acl:
        config:
          allow:
            - buckyput-gui
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
  responses:
    OkayResponse:
      description: Request was successful
    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
    BadRequestResponse:
      description: The request body had invalid format (file validation failed) or was
        missing required parameters.
    InternalServerError:
      description: There was a serverside error on your request.
    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
```
