This page provides an overview of APIs related to Ingest Queue.
Read
To read an ingest queue by GUID, call GET /v1.0/tenants/[tenant-guid]/ingestqueue/[ingestqueue-guid]
. If the object exists, it will be returned as a JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound
error response.
Note: the HEAD
method can be used as an alternative to get to simply check the existence of the object. HEAD
requests return either a 200/OK
in the event the object exists, or a 404/Not Found
if not. No response body is returned with a HEAD
request.
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/ingestqueue/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'
import { ViewLexiSdk } from "view-sdk";
const lexi = new ViewLexiSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const retrieveSourceDocument = async () => {
try {
const response = await lexi.retrieveSourceDocument(
"00000000-0000-0000-0000-000000000000",
"fd937de1-480a-4db8-9025-c7ac0bd8d66c"
);
console.log(response, "SourceDocument fetched successfully");
} catch (err) {
console.log("Error fetching SourceDocument:", err);
}
};
retrieveSourceDocument();
Read stats
To read an ingest queue stats by GUID, call GET /v1.0/tenants/[tenant-guid]/ingestqueue/[ingestqueue-guid]?stats
. If the object exists, it will be returned as a JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound
error response.
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/ingestqueue/00000000-0000-0000-0000-000000000000?stats' \
--header 'Authorization: ••••••'
import { ViewLexiSdk } from "view-sdk";
const lexi = new ViewLexiSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const retrieveIngestQueueStats = async () => {
try {
const response = await lexi.retrieveIngestQueueStats(
"00000000-0000-0000-0000-000000000000"
);
console.log(response, "IngestQueue stats retrieved successfully");
} catch (err) {
console.log("Error retrieving IngestQueue stats:", err);
}
};
retrieveIngestQueueStats();
Read All
To read all Ingest Queues, call GET /v1.0/tenants/[tenant-guid]/ingestqueue
. This API will return a JSON array. If it does not exist, a 404 will be returned with a NotFound
error response.
curl --location 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/ingestqueue' \
--header 'Authorization: ••••••'
import { ViewLexiSdk } from "view-sdk";
const lexi = new ViewLexiSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const retrieveAllIngestQueue = async () => {
try {
const response = await lexi.retrieveAllIngestQueue();
console.log(response, "IngestQueue retrieved successfully");
} catch (err) {
console.log("Error retrieving IngestQueue:", err);
}
};
retrieveAllIngestQueue();
Check Existence
To check existence of ingest queue by GUID, call HEAD /v1.0/tenants/[tenant-guid]/ingestqueue/[ingestqueue-guid]
. If the object exists, it will be returned as a JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound
error response.
curl --location --head 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/ingestqueue/00000000-0000-0000-0000-000000000000' \
--header 'Authorization: ••••••'
import { ViewLexiSdk } from "view-sdk";
const lexi = new ViewLexiSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const existIngestQueue = async () => {
try {
const response = await lexi.existsIngestQueue(
"00000000-0000-0000-0000-000000000000"
);
console.log(response, "IngestQueue existence checked successfully");
} catch (err) {
console.log("Error checking IngestQueue existence:", err);
}
};
existIngestQueue();
Delete
To delete an ingest queue by GUID, call DELETE /v1.0/tenants/[tenant-guid]/ingestqueue/[ingestqueue-guid]
. If the object exists, it will be returned as a JSON object in the response body. If it does not exist, a 404 will be returned with a NotFound
error response.
curl --location --request DELETE 'http://view.homedns.org:8000/v1.0/tenants/00000000-0000-0000-0000-000000000000/ingestqueue/00000000-0000-0000-0000-000000000000' \
--header 'Content-Type: application/json' \
--header 'Authorization: ••••••'
import { ViewLexiSdk } from "view-sdk";
const lexi = new ViewLexiSdk(
"00000000-0000-0000-0000-000000000000", //tenant Id
"default", //access token
"http://localhost:8000/" //endpoint
);
const deleteIngestQueue = async () => {
try {
const response = await lexi.deleteIngestQueue(
"00000000-0000-0000-0000-000000000000"
);
console.log(response, "IngestQueue deleted successfully");
} catch (err) {
console.log("Error deleting IngestQueue:", err);
}
};
deleteIngestQueue();