Skip to main content

URL imports

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: url-imports · 3 operations

GET /v1/tenants/{tenant_slug}/url-imports​

List URL imports and their refresh state

List the tenant's URL imports, newest first, with when each was last checked and refreshed.

At most 1,000 a page: pass the previous page's nextCursor as cursor until hasMore is false. A malformed cursor is a 400.

Operation id: list_url_imports_v1_tenants__tenant_slug__url_imports_get

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
projectIdquerystring or nullnoOnly this project's.
limitqueryintegernoPage size. At most 1000.
cursorquerystring or nullnoOpaque cursor from the previous page (next_cursor, or the X-Next-Cursor header). Omit for the first page.
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 list url imports and their refresh state.application/json UrlImportList
422Validation Errorapplication/json HTTPValidationError

POST /v1/tenants/{tenant_slug}/url-imports​

Record a URL import for auto-refresh

Record a URL import that just succeeded, so the URL refresh sweep keeps it up to date.

REST fetches the URL once (SSRF-guarded) to store the ETag, Last-Modified and SHA-256 a refresh compares with. When that fetch fails the lineage is still recorded, with the error, and the first check anchors on what the URL serves then. Recording the same URL for the same project again replaces the stored spec and anchors and keeps the refresh settings.

Raises: HTTPException: 404 when the project is not the tenant's; 422 for a URL that is not http/https or carries credentials, or a version that is not the project's.

Operation id: record_url_import_route_v1_tenants__tenant_slug__url_imports_post

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 record a url import for auto-refresh.

Responses

StatusDescriptionBody
201Successful response for record a url import for auto-refresh.application/json UrlImportOut
422Validation Errorapplication/json HTTPValidationError

PATCH /v1/tenants/{tenant_slug}/url-imports/{url_import_id}​

Turn a URL import's refresh on or off, or set its cadence

Change a URL import's refresh (imports:edit). Turning it on clears any backoff.

Raises: HTTPException: 404 when the URL import is not the tenant's.

Operation id: patch_url_import_v1_tenants__tenant_slug__url_imports__url_import_id__patch

Parameters

NameInTypeRequiredDescription
tenant_slugpathstringyesURL-safe tenant slug that scopes the request.
url_import_idpathstringyesPath parameter identifying the url import id segment.
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 turn a url import's refresh on or off, or set its cadence.

Responses

StatusDescriptionBody
200Successful response for turn a url import's refresh on or off, or set its cadence.application/json UrlImportOut
422Validation Errorapplication/json HTTPValidationError

Schemas used​

HTTPValidationError​

Validation error response emitted when request data fails schema checks.

PropertyTypeRequiredDescription
detailarray of ValidationErrornoDetail.

UrlImportList​

URL import lineages, newest first.

PropertyTypeRequiredDescription
urlImportsarray of UrlImportOutyesURL Imports.
hasMorebooleannoHas More.
nextCursorstring or nullnoNext Cursor.

UrlImportOut​

A URL import lineage and its refresh state.

PropertyTypeRequiredDescription
idstringyesStable resource identifier.
projectIdstringyesProject ID.
projectNamestring or nullnoProject Name.
projectSlugstring or nullnoProject Slug.
urlstringyesURL.
sourceKindstringyesSource Kind.
authenticatedbooleanyesImported with credentials: never refreshed.
refreshablebooleanyesOn, and not authenticated: the sweep checks it.
autoRefreshEnabledbooleanyesAuto Refresh Enabled.
refreshIntervalSecondsinteger or nullnoOwn cadence; null means the default.
effectiveIntervalSecondsintegeryesThe cadence the sweep uses.
etagstring or nullnoETag recorded at the last import.
lastModifiedstring or nullnoLast-Modified recorded at the last import.
lastVersionIdstring or nullnoLast Version ID.
lastCheckedAtstring or nullnoLast Checked At.
lastRefreshedAtstring or nullnoLast Refreshed At.
lastStatusenum "up-to-date", "refreshing", "refreshed", "diverged", "failed" or nullnoLast Status.
lastReasonstring or nullnoWhy: not-modified, idempotent, stale, newer-content, baseline, manual-edit, or an error class.
lastErrorstring or nullnoLast Error.
consecutiveFailuresintegernoConsecutive Failures.
backoffUntilstring or nullnoBackoff Until.
createdAtstring or nullnoCreated At.
updatedAtstring or nullnoUpdated At.

UrlImportRecordRequest​

A URL import that just succeeded.

PropertyTypeRequiredDescription
projectIdstringyesThe project the import landed in.
urlstringyesThe http/https URL the spec was imported from.
versionIdstring or nullnoThe version the import produced (versions.id); its content is the manual-edit baseline.
sourceKindstringnoImporter kind (openapi, arazzo).
formatOverridestring or nullnoResolved spec format, when recorded.
contentTypestring or nullnoMIME type the document was parsed as.
optionsobjectnoThe import options, verbatim; a refresh replays them.
authenticatedbooleannoThe import was fetched with credentials. Recorded but never refreshed; credentials are not sent.

UrlImportSettingsPatch​

Change a URL lineage's refresh; an omitted field is left as it is.

PropertyTypeRequiredDescription
autoRefreshEnabledboolean or nullnoRefresh this URL on its cadence.
refreshIntervalSecondsinteger or nullnoSeconds between checks (raised to the deployment floor). Omit to keep it.
useDefaultIntervalbooleannoGo back to the deployment's default cadence.