const jobs = await client.hostedExtractors.jobs.create([
{
externalId: 'my-mqtt-job',
sourceId: 'my-mqtt-broker',
destinationId: 'my-destination',
format: { type: 'value' },
config: { topicFilter: 'sensors/#' },
},
]);
await client.hostedExtractors.jobs.delete(
[{ externalId: 'my-mqtt-job' }],
{ ignoreUnknownIds: true }
);
const jobs = await client.hostedExtractors.jobs
.list({ source: 'my-mqtt-broker' })
.autoPagingToArray({ limit: Infinity });
Optionalquery: HostedExtractorJobListQueryLists the messages the job failed to transform. The job must have
dlqEnabled, and the caller needs read access to CDF RAW.
const messages = await client.hostedExtractors.jobs
.listDlqMessages({ job: 'my-mqtt-job' })
.autoPagingToArray({ limit: 100 });
Logs are returned newest first.
const logs = await client.hostedExtractors.jobs
.listLogs({ job: 'my-mqtt-job' })
.autoPagingToArray({ limit: 100 });
Optionalquery: HostedExtractorJobMonitoringQueryconst metrics = await client.hostedExtractors.jobs
.listMetrics({ job: 'my-mqtt-job' })
.autoPagingToArray({ limit: 100 });
Optionalquery: HostedExtractorJobMonitoringQueryconst jobs = await client.hostedExtractors.jobs.retrieve([
{ externalId: 'my-mqtt-job' },
]);
const jobs = await client.hostedExtractors.jobs.update([
{
externalId: 'my-mqtt-job',
update: { targetStatus: { set: 'paused' }, name: { 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.