Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Record version

List all record versions

Query parameters

nested boolean

For Modular Content, Structured Text and Single Block fields. If set, returns full payload for nested blocks instead of IDs

page object

Parameters to control offset-based pagination

offset integer

The (zero-based) offset of the first entity returned in the collection (defaults to 0)

Example: 200
limit integer

The maximum number of entities to return (defaults to 15, maximum is 50)

Returns

Returns an array of resource objects of type item_version

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const itemId = "59JSonvYTCOUDz_b7_6hvA";
// iterates over every page of results
for await (const itemVersion of client.itemVersions.listPagedIterator(
itemId,
)) {
// Check the 'Returned output' tab for the result ☝️
console.log(itemVersion);
}
}
run();