REST API

Batch Endpoints

LAST EDIT Oct 14 2024

You can use batch endpoints to insert, delete or read multiple entries at once. These three endpoints are only available when running Stream on your backend.

Upsert

Copied!

Upsert allows you to insert or update up to 1000 entries with a single API call. The payload is an array of entries. Entries that already exist (same ID) will be updated with the new version.

nametypedescriptiondefaultoptional
collectionstringThe name of the collection-
entry_idstringThe id of the entry, if not given an ID will be generated by Stream-
dataobjectThe data related to the user-

Select

Copied!

This method allows you to retrieve up to 1000 entries by ID.

nametypedescriptiondefaultoptional
foreign_idslist of stringThe list of collection:id entries to retrieve (eg. ["visitor:123", "visitor:124"])-
dataobjectThe data related to the user-

Delete Many

Copied!

This method allows you to delete up to 1000 entries by ID.

nametypedescriptiondefaultoptional
collectionstringThe name of the collection-
idslist of stringsThe list of id to remove-

When you delete an entry from a collection any references will be converted to a missing reference error when reading feeds with enrichment.