latestOpenAPI 3.0.32026-08-109359194.9 KB

112399a67ebb

Submissions

Update Multiple Module Submissions

Updates multiple module submissions. 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". To replace the entire data object, use the "replaceData" flag. Module submission data must be provided as a JSON object. Max Limit per request is 50.

Authorization Required:

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

Path parameters

moduleIdstring required

Unique module ID

Query parameters

replaceDataboolean

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

Request body

idstring
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 updates

idstring
statusinteger
messagestring

Failure message