Apache Ozone

Ozone provides an S3-compatible REST API for object storage operations, a Hadoop-compatible File System API (o3fs, ofs), a Java client API for bucket and key management, and a Recon REST API for cluster monitoring.

OpenAPI Specification

apache-ozone-s3-api.yaml Raw ↑
openapi: 3.0.3
info:
  title: Apache Ozone S3-Compatible API
  description: Apache Ozone provides an S3-compatible REST API for object storage operations including bucket and key management, multipart uploads, and access control lists.
  version: 1.4.0
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  contact:
    url: https://ozone.apache.org/
x-generated-from: documentation
servers:
  - url: https://{host}
    description: Apache Ozone S3 Gateway
    variables:
      host:
        default: localhost:9878
paths:
  /{bucket}:
    put:
      operationId: createBucket
      summary: Apache Ozone Create Bucket
      description: Create a new S3-compatible bucket in Ozone.
      tags: [Buckets]
      parameters:
        - $ref: '#/components/parameters/bucket'
      responses:
        '200':
          description: Bucket created
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}
    get:
      operationId: listObjects
      summary: Apache Ozone List Objects
      description: List objects in a bucket with optional prefix, delimiter, and pagination.
      tags: [Buckets]
      parameters:
        - $ref: '#/components/parameters/bucket'
        - name: prefix
          in: query
          schema:
            type: string
          description: Object key prefix filter
        - name: delimiter
          in: query
          schema:
            type: string
          description: Delimiter for grouping keys
        - name: max-keys
          in: query
          schema:
            type: integer
            default: 1000
          description: Maximum number of keys to return
        - name: continuation-token
          in: query
          schema:
            type: string
          description: Pagination token
      responses:
        '200':
          description: List of objects
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/ListObjectsResult'
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}
    delete:
      operationId: deleteBucket
      summary: Apache Ozone Delete Bucket
      description: Delete an empty bucket.
      tags: [Buckets]
      parameters:
        - $ref: '#/components/parameters/bucket'
      responses:
        '204':
          description: Bucket deleted
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}
    head:
      operationId: headBucket
      summary: Apache Ozone Head Bucket
      description: Check if a bucket exists and you have permission to access it.
      tags: [Buckets]
      parameters:
        - $ref: '#/components/parameters/bucket'
      responses:
        '200':
          description: Bucket exists
        '404':
          description: Bucket not found
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}
  /{bucket}/{key}:
    put:
      operationId: putObject
      summary: Apache Ozone Put Object
      description: Upload an object to a bucket.
      tags: [Objects]
      parameters:
        - $ref: '#/components/parameters/bucket'
        - $ref: '#/components/parameters/key'
        - name: Content-Type
          in: header
          schema:
            type: string
          description: MIME type of the object
      requestBody:
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: Object uploaded
          headers:
            ETag:
              schema:
                type: string
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}
    get:
      operationId: getObject
      summary: Apache Ozone Get Object
      description: Download an object from a bucket.
      tags: [Objects]
      parameters:
        - $ref: '#/components/parameters/bucket'
        - $ref: '#/components/parameters/key'
      responses:
        '200':
          description: Object content
          content:
            application/octet-stream:
              schema:
                type: string
                format: binary
        '404':
          description: Object not found
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}
    delete:
      operationId: deleteObject
      summary: Apache Ozone Delete Object
      description: Delete an object from a bucket.
      tags: [Objects]
      parameters:
        - $ref: '#/components/parameters/bucket'
        - $ref: '#/components/parameters/key'
      responses:
        '204':
          description: Object deleted
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}
    head:
      operationId: headObject
      summary: Apache Ozone Head Object
      description: Get metadata for an object without downloading it.
      tags: [Objects]
      parameters:
        - $ref: '#/components/parameters/bucket'
        - $ref: '#/components/parameters/key'
      responses:
        '200':
          description: Object metadata
          headers:
            Content-Length:
              schema:
                type: integer
            ETag:
              schema:
                type: string
            Last-Modified:
              schema:
                type: string
        '404':
          description: Object not found
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}
  /:
    get:
      operationId: listBuckets
      summary: Apache Ozone List Buckets
      description: List all buckets owned by the authenticated user.
      tags: [Buckets]
      responses:
        '200':
          description: List of buckets
          content:
            application/xml:
              schema:
                $ref: '#/components/schemas/ListAllMyBucketsResult'
      x-microcks-operation: {delay: 0, dispatcher: FALLBACK}

components:
  parameters:
    bucket:
      name: bucket
      in: path
      required: true
      schema:
        type: string
      description: Bucket name
      example: my-bucket
    key:
      name: key
      in: path
      required: true
      schema:
        type: string
      description: Object key (path)
      example: data/file.csv
  schemas:
    ListAllMyBucketsResult:
      type: object
      properties:
        owner:
          $ref: '#/components/schemas/Owner'
        buckets:
          type: array
          items:
            $ref: '#/components/schemas/Bucket'
    Owner:
      type: object
      properties:
        id:
          type: string
          example: ozone-user-001
        displayName:
          type: string
          example: ozone-admin
    Bucket:
      type: object
      properties:
        name:
          type: string
          example: my-bucket
        creationDate:
          type: string
          format: date-time
          example: "2026-04-19T10:00:00Z"
        storageClass:
          type: string
          example: STANDARD
    ListObjectsResult:
      type: object
      properties:
        name:
          type: string
          example: my-bucket
        prefix:
          type: string
          example: data/
        maxKeys:
          type: integer
          example: 1000
        isTruncated:
          type: boolean
          example: false
        nextContinuationToken:
          type: string
        contents:
          type: array
          items:
            $ref: '#/components/schemas/Object'
    Object:
      type: object
      properties:
        key:
          type: string
          example: data/file.csv
        lastModified:
          type: string
          format: date-time
          example: "2026-04-19T10:00:00Z"
        etag:
          type: string
          example: '"a1b2c3d4e5f6"'
        size:
          type: integer
          example: 1048576
        storageClass:
          type: string
          example: STANDARD
        owner:
          $ref: '#/components/schemas/Owner'