> ## Documentation Index
> Fetch the complete documentation index at: https://docs.deasylabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List S3 Buckets

> List all S3 buckets accessible with the provided credentials.

Deprecated: use POST /v2/connectors/s3/buckets.



## OpenAPI

````yaml /deasy-openapi.yml post /s3/list_buckets
openapi: 3.1.0
info:
  title: Collibra Unstructured API
  description: >
    REST API for Collibra Unstructured.


    ## Authentication


    Every endpoint accepts either HTTP Basic credentials, or a bearer token sent
    together with the

    `X-User-ID` header identifying the user the call runs as.


    ## Base URL


    Your Unstructured deployment, for example
    `https://unstructured.your-company.com/rest/unstructured`.
  version: 0.1.14
servers:
  - url: /rest/unstructured
security:
  - BasicAuth: []
  - BearerAuth: []
    UserIdAuth: []
tags:
  - name: Core
    description: Endpoints for core functionality
  - name: Data
    description: Endpoints for source data
  - name: Metadata
    description: Endpoints for metadata management
  - name: Tags
    description: Endpoints for tag management
  - name: Taxonomy
    description: Endpoints for taxonomy management
  - name: Dataslice
    description: Endpoints for dataslice management
  - name: Progress Tracker
    description: Endpoints for tracking progress
  - name: Classification
    description: Endpoints for classification
  - name: Ingestion
    description: Endpoints for document ingestion
  - name: Workflows
    description: Endpoints for workflow management
  - name: Deduplication
    description: Endpoints for deduplication
paths:
  /s3/list_buckets:
    post:
      tags:
        - Data Connectors
      summary: List S3 Buckets
      description: |-
        List all S3 buckets accessible with the provided credentials.

        Deprecated: use POST /v2/connectors/s3/buckets.
      operationId: list_s3_buckets_s3_list_buckets_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ListS3BucketsRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListS3BucketsResponse'
        '403':
          description: Missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
        '500':
          description: >-
            Internal Server Error. An unexpected error occurred while processing
            the request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPError'
      deprecated: true
      x-codeSamples:
        - lang: Python
          source: |
            # pip install deasy-sdk
            import os
            from deasy import DeasyClient

            client = DeasyClient(
                base_url=os.environ["UNSTRUCTURED_CLIENT_BASE_URL"],
                username=os.environ["UNSTRUCTURED_USERNAME"],
                password=os.environ["UNSTRUCTURED_PASSWORD"],
            )

            response = client.data_source.list_s3_buckets(
                aws_access_key_id="example_aws_access_key_id",
                aws_secret_access_key="example_aws_secret_access_key",
            )
            print(response.buckets)
components:
  schemas:
    ListS3BucketsRequest:
      properties:
        aws_access_key_id:
          type: string
          title: Aws Access Key Id
        aws_secret_access_key:
          type: string
          title: Aws Secret Access Key
        region:
          anyOf:
            - type: string
            - type: 'null'
          title: Region
      type: object
      required:
        - aws_access_key_id
        - aws_secret_access_key
      title: ListS3BucketsRequest
      description: Request model for listing S3 buckets.
    ListS3BucketsResponse:
      properties:
        buckets:
          items:
            $ref: '#/components/schemas/ConnectorResourceInfo'
          type: array
          title: Buckets
      type: object
      required:
        - buckets
      title: ListS3BucketsResponse
      description: Response model for listing S3 buckets.
    HTTPError:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: HTTPError
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ConnectorResourceInfo:
      properties:
        name:
          type: string
          title: Name
      type: object
      required:
        - name
      title: ConnectorResourceInfo
      description: Information about a single named bucket/container (S3/Azure/GCS).
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
    BearerAuth:
      type: http
      scheme: bearer
    UserIdAuth:
      type: apiKey
      in: header
      name: X-User-ID

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.