tommy

Rendered from docs/openapi-s3.json in the repository.

On this page

tommy s3 API v1

Accepts S3-compatible bucket and object operations without sending data to cloud storage, and keeps the resulting object catalog available for inspection. Logical bucket and object mutations are also captured as searchable events, while the catalog and its bytes can be kept across restarts with filesystem storage.

These routes read back what tommy captured, in the shape this content type wants: filters that only mean something here, and the parts that are bytes rather than JSON. They read from the same store as the events API, so a client that sends and immediately fetches sees its own write, and every entry carries the id of the event behind it.

The events API - /api/v1/events, described in its own document - is the generic view of the same captures, and is the one to use when what you are asserting does not depend on the content type. The fake vendor endpoints are described nowhere here: they are the vendors' specifications, not tommy's.

This document is generated from the server's route table. It cannot describe a route that does not exist, and CI fails if the checked-in copy stops matching the code.

Server

  • /api/v1/s3 — This tommy's s3 API.

Operations

GET /buckets List current buckets and aggregate S3 catalog statistics.

Responses

StatusBodyDescription
200 application/json · s3.BucketsView
Success.
DELETE /buckets Delete every bucket, object, and inactive multipart upload while retaining the event history.

Responses

StatusBodyDescription
204 no body Done. No body.
GET /buckets/{bucket} Get one current bucket snapshot and its object-list link.

Parameters

NameInTypeDescription
bucket required path string

Responses

StatusBodyDescription
200 application/json · s3.BucketView
Success.
404 application/json · api.Error
No such resource, or it belongs to another plugin.
DELETE /buckets/{bucket} Delete an empty bucket, or all of its state when recursive is true.

Parameters

NameInTypeDescription
bucket required path string
recursive query boolean Delete objects and inactive multipart uploads before deleting the bucket.

Responses

StatusBodyDescription
204 no body Done. No body.
400 application/json · api.Error
A query parameter could not be parsed - a malformed since, a negative limit.
404 application/json · api.Error
No such resource, or it belongs to another plugin.
GET /buckets/{bucket}/content/{key} Download one object's bytes and recorded representation metadata, with HTTP range support.

Parameters

NameInTypeDescription
bucket required path string
key required path string

Responses

StatusBodyDescription
200 application/octet-stream
Success.
404 application/json · api.Error
No such resource, or it belongs to another plugin.
GET /buckets/{bucket}/objects List one bucket with exact S3 prefix, delimiter, continuation, and maximum-key semantics.

Parameters

NameInTypeDescription
bucket required path string
prefix query string Only keys beginning with this exact prefix.
delimiter query string Group keys after the prefix into common prefixes.
start_after query string Start strictly after this key or common prefix.
continuation query string Continue strictly after the token returned by the previous page.
max_keys query integer Maximum objects and common prefixes in this page; capped at 1000.

Responses

StatusBodyDescription
200 application/json · s3.ObjectsView
Success.
400 application/json · api.Error
A query parameter could not be parsed - a malformed since, a negative limit.
404 application/json · api.Error
No such resource, or it belongs to another plugin.
GET /buckets/{bucket}/objects/{key} Get metadata for one exact object key, without treating the key as a filesystem path.

Parameters

NameInTypeDescription
bucket required path string
key required path string

Responses

StatusBodyDescription
200 application/json · s3.ObjectView
Success.
404 application/json · api.Error
No such resource, or it belongs to another plugin.
DELETE /buckets/{bucket}/objects/{key} Delete one exact object and append an s3.object.delete event.

Parameters

NameInTypeDescription
bucket required path string
key required path string

Responses

StatusBodyDescription
204 no body Done. No body.
404 application/json · api.Error
No such resource, or it belongs to another plugin.

Schemas

api.Error

PropertyType
error requiredstring

blob.Ref

PropertyType
content_typestring
filenamestring
id requiredstring
size requiredinteger

s3.BucketView

PropertyType
bytes requiredinteger
creation_time requiredstring (date-time)
links requireds3.BucketLinks
name requiredstring
objects requiredinteger

s3.BucketsView

PropertyType
buckets requiredarray of s3.BucketView
self requiredstring
stats requireds3.Stats

s3.Checksums

PropertyType
crc32string
crc32cstring
sha1string
sha256string

s3.CommonPrefixView

PropertyType
list requiredstring
prefix requiredstring

s3.ContentHeaders

PropertyType
cache_controlstring
content_dispositionstring
content_encodingstring
content_languagestring
content_typestring
expires requiredstring (date-time)

s3.ObjectView

PropertyType
blob requiredblob.Ref
bucket requiredstring
checksums requireds3.Checksums
etag requiredstring
headers requireds3.ContentHeaders
key requiredstring
last_modified requiredstring (date-time)
links requireds3.ObjectLinks
metadataobject of string
size requiredinteger

s3.ObjectsView

PropertyType
bucket requireds3.BucketView
common_prefixes requiredarray of s3.CommonPrefixView
continuation_tokenstring
delimiterstring
is_truncated requiredboolean
max_keys requiredinteger
nextstring
next_continuation_tokenstring
objects requiredarray of s3.ObjectView
prefixstring
self requiredstring
start_afterstring

s3.Stats

PropertyType
active_uploads requiredinteger
buckets requiredinteger
bytes requiredinteger
objects requiredinteger
part_bytes requiredinteger
parts requiredinteger