Skip to main content

Check BLOB

Checks the existence of a BLOB by its SHA256 digest

Function CheckBlob(Val URL, Val SHA256, Val AdditionalHeaders = "") Export

ParameterCLI optionTypeRequiredDescription
URL--urlStringOllama server URL
SHA256--digestStringSHA256 BLOB digest
AdditionalHeaders--headersMap Of KeyAndValueAdditional request headers, if necessary

Returns: Map Of KeyAndValue - Processing result


tip

Method at API documentation: Check if a Blob Exists


1C:Enterprise/OneScript code example
    URL    = "https://hut.openintegrations.dev/ollama";
Token = "12We34..."; // Authorization - not part API Ollama
SHA256 = "6d09b4c092ea615aa20c0257c1ae6533b2a962f9ea6444dec455e0d635f516ee";

AdditionalHeaders = New Map;
AdditionalHeaders.Insert("Authorization", StrTemplate("Bearer %1", Token));

Result = OPI_Ollama.CheckBlob(URL, SHA256, AdditionalHeaders);
    # JSON data can also be passed as a path to a .json file

oint ollama CheckBlob \
--url "https://hut.openintegrations.dev/ollama" \
--digest "yoyoyo" \
--headers "{'Authorization':'***'}"
Result
{
"status_code": 200
}