Show examples in:
JavascriptHTTP
Endpoint info
Available examples
Content Management API > Search indexing activity

List all search indexing events

Query parameters

pageobject

Parameters to control offset-based pagination

offsetinteger

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

limitinteger

The maximum number of entities to return (defaults to 30, maximum is 500)

filterobject

Attributes to filter

idsstring

IDs to fetch, comma separated

Example:"42,554"
fieldsobject
search_index_idobject
eqstring
event_typeobject
eqenum

The type of activity

Example:"indexing_success"
indexing_started

Site indexing started

indexing_success

Site indexing completed successfully

indexing_failure

Site indexing failed

indexing_aborted

Site indexing aborted by user

created_atobject
gtdate-time
ltdate-time
order_byenum

Fields used to order results

Example:"created_at_desc"
search_index_id_asc
search_index_id_desc
created_at_asc
created_at_desc
event_type_asc
event_type_desc

Returns

Returns an array of resource objects of type search_index_event

Examples

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