Submission Search (by Form as POST)

Returns submissions for the specified Form. Searching requires form index definitions to exist that include the properties and fields specified by the q and orderBy request body properties.

NOTE: This endpoint is functionally equivalent to GET /kapps/{kappSlug}/forms/{formSlug}/submissions, but can be used if the search query string is expected to be significantly long (such as when searching with an IN expression that has a large number of long values).

Path Params
string
required

The slug of the Kapp

string
required

The slug of the form

Query Params
string
Defaults to values

comma-separated list of properties to include in the response

  • details

  • activities

  • children

  • descendants

  • origin

  • parent

  • type

  • values

  • values.raw

  • values[FIELD NAME]

  • form

  • form.{any form include property}

values

Typically when retrieving submissions an include of values will be specified. This will return a map of field names to the values associated to that field.

{
  ...,
  "values": {
    "Checkbox Field": ["Value 1", "Value 2"],
    "Text Field": "Value"
  }
}

values.raw

Specifying an include of values.raw is similar to specifying an include of values, except the values will be returned as a map of field keys to metadata about the value associated to that field.

  • isMalformed indicates whether the value matches the expected format for the field type.

  • isUnexpected indicates whether the value corresponds to a field key that does not exist on the form.

  • name indicates the name of the field (if it exists on the form).

  • rawValue is the raw string that corresponds to the value.

  • value is the value in JSON format (if the value is not malformed).

Because the rawValue property is returned as a string, this include can be used to troubleshoot issues where a submission contains values in an unexpected format (such as when a field type changes). Additionally, values.raw includes values for field keys that do not exist on the form (likely because the field was deleted). This makes it possible to write scripts to access or manipulate historical values that no longer correspond to the current form.

{
  ...,
  "valuesRaw": {
    "f1": {
      "isMalformed": false,
      "isUnexpected": true,
      "name": null,
      "rawValue": "Orphaned Value",
      "value": "Orphaned Value"
    },
    "f2": {
      "isMalformed": false,
      "isUnexpected": false,
      "name": "Checkbox Field",
      "rawValue": "[\"Value 1\", \"Value 2\"]",
      "value": ["Value 1", "Value 2"]
    },
    "f2": {
      "isMalformed": false,
      "isUnexpected": false,
      "name": "Text Field",
      "rawValue": "Value",
      "value": "Value"
    }
  }
}
Body Params

The content for the submissions search

string
enum
Defaults to DESC
Allowed:
int32
0 to 1000
Defaults to 25
string
Defaults to createdAt
string
Defaults to null
string
Defaults to null
Response

Language
Credentials
Basic
base64
:
URL
Response
Choose an example:
application/json