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 api = new ViewLexiSdk(
"http://localhost:8000/",//endpoint
"<tenant-guid>", //tenant Id
"default" //access key
);
const retrieveIngestQueue = async () => {
try {
const response = await api.ingestQueueSdk.read(
"<ingestqueue-guid>",
);
console.log(response, "IngestQueue fetched successfully");
} catch (err) {
console.log("Error fetching IngestQueue:", err);
}
};
retrieveIngestQueue();
import view_sdk
from view_sdk import lexi
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
def readIngestQueue():
queue = lexi.IngestQueue.retrieve("<ingestqueue-guid>")
print(queue)
readIngestQueue()
using View.Sdk;
using View.Sdk.Lexi;
ViewLexiSdk sdk = new ViewLexiSdk(Guid.Parse("<ingestqueue-guid>"),"default", "http://localhost:8000/");
IngestionQueueEntry IngestionQueueEntry = await sdk.RetrieveIngestQueueEntry(Guid.Parse("<ingestqueue-guid>"));
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 api = new ViewLexiSdk(
"http://localhost:8000/",//endpoint
"<tenant-guid>", //tenant Id
"default" //access key
);
const retrieveIngestQueueStats = async () => {
try {
const response = await api.ingestQueueSdk.readStatistics(
"<ingestqueue-guid>"
);
console.log(response, "IngestQueue stats retrieved successfully");
} catch (err) {
console.log("Error retrieving IngestQueue stats:", err);
}
};
retrieveIngestQueueStats();
import view_sdk
from view_sdk import lexi
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
def readIngestQueue():
queue = lexi.IngestQueue.retrieve_statistics("<ingestqueue-guid>")
print(queue)
readIngestQueue()
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 api = new ViewLexiSdk(
"http://localhost:8000/",//endpoint
"<tenant-guid>", //tenant Id
"default" //access key
);
const retrieveAllIngestQueue = async () => {
try {
const response = await api.ingestQueueSdk.readAll();
console.log(response, "IngestQueue retrieved successfully");
} catch (err) {
console.log("Error retrieving IngestQueue:", err);
}
};
retrieveAllIngestQueue();
import view_sdk
from view_sdk import lexi
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
def readAllIngestQueue():
queues = lexi.IngestQueue.retrieve_all()
print(queues)
readAllIngestQueue()
using View.Sdk;
using View.Sdk.Lexi;
ViewLexiSdk sdk = new ViewLexiSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
List<IngestionQueueEntry> IngestionQueueEntries = await sdk.RetrieveIngestQueueEntries();
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 api = new ViewLexiSdk(
"http://localhost:8000/",//endpoint
"<tenant-guid>", //tenant Id
"default" //access key
);
const existIngestQueue = async () => {
try {
const response = await api.ingestQueueSdk.exists(
"<ingestqueue-guid>"
);
console.log(response, "IngestQueue existence checked successfully");
} catch (err) {
console.log("Error checking IngestQueue existence:", err);
}
};
existIngestQueue();
import view_sdk
from view_sdk import lexi
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
def existsIngestQueue():
exists = lexi.IngestQueue.exists("<ingestqueue-guid>")
print(exists)
existsIngestQueue()
using View.Sdk;
using View.Sdk.Lexi;
ViewLexiSdk sdk = new ViewLexiSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
Guid IngestionQueueEntryGuid = Guid.Parse("<ingestqueue-guid>");
bool exists = await sdk.ExistsIngestQueueEntry(IngestionQueueEntryGuid);
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 api = new ViewLexiSdk(
"http://localhost:8000/",//endpoint
"<tenant-guid>", //tenant Id
"default" //access key
);
const deleteIngestQueue = async () => {
try {
const response = await api.ingestQueueSdk.delete(
"<ingestqueue-guid>"
);
console.log(response, "IngestQueue deleted successfully");
} catch (err) {
console.log("Error deleting IngestQueue:", err);
}
};
deleteIngestQueue();
import view_sdk
from view_sdk import lexi
sdk = view_sdk.configure( access_key="default",base_url="localhost", tenant_guid= "<tenant-guid>")
def deleteIngestQueue():
response = lexi.IngestQueue.delete("<ingestqueue-guid>")
print(response)
deleteIngestQueue()
using View.Sdk;
using View.Sdk.Lexi;
ViewLexiSdk sdk = new ViewLexiSdk(Guid.Parse("<tenant-guid>"),"default", "http://localhost:8000/");
Guid IngestionQueueEntryGuid = Guid.Parse("<ingestqueue-guid>");
bool deleted = await sdk.DeleteIngestQueueEntry(IngestionQueueEntryGuid);