Skip to main content

Catalog upload

Generated from apiome-rest/openapi.yaml (API version 1.719.0) — do not edit by hand. How to authenticate is on the REST API reference.

Tag: catalog-upload · 4 operations

GET /v1/catalog/{tenant_slug}/upload-policy​

Get Catalog Upload Policy

Read the tenant's staleness threshold for uploaded catalog items (projects:view).

Operation id: get_catalog_upload_policy_v1_catalog__tenant_slug__upload_policy_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get catalog upload policy.application/json CatalogUploadPolicy
422Validation Errorapplication/json HTTPValidationError

PUT /v1/catalog/{tenant_slug}/upload-policy​

Set Catalog Upload Policy

Change how many days old an uploaded item's newest version is before it may be stale (imports:edit).

Operation id: set_catalog_upload_policy_v1_catalog__tenant_slug__upload_policy_put

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for set catalog upload policy.

Responses

StatusDescriptionBody
200Successful response for set catalog upload policy.application/json CatalogUploadPolicy
422Validation Errorapplication/json HTTPValidationError

POST /v1/catalog/{tenant_slug}/{item_id}/reupload​

Reupload Catalog Item

Re-import a new copy of the item's uploaded file with the import spec it recorded.

The file goes through the import pipeline with the importer and options of the original upload, and the tenant's import quality gate, exactly as an upload would. A file identical to the current version writes nothing (unchanged); a changed one adds a date/time-labelled version with a change report against the version it supersedes (changed).

Raises: HTTPException: 404 when the item is not a catalog item in the tenant; 409 not-an-upload when its newest version did not come from an upload; 409 QUALITY_POLICY_BLOCKED; 413 when the file is over the intake limit; 422 when the file is not valid base64 or cannot be imported.

Operation id: reupload_catalog_item_v1_catalog__tenant_slug___item_id__reupload_post

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
item_idpathstringyesCatalog item identifier.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Request body (required)

Request body for reupload catalog item.

Responses

StatusDescriptionBody
200Successful response for reupload catalog item.application/json CatalogReuploadOut
422Validation Errorapplication/json HTTPValidationError

GET /v1/catalog/{tenant_slug}/{item_id}/upload​

Get Catalog Item Upload

Whether the item came from an upload, how old it is and whether it may be stale (projects:view).

Operation id: get_catalog_item_upload_v1_catalog__tenant_slug___item_id__upload_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
item_idpathstringyesCatalog item identifier.
authorizationheaderstring or nullnoJWT bearer token for authenticated access (Authorization: Bearer <token>).
X-API-Keyheaderstring or nullnoTenant-scoped API key used as an alternative to JWT bearer authentication.

Responses

StatusDescriptionBody
200Successful response for get catalog item upload.application/json CatalogUploadOut
422Validation Errorapplication/json HTTPValidationError

Schemas used​

CatalogReuploadOut​

What a re-upload did, and the item's upload state afterwards.

PropertyTypeRequiredDescription
statusenum "changed", "unchanged"yeschanged: the file differed, so a version was added; unchanged: it matches the current version and nothing was written.
specReplayedbooleanyesTrue when the stored import spec was replayed; false for an upload from before spec capture, which ran with default options.
versionIdstring or nullnoVersion ID.
versionLabelstring or nullnoVersion Label.
uploadCatalogUploadOutyesUpload.

CatalogReuploadRequest​

POST …/{item_id}/reupload: the new copy of the file.

PropertyTypeRequiredDescription
filenamestringyesThe file's name.
documentBase64stringyesStandard base64 (RFC 4648) of the file bytes; no data: URL prefix.
contentTypestring or nullnoOptional MIME type hint.

CatalogUploadOut​

Whether an item's current version came from an upload and whether it may be stale.

PropertyTypeRequiredDescription
itemIdstringyesItem ID.
eligiblebooleanyesTrue when the item's newest version came from a file upload, so it can be re-uploaded.
stalebooleanyesTrue when it is eligible and at least staleAfterDays old.
staleAfterDaysintegeryesStale After Days.
uploadedAtstring or nullnoUploaded At.
ageDaysinteger or nullnoAge Days.
versionIdstring or nullnoVersion ID.
versionLabelstring or nullnoVersion Label.
sourceLabelstring or nullnoThe uploaded file's name.
specCatalogUploadSpec or nullnoThe stored import spec; null for an upload from before spec capture, whose re-upload runs with default options.

CatalogUploadPolicy​

The tenant's staleness threshold for uploaded catalog items.

PropertyTypeRequiredDescription
staleAfterDaysintegeryesAn uploaded item's newest version this many days old or older may be stale (default 90).

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.