const [session] = await client.sessions.create([
{ clientId: 'my-client-id', clientSecret: 'my-client-secret' },
]);
const destinations = await client.hostedExtractors.destinations.create([
{
externalId: 'my-destination',
credentials: { nonce: session.nonce },
targetDataSetId: 123,
},
]);
await client.hostedExtractors.destinations.delete(
[{ externalId: 'my-destination' }],
{ ignoreUnknownIds: true, force: true }
);
const destinations = await client.hostedExtractors.destinations
.list()
.autoPagingToArray({ limit: Infinity });
Optionalquery: FilterQueryconst destinations = await client.hostedExtractors.destinations.retrieve([
{ externalId: 'my-destination' },
]);
const destinations = await client.hostedExtractors.destinations.update([
{
externalId: 'my-destination',
update: { name: { set: 'My destination' }, targetDataSetId: { setNull: true } },
},
]);
Shared behaviour of the hosted extractor sub-APIs: they identify items by external ID, use
byIds(notbyids), and accept at most 10 items per create or update request and 100 per retrieve or delete request.