Checking the Status of a Function

Learn how to check on the status of a running function.

To check on the status of a running function, you must first retrieve that function’s functionKey and location.

The following example includes a sample response you can expect to see when you submit requests to perform long-running, asynchronous tasks. The response includes both a functionKey and location.

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"
}

Now that you have both the functionKey and location, you can check the status of a running, asynchronous function.

The functionKey is a unique identifier for the function that can be used to query its status. The location URL provides a direct request to the /asyncFunctions/{key} endpoint. Making calls to this endpoint with the returned functionKey will return details about the associated function.

While an asynchronous function is running, you can query the /asyncFunctions/{key} endpoint to check the status of the function and eventually retrieve the final output of the request.