xhostd Exports API
The Exports API from xhostd — 5 operation(s) for exports.
The Exports API from xhostd — 5 operation(s) for exports.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/xhostd-com:xhostd-com-exports-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: xhostd public Exports API
version: 0.1.0
tags:
- name: Exports
paths:
/exports:
post:
summary: Create Export
operationId: create_export_exports_post
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/CreateExportRequest'
responses:
'202':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ExportResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Exports
get:
summary: List Exports
description: 'List the exports of the caller, newest first.
The route only reads, so it runs on ``run_read_in_thread``. It costs
one round trip to the control DB.'
operationId: list_exports_exports_get
parameters:
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/ExportResponse'
title: Response List Exports Exports Get
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Exports
/exports/{export_id}:
get:
summary: Get Export
description: 'Report one export the caller owns.
The route only reads, so it runs on ``run_read_in_thread``. It costs
one round trip to the control DB.'
operationId: get_export_exports__export_id__get
parameters:
- name: export_id
in: path
required: true
schema:
type: string
format: uuid
title: Export Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/ExportResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Exports
/exports/{export_id}/download-token:
post:
summary: Create Export Download Token
description: 'Mint an on-demand ``exports:read`` token for a ready, owned export.
Ownership + readiness are enforced by :func:`resolve_export_download`
(404 on non-owner / not-ready), mirroring the download routes. The
scope gate follows them, exactly as on the download routes, so a
stranger reads 404 before any 403. The caller must hold
``exports:read`` itself: a mint never grants more than the caller
already holds, so a ``snapshots:read`` or ``blobs:read`` download
token cannot rotate into this artifact. The plaintext is returned once
and never persisted or logged; the token carries the same label the
builder''s ``_finalize`` uses, so the sweeper''s existing revocation
covers it.
The mint never outlives the caller either, so ``bounded_expiry``
holds the token to the earlier of the export''s expiry and the
caller''s own. That also answers the export row whose ``expires_at``
is NULL: the token takes the caller''s expiry instead of living
forever. The clamp is silent, because the request carries no lifetime
field. The response reports the token''s expiry, which is what governs
the download the caller is about to run.'
operationId: create_export_download_token_exports__export_id__download_token_post
parameters:
- name: export_id
in: path
required: true
schema:
type: string
format: uuid
title: Export Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/DownloadTokenResponse'
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Exports
/exports/{export_id}/download:
get:
summary: Download Export
operationId: download_export_exports__export_id__download_get
parameters:
- name: export_id
in: path
required: true
schema:
type: string
format: uuid
title: Export Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Exports
/exports/{export_id}/download/blobs:
get:
summary: Download Export Blobs
description: 'Live-stream ``blobs.tar.gz`` from the version-pinned inventory.
Bearer + ``exports:read`` + ownership, then the threshold gate: an
over-threshold inventory returns 409 (the export was flagged
incomplete at build time). Every key/version/bucket streamed comes
ONLY from the staged inventory — the route never accepts a
client-supplied key, version, or bucket (SSRF / cross-tenant guard).'
operationId: download_export_blobs_exports__export_id__download_blobs_get
parameters:
- name: export_id
in: path
required: true
schema:
type: string
format: uuid
title: Export Id
- name: authorization
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Authorization
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
tags:
- Exports
components:
schemas:
ExportResponse:
properties:
id:
type: string
format: uuid
title: Id
scope:
type: string
title: Scope
app_id:
type: string
format: uuid
title: App Id
channel_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Channel Id
status:
type: string
title: Status
detail:
anyOf:
- type: string
- type: 'null'
title: Detail
progress_pct:
type: integer
title: Progress Pct
size_bytes:
anyOf:
- type: integer
- type: 'null'
title: Size Bytes
error:
anyOf:
- type: string
- type: 'null'
title: Error
blobs_included:
type: boolean
title: Blobs Included
blobs_reason:
anyOf:
- type: string
- type: 'null'
title: Blobs Reason
blob_object_count:
anyOf:
- type: integer
- type: 'null'
title: Blob Object Count
blob_bytes_estimate:
anyOf:
- type: integer
- type: 'null'
title: Blob Bytes Estimate
created_at:
type: string
title: Created At
finished_at:
anyOf:
- type: string
- type: 'null'
title: Finished At
expires_at:
anyOf:
- type: string
- type: 'null'
title: Expires At
type: object
required:
- id
- scope
- app_id
- channel_id
- status
- detail
- progress_pct
- size_bytes
- error
- blobs_included
- blobs_reason
- blob_object_count
- blob_bytes_estimate
- created_at
- finished_at
- expires_at
title: ExportResponse
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
DownloadTokenResponse:
properties:
token:
type: string
title: Token
download_url:
type: string
title: Download Url
blobs_download_url:
type: string
title: Blobs Download Url
expires_at:
anyOf:
- type: string
- type: 'null'
title: Expires At
blobs_included:
type: boolean
title: Blobs Included
blobs_reason:
anyOf:
- type: string
- type: 'null'
title: Blobs Reason
type: object
required:
- token
- download_url
- blobs_download_url
- expires_at
- blobs_included
- blobs_reason
title: DownloadTokenResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
CreateExportRequest:
properties:
scope:
type: string
title: Scope
app_id:
type: string
format: uuid
title: App Id
channel_id:
anyOf:
- type: string
format: uuid
- type: 'null'
title: Channel Id
type: object
required:
- scope
- app_id
title: CreateExportRequest