Skip to content

Results JSON

An Operation must write a JSON file conforming to results schema to the path specified by the results_json property of the task-json object.

The contents of results-json communicate the final status of the Operation as well as the value of output properties.

The compute_checksum Operation used as the example in Task JSON contains the following output_parameters element.

"output_parameters": {
"hashhash": {
"type": "string",
"description": "Hash of the hash file in output port. Used to verify the hash file hasn't been modified",
"optional": false
},
"count": {
"type": "string",
"description": "The number of files hashed"
}
}

This results in the following results JSON object when the Operation succeeds.

{
"taskCompleted": {
"output-parameters": {
"hashhash": "2197869289576BB6B1A538A7E673B0FEA037C28DB4333524D1F61504E2DC1A89",
"count": "3"
}
}
}

If the Operation fails the only member of the results JSON object should be taskFailed. The following, JSON indicates that the requested Operation failed.

{
"taskFailed": {
"reason": "out of memory",
"details": "OOMK terminated the sha256sum process"
}
}

The Result JSON should not contain both taskCompleted and a taskFailed members.