Part 8: Exclusions

Excluding items from a case.

Exclusions

Sometimes, as part of the culling process, you need to exclude items from your case. For this example, let’s exclude all Javascript files (*.js) from the case using the excludedItems endpoint.

curl --location --request PUT 'http://localhost:8080/nuix-restful-service/svc/v1/cases/43b070164ce8453ca30ed9e2dfcce67b/excludedItems' \
--header 'nuix-auth-token: 9729a460-eda7-48dc-ba70-d12b3aae3c8d' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
  "excludeDescendants": true,
  "includeDuplicates": true,
  "includeFamily": true,
  "includeNearDuplicates": true,
  "nearDuplicatesThreshold": 0,
  "query": "file-extension:js",
  "reason": "Exclude script files from the case"
}'
{
    "functionKey": "575f4966-1103-43fb-b6bb-03f52b7b3022",
    "location": "http://localhost:8080/nuix-restful-service/svc/v1/asyncFunctions/575f4966-1103-43fb-b6bb-03f52b7b3022"
}

Exclusion Status

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

curl --location --request GET 'http://localhost:8080/nuix-restful-service/svc/v1/asyncFunctions/575f4966-1103-43fb-b6bb-03f52b7b3022' \
--header 'nuix-auth-token: 9729a460-eda7-48dc-ba70-d12b3aae3c8d'
{
    "done": true,
    "cancelled": false,
    "result": true,
    "token": "37741b6c-43e2-49d1-9354-04bd397984b5",
    "functionKey": "575f4966-1103-43fb-b6bb-03f52b7b3022",
    "progress": 1,
    "total": 1,
    "percentComplete": 100.0000,
    "updatedOn": 1613578572593,
    "status": null,
    "statusId": null,
    "requestTime": 1613578565663,
    "startTime": 1613578565663,
    "finishTime": 1613578572594,
    "caseId": "43b070164ce8453ca30ed9e2dfcce67b",
    "caseName": "HelloWorld",
    "hasSuccessfullyCompleted": true,
    "friendlyName": "Bulk Exclude Function",
    "caseLocation": "/Cases/HelloWorld",
    "requestor": "username",
    "action": "AsyncBulkExcludeFunction",
    "options": {
        "exclusionName": "Exclude script files from the case",
        "query": "file-extension:js"
    },
    "participatingInCaseFunctionQueue": true,
    "processedBy": "nuix-restful-server-1",
    "errorMsg": null
}

Verifying Exclusions

Now, you can use the search endpoint to verify that the items have been excluded from the case.

curl --location --request GET 'http://localhost:8080/nuix-restful-service/svc/v2/cases/43b070164ce8453ca30ed9e2dfcce67b/search?query=has-exclusion:1&metadataProfile=Default&numberOfRecordsRequested=100' \
--header 'nuix-auth-token: 9729a460-eda7-48dc-ba70-d12b3aae3c8d'
{
    "request": {
        "caseId": "43b070164ce8453ca30ed9e2dfcce67b",
        "query": "has-exclusion:1",
        "sortField": null,
        "sortOrder": null,
        "startIndex": 0,
        "numberOfRecordsRequested": 16,
        "deduplicate": null,
        "metadataProfile": "Default",
        "fieldList": null,
        "customMetadataList": null,
        "propertyList": null,
        "itemParameterizedFields": null,
        "showAvailableThumbnails": false,
        "useCache": false,
        "forceCacheDelete": false,
        "searchRetry": 0,
        "relationType": null,
        "entities": [],
        "s": 0,
        "p": 16,
        "customMetadataField": null,
        "property": null,
        "field": null
    },
    "startedOn": 1613579723060,
    "completedOn": 1613579723087,
    "elapsedTimeForSearch": 13,
    "elapsedTimeForSort": 0,
    "elapsedTimeForMarshal": 10,
    "elapsedTimeForDeduplicate": 0,
    "elapsedTotal": 27,
    "metadataItems": [
        "Name",
        "File Type",
        "Path Name"
    ],
    "localizedMetadataItems": [
        "Name",
        "File Type",
        "Path Name"
    ],
    "metadataItemDetails": [
        {
            "name": "Name",
            "localisedName": "Name",
            "type": "String"
        },
        {
            "name": "File Type",
            "localisedName": "File Type",
            "type": "String"
        },
        {
            "name": "Path Name",
            "localisedName": "Path Name",
            "type": "String"
        }
    ],
    "resultList": [
        {
            "File Type": "Plain Text",
            "Name": "jquery-3.3.1.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery",
            "guid": "192d4465-4120-4f70-9ecc-21e75fa00fdb"
        },
        {
            "File Type": "Ini Style Configuration File",
            "Name": "member-search-index.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api",
            "guid": "a5ee8532-868e-4abf-bc74-c066e82f234a"
        },
        {
            "File Type": "Plain Text",
            "Name": "jszip.min.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery/jszip/dist",
            "guid": "fae2d24a-d398-46e1-aad1-2d3ba315680e"
        },
        {
            "File Type": "Ini Style Configuration File",
            "Name": "package-search-index.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api",
            "guid": "985bf725-9480-407c-a149-6295dbbff792"
        },
        {
            "File Type": "Plain Text",
            "Name": "jszip-utils-ie.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery/jszip-utils/dist",
            "guid": "0734cf5b-626b-48ee-accb-feae91f6d333"
        },
        {
            "File Type": "Plain Text",
            "Name": "script.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api",
            "guid": "edf629f6-2183-4b61-8ab5-cc38ee6c2fe6"
        },
        {
            "File Type": "Plain Text",
            "Name": "jszip-utils-ie.min.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery/jszip-utils/dist",
            "guid": "2f014b44-1f68-4604-aa91-16aa9b03df45"
        },
        {
            "File Type": "Plain Text",
            "Name": "search.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api",
            "guid": "3c284b55-d0e3-414a-93b6-549b3483c090"
        },
        {
            "File Type": "Plain Text",
            "Name": "jszip-utils.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery/jszip-utils/dist",
            "guid": "11b2e9cd-b61c-4b0b-9977-c0140c8d3ee8"
        },
        {
            "File Type": "Ini Style Configuration File",
            "Name": "type-search-index.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api",
            "guid": "d5d111b5-eda3-40bb-ac55-ae9c5267e1ee"
        },
        {
            "File Type": "Plain Text",
            "Name": "jszip-utils.min.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery/jszip-utils/dist",
            "guid": "25662c95-f31d-4ccf-8cde-f30d3d209801"
        },
        {
            "File Type": "Plain Text",
            "Name": "jquery-migrate-3.0.1.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery",
            "guid": "7f53b31e-dbb6-40a8-9094-c95ed8b26ee5"
        },
        {
            "File Type": "Plain Text",
            "Name": "jquery.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery/external/jquery",
            "guid": "1dfd0e2f-1c60-4e59-b5d4-8afeba538368"
        },
        {
            "File Type": "Plain Text",
            "Name": "jquery-ui.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery",
            "guid": "76e84607-0fed-423a-a8e8-bcd3ae41738e"
        },
        {
            "File Type": "Plain Text",
            "Name": "jquery-ui.min.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery",
            "guid": "3c0cc58f-5b3f-40fb-8aec-6176126bd855"
        },
        {
            "File Type": "Plain Text",
            "Name": "jszip.js",
            "Path Name": "/d29719c8-517e-48cb-9fd6-983dd2d6671b/doc/api/jquery/jszip/dist",
            "guid": "2613381e-a406-4e3e-afaa-f0366f818887"
        }
    ],
    "count": 16,
    "deduplicatedCount": 16
}

Viewing Exclusion Reasons

You can retrieve the list of exclusion reasons from a case using the exclusions endpoint.

curl --location --request GET 'http://localhost:8080/nuix-restful-service/svc/v1/cases/43b070164ce8453ca30ed9e2dfcce67b/exclusions' \
--header 'nuix-auth-token: 9729a460-eda7-48dc-ba70-d12b3aae3c8d'
[
    "Exclude script files from the case"
]