Delete Documents

以 Markdown 格式查看

Delete the documents of a domain, narrowed by the provided filters. Filters are combined with AND, so a document is only deleted when it matches all of them. At least one filter is required, or pass all=true to delete every document. The x-fern-basepath header narrows the deletion to a single basepath.

身份验证

AuthorizationBearer
Bearer 身份验证,格式为 `Bearer <token>`,其中 token 是您的身份验证令牌。

路径参数

domainstring必需

请求头

x-fern-basepathstring or null可选

The basepath of the docs site that the document belongs to, e.g. /plants for a site served at docs.example.com/plants. Omit this for sites served at the root of the domain. Documents are only retrieved by Ask Fern on the site matching the domain and basepath they were created with.

查询参数

productstring or null可选>=1 character
Only delete documents whose product matches this value exactly.
versionstring or null可选>=1 character
Only delete documents whose version matches this value exactly.
url_prefixstring or null可选>=1 character
Only delete documents whose url starts with this value.
allboolean可选默认为 false

Delete every document in the domain and basepath. Cannot be combined with the product, version or url_prefix filters.

响应

Successful Response
successboolean
Whether any documents were deleted
documents_deletedinteger
The number of documents that were deleted

错误

400
Bad Request Error
422
Unprocessable Entity Error