latestOpenAPI 3.0.32026-08-109359194.9 KB

112399a67ebb

Submissions

Update Workflow Submission

This endpoint is available to "Administrator" users only. Updates a single workflow submission based on submission ID and, if passed, dataFilter and metadataFilter. This operation supports partial "data" updates, i.e. data that is sent in "data" may include some but not all of the submission data. Update of the owner/user is supported through "userId". Update of current status is supported through "currentStatus". Partial metadata updates are supported without including the entire metadata object. To increment a numeric data key (will also initialize), use "incrementData" To delete a data key, use "unsetData". To delete a metadata key, use "unsetMetadata". Workflow submission data must be provided as a JSON object.

Authorization Required:

  • See Submission Access (Submission Access)
put/workflows/{workflowId}/submissions/{submissionId}

Path parameters

workflowIdstring required

ID of workflow the submission belongs to

submissionIdstring required

ID of workflow submission to update

Query parameters

replaceDataboolean

Whether to completely replace the submission data with the object passed in "data".

Request body

userIdstring

Submission owner

dataobject

Raw input data

dataFilterDataFilter

Filter condition against submission "data" field. Value must be a MongoDB query condition (see Examples, below).

NOTE: MongoDB selectors that can be nested inside queries (such as Comparison and Element Selectors, e.g. $eq, $in, $exists) are supported. The following Logical Selectors are also supported: $and, $or, $nor

Examples:

  • dataFilter: {"age": 30}

  • dataFilter: {"age": {"$gt": 30}, "people.1.gender": "male"}

    • Will match submission where age > 30 and gender for the 2nd people element equals "male"
incrementDataobject

Object containing data keys that should be incremented, and by what number (e.g. {"incrementData":{"key1":1,"key2":10}})

unsetDataobject

Object containing data keys that should be deleted (e.g. {"unsetData":{"key1":"","key2":""}})

metadataMetadataRequest

Object containing key-value pairs. To set nested values, this must be an object like {"statuses.complete": "yes", "statuses.processed": "no"}, which is MongoDB dot notation.

metadataFilterMetadataFilter

Filter condition against submission "metadata" field. Value must be a MongoDB query condition (see Examples, below). MongoDB dot notation is supported for keys.

NOTE: MongoDB selectors that can be nested inside queries (such as Comparison and Element Selectors, e.g. $eq, $in, $exists) are supported. The following Logical Selectors are also supported: $and, $or, $nor

Examples:

  • metadataFilter: {"checkpoints.complete": 1234}

  • metadataFilter: {"checkpoints.complete": {"$exists": true}, "checkpoints.processed": {"$exists": false}}

    • Will return submissions where both metadata.checkpoints.complete exists AND metadata.checkpoints.processed does not exist
unsetMetadataobject

Object containing metadata keys that should be deleted (e.g. {"unsetMetadata":{"key.one":"","key.two":""}})

currentStatusstring

Most recently set status message for the submission

Response

Successfully updated workflow submission

idstring
moduleIdstring
userIdstring

Submission owner

createdstring date-time
modifiedstring date-time
deletedstring date-time
metadataobject