List knowledgebase document revisions
const url = 'https://app.prefactorai.com/api/v1/knowledgebase_document_revision?knowledgebase_document_id=013xrzp12g3nqk8ns6jadrqmpgrjkeny';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://app.prefactorai.com/api/v1/knowledgebase_document_revision?knowledgebase_document_id=013xrzp12g3nqk8ns6jadrqmpgrjkeny' \ --header 'Authorization: Bearer <token>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”A valid knowledgebase document ID
Example
013xrzp12g3nqk8ns6jadrqmpgrjkenyDocument whose revisions are listed, newest first
Zero-based offset of the first item to return.
Number of items to return per page (1-100).
Responses
Section titled “Responses”Success
object
Pagination information
object
The total number of items
The index of the last item in the page (one-based)
The index of the first item in the page (one-based)
The total number of pages
The index of the current page (one-based)
The offset of the first item in the page (zero-based)
The number of items per page
Null
Sorting information
object
The direction to sort by
The field to sort by (values depend on the type of list)
Where to place null values. auto leaves placement to the database default.
Response status when the query succeeds
Revisions of the document, newest first
Summary of a knowledgebase document revision for list responses
object
The change this revision records
SHA-256 of the content after this revision, as lowercase hex
MIME type of the document after this revision
A valid admin user ID
Null
A valid API token ID
Null
A valid knowledgebase document revision ID
When the revision was created
A valid knowledgebase document ID
Knowledgebase revision number this change belongs to
Document path after this revision
Revision number of this document, starting at 1
Size of the content in bytes after this revision
Type of resource (always ‘knowledgebase_document_revision’)
Example
{ "pagination": { "item_count": 200, "item_end": 100, "item_start": 91, "next_page_offset": 110, "page_count": 20, "page_index": 10, "page_offset": 90, "page_size": 10, "previous_page_offset": 80 }, "sorting": { "direction": "asc", "field": "id", "nulls": "first" }, "status": "success", "summaries": [ { "change_kind": "create", "content_sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "content_type": "text/markdown", "created_by_admin_user_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "created_by_api_token_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "inserted_at": "2024-01-01T00:00:00Z", "knowledgebase_document_id": "013xrzp12g3nqk8ns6jadrqmpgrjkeny", "knowledgebase_revision_number": 4, "path": "guides/setup.md", "revision_number": 2, "size_bytes": 128, "type": "knowledgebase_document_revision" } ]}default
Section titled “default”Error
object
object
object
object
Milliseconds until the client may retry.
object
A valid knowledgebase document revision ID
Example
{ "code": "bad_request", "status": "error"}