PageWeave Discarded API
The Discarded API from PageWeave — 2 operation(s) for discarded.
Operations 2
GET
/api/v1/websites/{website_id}/discarded/{type}/{id}
Get a discarded resource with its latest content
#
The Discarded API from PageWeave — 2 operation(s) for discarded.
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/pageweave-dev:pageweave-dev-discarded-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: PageWeave Discarded API
version: 1.0.0
summary: Programmatic control plane for PageWeave websites.
description: 'Version 1 of the PageWeave HTTP API. Every endpoint under `/api/v1`
authenticates with a bearer API key unless its operation declares an
anonymous alternative — `security: []` or an optional requirement such as
`[{bearerAuth: []}, {}]` for upload sessions.
Errors use RFC 9457 Problem Details (`application/problem+json`). Rate
limits follow draft-ietf-httpapi-ratelimit-headers-11 and are reported on
every authenticated response through the `RateLimit-Policy` and
`RateLimit` headers.
The contract is additive within v1: operations and response fields may be
added, never removed or changed incompatibly.'
contact:
name: PageWeave
url: https://pageweave.dev/docs/api
externalDocs:
description: Guide, authentication, pagination, errors, and worked examples.
url: https://pageweave.dev/docs/api/guide
servers:
- url: https://pageweave.dev
description: Production
tags:
- name: Discarded
paths:
/api/v1/websites/{website_id}/discarded/{type}:
parameters:
- name: website_id
in: path
required: true
description: Website UUID or subdomain.
schema:
type: string
- name: type
in: path
required: true
description: Content type. One type per request keeps keyset pagination on a single uniquely ordered relation.
schema:
type: string
enum:
- page
- snippet
- component
get:
operationId: listDiscardedContent
summary: List discarded content
tags:
- Discarded
security:
- bearerAuth: []
x-required-permission: discarded.read
x-required-scope: website
x-required-credential: read
parameters:
- $ref: '#/components/parameters/Cursor'
- $ref: '#/components/parameters/Limit'
responses:
'200':
description: A page of discarded content
content:
application/json:
schema:
$ref: '#/components/schemas/DiscardedCollection'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
/api/v1/websites/{website_id}/discarded/{type}/{id}:
parameters:
- name: website_id
in: path
required: true
description: Website UUID or subdomain.
schema:
type: string
- name: type
in: path
required: true
description: Content type of the discarded row.
schema:
type: string
enum:
- page
- snippet
- component
- name: id
in: path
required: true
description: Discarded resource UUID.
schema:
type: string
format: uuid
get:
operationId: getDiscardedContent
summary: Get a discarded resource with its latest content
description: 'Live resource URLs answer 404 once discarded; this is the read path for
the bin. Restore through the resource''s own /restore operation.'
tags:
- Discarded
security:
- bearerAuth: []
x-required-permission: discarded.read
x-required-scope: website
x-required-credential: read
parameters:
- $ref: '#/components/parameters/IfNoneMatch'
responses:
'200':
description: The discarded resource and its latest content
headers:
ETag:
$ref: '#/components/headers/ETag'
Last-Modified:
$ref: '#/components/headers/LastModified'
content:
application/json:
schema:
oneOf:
- $ref: '#/components/schemas/PageDetail'
- $ref: '#/components/schemas/SnippetDetail'
- $ref: '#/components/schemas/ComponentDetail'
'304':
$ref: '#/components/responses/NotModified'
'400':
$ref: '#/components/responses/BadRequest'
'401':
$ref: '#/components/responses/Unauthorized'
'403':
$ref: '#/components/responses/Forbidden'
'404':
$ref: '#/components/responses/NotFound'
'429':
$ref: '#/components/responses/TooManyRequests'
components:
headers:
RetryAfter:
description: Seconds to wait before retrying.
schema:
type: integer
ETag:
description: Strong validator for the current representation.
schema:
type: string
LastModified:
description: Last modification time (HTTP-date).
schema:
type: string
WWWAuthenticate:
description: 'Bearer challenge (RFC 9110 §11.6.1, RFC 6750 §3).
Carries `error="invalid_token"` when a credential was presented but
could not be resolved. `/api/v1` uses the `api` realm; OAuth
protected-resource metadata (RFC 9728) is advertised by MCP only.
'
schema:
type: string
example: Bearer realm="api", error="invalid_token"
RateLimitPolicy:
description: 'The applicable quota policy (draft-ietf-httpapi-ratelimit-headers-11).
'
schema:
type: string
example: '"write";q=120;w=60'
RateLimit:
description: 'The remaining quota and seconds until the window resets
(draft-ietf-httpapi-ratelimit-headers-11).
'
schema:
type: string
example: '"write";r=119;t=42'
schemas:
SnippetDetail:
type: object
additionalProperties: false
required:
- id
- path
- content_type
- byte_size
- relative_url
- version_count
- latest_version_number
- created_at
- updated_at
- content
- version_number
properties:
id:
type: string
format: uuid
path:
type: string
content_type:
type: string
byte_size:
type:
- integer
- 'null'
relative_url:
type:
- string
- 'null'
version_count:
type: integer
minimum: 0
latest_version_number:
type:
- integer
- 'null'
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
content:
type:
- string
- 'null'
version_number:
type:
- integer
- 'null'
PageDetail:
type: object
additionalProperties: false
required:
- id
- path
- language
- indexable
- table_id
- table_slug
- placeholder_defaults
- title
- version_count
- latest_version_number
- created_at
- updated_at
- html_content
- markdown_content
- additional_html_head_html
- version_number
- incoming_redirects
properties:
id:
type: string
format: uuid
path:
type: string
language:
type:
- string
- 'null'
indexable:
type: boolean
table_id:
type:
- string
- 'null'
format: uuid
table_slug:
type:
- string
- 'null'
placeholder_defaults:
type:
- object
- 'null'
additionalProperties:
type: string
title:
type:
- string
- 'null'
version_count:
type: integer
minimum: 0
latest_version_number:
type:
- integer
- 'null'
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
html_content:
type:
- string
- 'null'
markdown_content:
type:
- string
- 'null'
additional_html_head_html:
type:
- string
- 'null'
version_number:
type:
- integer
- 'null'
incoming_redirects:
type: array
maxItems: 100
description: 'Up to 100 incoming redirects, ordered by `source_path`. The
redirects collection endpoint is the full list.
'
items:
type: object
additionalProperties: false
required:
- source_path
- status_code
properties:
source_path:
type: string
status_code:
type: integer
enum:
- 301
- 302
DiscardedItem:
type: object
additionalProperties: false
required:
- type
- id
- path
- title
- kind
- content_type
- discarded_at
- purge_at
properties:
type:
type: string
enum:
- page
- snippet
- component
id:
type: string
format: uuid
path:
type:
- string
- 'null'
title:
type:
- string
- 'null'
kind:
type:
- string
- 'null'
content_type:
type:
- string
- 'null'
discarded_at:
type: string
format: date-time
purge_at:
type: string
format: date-time
Problem:
type: object
example:
type: https://pageweave.dev/errors/forbidden
title: Forbidden
status: 403
detail: The API key lacks the page.create permission for this website.
instance: /api/v1/websites/019f9c2a-6a1b-7a3d-8f2e-4b6c8d0e1f23/pages
request_id: 019fc8e5-8f6a-9b7c-8d85-4f6a7b8c9d0e
required_permission: page.create
required_permission_scope: website
required_credential_scope: write
required:
- type
- title
- status
- instance
properties:
type:
type: string
format: uri
title:
type: string
status:
type: integer
detail:
type: string
instance:
type: string
request_id:
type:
- string
- 'null'
errors:
type: array
items:
type: object
additionalProperties: false
required:
- field
- detail
properties:
field:
type: string
detail:
type: string
code:
type: string
upgrade_url:
type: string
required_permission:
type:
- string
- 'null'
description: Declared endpoint permission; null for account-level endpoints with no resource permission.
required_permission_scope:
type:
- string
- 'null'
description: Scope the permission resolves in (workspace, website, environment); null when there is no resource permission.
required_credential_scope:
type:
- string
- 'null'
description: The read/write scope the presented bearer credential lacks; present on credential-ceiling 403s.
retry_after_seconds:
type: integer
minimum: 1
description: Seconds until the quota resets (RFC 9457 extension member, on too-many-requests only). Authoritative over retry_at when clocks differ.
retry_at:
type: string
format: date-time
description: UTC "not before" timestamp — when the quota window ends (RFC 9457 extension member, on too-many-requests only).
suggested_path:
type: string
description: First free path for a restore whose original path is taken, when one can be suggested (RFC 9457 extension member; nothing is renamed automatically).
template_pages:
type: array
description: Live template pages that reference a table whose deletion was refused (RFC 9457 extension member).
items:
type: object
additionalProperties: false
required:
- id
- path
properties:
id:
type: string
format: uuid
path:
type: string
conflicts:
type: array
description: Release items edited by someone else after the caller's last edit (RFC 9457 extension member).
items:
type: object
additionalProperties: false
required:
- type
- identifier
- mine_version
- latest_version
- latest_author
properties:
type:
type: string
identifier:
type: string
mine_version:
type: integer
latest_version:
type: integer
latest_author:
type:
- string
- 'null'
matches:
type: array
description: Candidate short ids for an ambiguous feedback reference (RFC 9457 extension member).
items:
type: string
items:
type: array
description: Identifiers that made a release selection invalid (RFC 9457 extension member).
items:
type: string
nameservers:
type: array
description: Live parent NS answer that still delegates a zone to PageWeave, sent with a refused zone deletion (RFC 9457 extension member).
items:
type: string
existing_id:
type: string
format: uuid
description: Identifier of the existing resource that caused a conflict, such as a pending invitation (RFC 9457 extension member).
DiscardedCollection:
type: object
additionalProperties: false
required:
- data
- pagination
properties:
data:
type: array
items:
$ref: '#/components/schemas/DiscardedItem'
pagination:
$ref: '#/components/schemas/Pagination'
ComponentDetail:
type: object
additionalProperties: false
required:
- id
- kind
- priority
- conditions
- version_count
- latest_version_number
- created_at
- updated_at
- html_content
- version_number
properties:
id:
type: string
format: uuid
kind:
type: string
enum:
- header
- footer
- html_head
priority:
type:
- integer
- 'null'
conditions:
type:
- object
- 'null'
version_count:
type: integer
minimum: 0
latest_version_number:
type:
- integer
- 'null'
created_at:
type: string
format: date-time
updated_at:
type: string
format: date-time
html_content:
type:
- string
- 'null'
version_number:
type:
- integer
- 'null'
Pagination:
type: object
additionalProperties: false
required:
- limit
- has_more
- next_cursor
properties:
limit:
type: integer
minimum: 0
has_more:
type: boolean
next_cursor:
type:
- string
- 'null'
parameters:
Limit:
name: limit
in: query
required: false
description: Page size (1-100, default 25).
schema:
type: integer
minimum: 1
maximum: 100
default: 25
Cursor:
name: cursor
in: query
required: false
description: Opaque keyset cursor from the previous page's `pagination.next_cursor`.
schema:
type: string
IfNoneMatch:
name: If-None-Match
in: header
required: false
description: 'Revalidate a cached representation; a matching value answers 304
without a body (RFC 9110 §13.1.2).
'
schema:
type: string
responses:
TooManyRequests:
description: A rate limit was exceeded
headers:
Retry-After:
$ref: '#/components/headers/RetryAfter'
RateLimit-Policy:
$ref: '#/components/headers/RateLimitPolicy'
RateLimit:
$ref: '#/components/headers/RateLimit'
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
Unauthorized:
description: Missing, invalid, expired, or revoked credential
headers:
WWW-Authenticate:
$ref: '#/components/headers/WWWAuthenticate'
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
BadRequest:
description: The request is malformed or carries unknown query parameters
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
Forbidden:
description: The session, credential, or role does not permit the action
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
NotFound:
description: The resource does not exist or is not visible to this caller
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
NotModified:
description: The representation has not changed
headers:
ETag:
$ref: '#/components/headers/ETag'
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'API key created in Settings → API keys. Send
`Authorization: Bearer pagew_...`. A key''s scopes (`read`, `write`) are
a ceiling: a read-only key cannot write even when its owner''s role
allows it.
'