latestOpenAPI 3.0.32026-08-109359194.9 KB

112399a67ebb

Submissions

Update Module Submission

Updates a single module submission. This operation supports partial "data" updates, i.e. data that is sent in "data" may include some but not all of the submission data. 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". Module submission data must be provided as a JSON object.

Authorization Required:

  • See Submission Access (Submission Access)
put/modules/{moduleId}/submissions/{submissionId}

Path parameters

moduleIdstring required

Unique module ID

submissionIdstring required

ID of module submission to update

Query parameters

transformNamestring

Transform to apply to module for input. Transform must be configured and designated for for input. Available transform types may be listed via the /transforms endpoint.

replaceDataboolean

Whether to completely replace the submission data with the object passed in "data". This option is available to "Administrator" users only.

Request body

userIdstring

Submission owner (can be updated by "Administrator" users only)

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

Response

Submission updated

idstring required
userIdstring

Submission owner

moduleIdstring required
createdstring date-time required
modifiedstring date-time required
deletedstring date-time
metadataobject