Class: DocumentsDeleteService

DocumentsDeleteService()

The Documents module enables deletion of ingested contents from Soffos.

Constructor

new DocumentsDeleteService()

Source:

Methods

call(user, document_ids) → {Promise.<Object>}

Parameters:
Name Type Description
user string The ID of the user accessing the Soffos API. Soffos assumes that the owner of the api is an application (app) and that app has users. Soffos API will accept any string.
document_ids Array.<string> A list of the document_ids of the documents to be deleted.
Source:
Returns:
success = true if operation succeded
Type
Promise.<Object>
Example
import { SoffosServices } from "soffosai";

const my_apiKey = "Token <put your api key here>";
const service = new SoffosServices.DocumentsDeleteService({apiKey:my_apiKey});
let  response = await service.call('client 987654321', ["0d059b3bf66b4ecfa124c175a6d3cd45"]);
console.log(JSON.stringify(response, null, 2));

// returns this if document_id exists and you own the document
// {
//     "success": true
// }

setInputConfigs(name, document_ids)

Parameters:
Name Type Description
name string Reference name of this Service. It will be used by the Pipeline to reference this Service.
document_ids Array.<string> | InputConfig A list of the document_ids of the documents to be deleted.
Source: