Deduplication
This example deduplicates all files in a case.
2 minute read
Example Scripts
|
|
|
|
|
|
Synchronous Examples
Example Request
curl --location --request PUT 'http://localhost:8080/nuix-restful-service/svc/v1/cases/{caseId}/userScripts' \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data-raw '{
"fileName": "deduplicate.rb",
"language": "RUBY",
"async": false
}'
wget --no-check-certificate --quiet \
--method PUT \
--timeout=0 \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--body-data '{
"fileName": "deduplicate.rb",
"language": "RUBY",
"async": false
}' \
'http://localhost:8080/nuix-restful-service/svc/v1/cases/{caseId}/userScripts'
Example Response
{
"elapsed": 323,
"count": 443
}
Asynchronous Examples
Example Request
curl --location --request PUT 'http://localhost:8080/nuix-restful-service/svc/v2/cases/{caseId}/userScripts' \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"fileName": "deduplicate.rb",
"language": "RUBY",
"async": false
}'
wget --no-check-certificate --quiet \
--method PUT \
--timeout=0 \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--body-data '{
"fileName": "deduplicate.rb",
"language": "RUBY",
"async": false
}' \
'http://localhost:8080/nuix-restful-service/svc/v2/cases/{caseId}/userScripts'
Example Response
{
"functionKey": "b874da78-0efe-426c-b6ea-5562e5926896",
"location": "http://localhost:8080/nuix-restful-service/svc/v1/asyncFunctions/b874da78-0efe-426c-b6ea-5562e5926896"
}
You can retrieve the results of the function by polling the asyncFunctions
endpoint.
Example Request
curl --location 'http://localhost:8080/nuix-restful-service/svc/v1/asyncFunctions/b874da78-0efe-426c-b6ea-5562e5926896' \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN'
wget --no-check-certificate --quiet \
--method GET \
--timeout=0 \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN' \
'http://localhost:8080/nuix-restful-service/svc/v1/asyncFunctions/b874da78-0efe-426c-b6ea-5562e5926896'
Example Response
{
"done": true,
"cancelled": false,
"result": {
"status": 200,
"headers": {
"Content-Type": [
"application/json"
]
},
"fileName": null,
"result": null,
"output": "",
"body": {
"elapsed": 26,
"count": 447
}
},
"token": "YOUR_BEARER_TOKEN",
"functionKey": "b874da78-0efe-426c-b6ea-5562e5926896",
"progress": 0,
"total": 1,
"percentComplete": 0.0000,
"updatedOn": 1709234413275,
"status": "COMPLETE",
"statusId": null,
"requestTime": 1709234413273,
"startTime": 1709234413275,
"finishTime": 1709234419373,
"caseId": "49a6410465624ac8ae613d5c7645f096",
"caseName": "dedupe",
"hasSuccessfullyCompleted": true,
"friendlyName": "User Script Function V2",
"caseLocation": "/cases/dedupe",
"requestor": "YOUR_USERNAME>",
"licenseShortName": null,
"action": "CaseQueuedAsyncUserScriptFunctionV2",
"options": {
"name": "67572f0d-a97a-4653-870c-d584e5695ddc",
"description": null,
"absoluteFilePath": "/user-scripts/deduplicate.rb",
"relativeOutputDirectory": "script_output"
},
"participatingInCaseFunctionQueue": true,
"processedBy": "nuix-restful-server-1",
"error": null
}
Feedback
Was this page helpful?
Thank you for your feedback.
Thank you for your feedback.