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

1
import { buildClient } from "@datocms/cma-client-node";
2
3
async function run() {
4
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
5
6
const itemId = "59JSonvYTCOUDz_b7_6hvA";
7
8
// iterates over every page of results
9
for await (const itemVersion of client.itemVersions.listPagedIterator(
10
itemId,
11
)) {
12
// Check the 'Returned output' tab for the result ☝️
13
console.log(itemVersion);
14
}
15
}
16
17
run();