Part 5: Ingestion

Perform a simple file ingestion.

Perform an ingestion

In this example, you will use the following request to ingest the Nuix Engine documentation that is distributed as part of the Nuix RESTful Service installation. After you perform the request, an asynchronous function key will be returned which you can poll for status.

curl --location --request POST 'http://localhost:8080/nuix-restful-service/svc/v1/cases/43b070164ce8453ca30ed9e2dfcce67b/evidence/file' \
--header 'nuix-auth-token: 9729a460-eda7-48dc-ba70-d12b3aae3c8d' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
   "processorSettings": {
   	"storeBinary": true
   },
   "target": {
    "path": "/Engines/9.0.0.171/doc"
  }
}
'
{
    "functionKey": "814388bb-d0fe-4a75-a4cb-02d1f46213e2", 
    "location": "http://localhost:8080/nuix-restful-service/svc/v1/asyncFunctions/814388bb-d0fe-4a75-a4cb-02d1f46213e2"
}

Alternatively, you can use the following example script to ingest the Nuix Engine documentation.

import requests
import json

token="YOURTOKEN"
caseId="YOURCASEID"
evidence="FILEPATH"
storeBinary=True

base_url = "{{host}}:8080/nuix-restful-service/svc"
headers = {
    "Content-Type":"application/json",
    "nuix-auth-token":token
}

request_body = {
   "processorSettings": {
   	"storeBinary": storeBinary
   },
   "target": {
    "path": evidence
  }
}   

def process_evidence():
    try:
        response = requests.post(base_url+"/v1/cases/{}/evidence/file".format(caseId), data=json.dumps(request_body), headers=headers)
        print("Processing has started. Retrieve status from {}".format(response.json()['location']))
    except Exception as e:
        print(e)

process_evidence()
import requests
import json

token="YOURTOKEN"
caseId="YOURCASEID"
evidence="FILEPATH"
storeBinary=True

base_url = "{{host}}:8080/nuix-restful-service/svc"
headers = {
    "Content-Type":"application/json",
    "Authorization": "Bearer {}".format(token)
}

request_body = {
   "processorSettings": {
   	"storeBinary": storeBinary
   },
   "target": {
    "path": evidence
  }
}   

def process_evidence():
    try:
        response = requests.post(base_url+"/v1/cases/{}/evidence/file".format(caseId), data=json.dumps(request_body), headers=headers)
        print("Processing has started. Retrieve status from {}".format(response.json()['location']))
    except Exception as e:
        print(e)

process_evidence()

Get the ingestion status

The functionKey field returned from the ingestion endpoint above can be polled for status.

curl --location --request GET 'http://localhost:8080/nuix-restful-service/svc/v1/asyncFunctions/814388bb-d0fe-4a75-a4cb-02d1f46213e2' \
--header 'nuix-auth-token: 9729a460-eda7-48dc-ba70-d12b3aae3c8d'
{
   "done":true,
   "cancelled":false,
   "result":true,
   "token":"db63fbfc-a5fd-494e-974b-cc17f6b2a56a",
   "functionKey":"814388bb-d0fe-4a75-a4cb-02d1f46213e2",
   "progress":7581225,
   "total":0,
   "percentComplete":null,
   "updatedOn":1612973812631,
   "status":null,
   "statusId":null,
   "requestTime":1612973782299,
   "startTime":1612973782299,
   "finishTime":1612973817411,
   "caseId":"43b070164ce8453ca30ed9e2dfcce67b",
   "caseName":"HelloWorld",
   "hasSuccessfullyCompleted":true,
   "friendlyName":"Evidence Ingestion Function",
   "caseLocation":"/Cases/HelloWorld",
   "requestor":"nuixadmin",
   "action":"AsyncBulkIngestionFunction",
   "options":{
      "reloadQuery":null,
      "processorSettings":{
         "processText":null,
         "processLooseFileContents":null,
         "processForensicImages":null,
         "analysisLanguage":null,
         "stopWords":null,
         "stemming":null,
         "enableExactQueries":null,
         "extractNamedEntities":null,
         "extractNamedEntitiesFromText":null,
         "extractNamedEntitiesFromProperties":null,
         "extractNamedEntitiesFromTextStripped":null,
         "extractShingles":null,
         "processTextSummaries":null,
         "calculateSSDeepFuzzyHash":null,
         "detectFaces":null,
         "extractFromSlackSpace":null,
         "carveFileSystemUnallocatedSpace":null,
         "carveUnidentifiedData":null,
         "carvingBlockSize":null,
         "recoverDeletedFiles":null,
         "extractEndOfFileSlackSpace":null,
         "smartProcessRegistry":null,
         "identifyPhysicalFiles":null,
         "createThumbnails":null,
         "skinToneAnalysis":null,
         "calculateAuditedSize":null,
         "storeBinary":true,
         "maxStoredBinarySize":null,
         "maxDigestSize":null,
         "digests":[
            
         ],
         "addBccToEmailDigests":null,
         "addCommunicationDateToEmailDigests":null,
         "reuseEvidenceStores":null,
         "processFamilyFields":null,
         "hideEmbeddedImmaterialData":null,
         "reportProcessingStatus":null,
         "workerItemCallback":null,
         "workerItemCallbacks":null
      },
      "evidence":[
         {
            "guid":null,
            "name":null,
            "customMetadata":null,
            "encoding":null,
            "custodian":null,
            "timeZone":null,
            "description":null,
            "locale":null,
            "files":[
               {
                  "path":"/Engines/9.0.0.171/doc"
               }
            ],
            "exchangeMailboxes":null,
            "s3Buckets":null,
            "sqlServers":null,
            "enterpriseVaults":null,
            "sharepointSites":null,
            "mailStores":null,
            "loadFiles":null,
            "centeraClusters":null,
            "splitFiles":null,
            "dropboxes":null,
            "sshServers":null
         }
      ],
      "localWorkerCount":2,
      "repositories":[
         
      ],
      "parallelProcessingSettings":{
         "workerCount":null,
         "workerMemory":null,
         "workerTemp":null,
         "brokerMemory":null,
         "workerBrokerAddress":null,
         "useRemoteWorkers":false,
         "embedBroker":true
      },
      "rescanEvidenceRepositories":false,
      "loadProcessingJob":{
         "casePath":"/Cases/HelloWorld",
         "jobGuid":"e22b159b-477e-41fe-878f-91984f60e3c9",
         "processingMode":"Load",
         "startDate":1612973784905,
         "workerCount":2,
         "finished":true,
         "paused":false,
         "masterAddress":"1.1.1.1",
         "bytesProcessed":7581225,
         "itemsProcessed":192,
         "jobSizeTotalBytes":0
      }
   },
   "participatingInCaseFunctionQueue":true,
   "processedBy":"nuix-restful-server-1",
   "errorMsg":null
}