OpenAPI Specification
openapi: 3.1.0
info:
title: Val Town alias blobs API
description: 'Val Town’s public API
OpenAPI JSON endpoint:
https://api.val.town/openapi.json'
termsOfService: https://www.val.town/termsofuse
version: '1'
servers:
- url: https://api.val.town
description: Production
tags:
- name: blobs
description: Blobs
paths:
/v1/blob:
get:
operationId: v1blobsList
tags:
- blobs
description: List blobs in your account
parameters:
- schema:
type: string
in: query
name: prefix
required: false
description: If specified, only include blobs that start with this string
responses:
'200':
description: List of blobs that you’ve stored
content:
application/json:
schema:
type: array
items:
type: object
required:
- key
properties:
key:
type: string
size:
type: integer
description: Size in bytes of the object
lastModified:
type: string
description: Creation date of the object
format: date-time
title: BlobListingItem
description: List of blobs that you’ve stored
example:
- key: hello_world
size: 20
lastModified: '2024-06-24T20:00:59.702Z'
/v1/blob/{key}:
get:
operationId: v1blobsGet
tags:
- blobs
description: Get a blob’s contents.
parameters:
- schema:
type: string
minLength: 1
maxLength: 512
in: path
name: key
required: true
description: Key that uniquely identifies this blob
responses:
'200':
description: Binary contents of the returned file
content:
application/octet-stream:
schema:
type: string
format: binary
post:
operationId: v1blobsStore
tags:
- blobs
description: Store data in blob storage
requestBody:
required: true
content:
application/json:
schema:
type: string
format: binary
description: Binary input data
description: Binary input data
parameters:
- schema:
type: string
minLength: 1
maxLength: 512
in: path
name: key
required: true
description: Key that uniquely identifies this blob
security:
- bearerAuth: []
responses:
'201':
description: Default Response
content:
application/json:
schema:
type: string
enum:
- ok
'400':
description: Default Response
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
message:
type: string
delete:
operationId: v1blobsDelete
tags:
- blobs
description: Delete a blob
parameters:
- schema:
type: string
minLength: 1
maxLength: 512
in: path
name: key
required: true
description: Key that uniquely identifies this blob
security:
- bearerAuth: []
responses:
'204':
description: Blob successfully deleted
/v2/blob:
get:
operationId: v2blobsList
tags:
- blobs
description: List blobs in your account
parameters:
- schema:
type: string
in: query
name: prefix
required: false
description: If specified, only include blobs that start with this string
responses:
'200':
description: List of blobs that you’ve stored
content:
application/json:
schema:
type: array
items:
type: object
required:
- key
properties:
key:
type: string
size:
type: integer
description: Size in bytes of the object
lastModified:
type: string
description: Creation date of the object
format: date-time
title: BlobListingItem
description: List of blobs that you’ve stored
example:
- key: hello_world
size: 20
lastModified: '2024-06-24T20:00:59.702Z'
/v2/blob/{key}:
get:
operationId: v2blobsGet
tags:
- blobs
description: Get a blob’s contents.
parameters:
- schema:
type: string
minLength: 1
maxLength: 512
in: path
name: key
required: true
description: Key that uniquely identifies this blob
responses:
'200':
description: Binary contents of the returned file
content:
application/octet-stream:
schema:
type: string
format: binary
post:
operationId: v2blobsStore
tags:
- blobs
description: Store data in blob storage
requestBody:
required: true
content:
application/json:
schema:
type: string
format: binary
description: Binary input data
description: Binary input data
parameters:
- schema:
type: string
minLength: 1
maxLength: 512
in: path
name: key
required: true
description: Key that uniquely identifies this blob
security:
- bearerAuth: []
responses:
'201':
description: Default Response
content:
application/json:
schema:
type: string
enum:
- ok
'400':
description: Default Response
content:
application/json:
schema:
type: object
required:
- error
properties:
error:
type: string
message:
type: string
delete:
operationId: v2blobsDelete
tags:
- blobs
description: Delete a blob
parameters:
- schema:
type: string
minLength: 1
maxLength: 512
in: path
name: key
required: true
description: Key that uniquely identifies this blob
security:
- bearerAuth: []
responses:
'204':
description: Blob successfully deleted
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Endpoints that support authorization expect Bearer authentication, using an API token provided from Val Town.
externalDocs:
url: https://api.val.town/documentation
description: Find more info here