Skip to main content
Storage provider endpoints let you configure where NekoHub stores uploaded assets. You can maintain multiple profiles and designate one as the default. All endpoints require authentication via JWT Bearer token or API key. Supported provider types:
  • local — local filesystem storage
  • s3 — S3-compatible object storage (AWS S3, MinIO, R2, etc.)
  • github-repo — GitHub repository storage

Get storage providers overview

Returns all configured storage profiles, the active default profile, and runtime information about the currently active storage backend. Required permission: providers.read

Response

object

Example


Create a storage profile

Creates a new storage provider profile. Required permission: providers.create

Request body

string
required
Unique internal name for the profile (e.g. my-s3-bucket).
string
required
Human-readable name shown in the UI.
string
required
Provider type. One of: local, s3, github-repo.
boolean
Whether the profile is enabled. Defaults to true.
boolean
Whether to set this as the default profile. Defaults to false.
object
Provider-specific non-sensitive configuration (e.g. bucket name, region, root path, repository owner/name).
object
Provider-specific sensitive configuration (e.g. access key, secret key, GitHub token). Values in this object are stored encrypted and are not returned in GET responses.

Response — 201 Created

Returns the created storage profile object.

Example — create an S3 profile


Update a storage profile

Updates an existing storage provider profile. Only fields you include are changed. Required permission: providers.update

Path parameters

string (uuid)
required
The unique identifier of the profile to update.

Request body

string
New internal name. Omit to leave unchanged.
string
New display name. Omit to leave unchanged.
boolean
New enabled state. Omit to leave unchanged.
object
Updated non-sensitive configuration. Omit to leave unchanged.
object
Updated sensitive configuration. Omit to leave unchanged.

Response — 200 OK

Returns the updated storage profile object.

Example


Delete a storage profile

Deletes a storage provider profile. Existing assets stored under this profile are not automatically migrated or deleted. Required permission: providers.delete

Path parameters

string (uuid)
required
The unique identifier of the profile to delete.

Response

object

Example


Set default storage profile

Marks the specified profile as the default storage profile for new asset uploads. Required permission: settings.update

Path parameters

string (uuid)
required
The unique identifier of the profile to set as default.

Response — 200 OK

Returns the updated storage profile object.

Example


Browse a GitHub Repo directory

Lists files and directories within a GitHub-based storage profile. Only available for profiles with providerType: github-repo. Required permission: providers.read

Path parameters

string (uuid)
required
The unique identifier of a github-repo storage profile.

Query parameters

string
Directory path to browse. Defaults to the repository root.
boolean
Whether to list contents recursively.
integer
Maximum recursion depth when recursive is true.
string
Filter by entry type: file, dir, or omit for all.
string
Filter entries by name keyword.
integer
Page number. Defaults to 1.
integer
Results per page.

Response

object

Example


Upsert a file in a GitHub Repo

Creates or updates a single file in a GitHub-based storage profile. Required permission: providers.update

Path parameters

string (uuid)
required
The unique identifier of a github-repo storage profile.

Request body

string
required
Path within the repository where the file should be written (e.g. images/2026/photo.png).
string
required
Base64-encoded content of the file to write.
string
Optional commit message. Defaults to a generated message if omitted.
string
For updates: the current file’s Git blob SHA. Required when updating an existing file to prevent conflicts. Omit when creating a new file.

Response

object
Returns 409 Conflict if the expectedSha does not match the current file SHA.

Example