You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* include currentVersion in submission response
* updated API docs
* add submitter details for current version if extended data is requested
read logical submission from database on submission update
* minor changes in API doc
Copy file name to clipboardExpand all lines: docs/api.md
+33-9Lines changed: 33 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,11 @@ Finally, **system information and configuration** is available via a set of spec
32
32
33
33
Here major and breaking changes to the API are listed by version.
34
34
35
+
### ODK Central v2023.2
36
+
37
+
**Changed**:
38
+
- The response of `GET`, `POST`, `PUT` and `PATCH` methods of [Submissions](#reference/submissions/listing-all-submissions-on-a-form) endpoint has been updated to include metadata of the `currentVersion` of the Submission.
39
+
35
40
### ODK Central v2023.1
36
41
37
42
**Added**:
@@ -2105,6 +2110,8 @@ Like how `Form`s are addressed by their XML `formId`, individual `Submission`s a
2105
2110
2106
2111
As of version 1.4, a `deviceId` and `userAgent` will also be returned with each submission. The client device may transmit these extra metadata when the data is submitted. If it does, those fields will be recognized and returned here for reference. Here, only the initial `deviceId` and `userAgent` will be reported. If you wish to see these metadata for any submission edits, including the most recent edit, you will need to [list the versions](/reference/submissions/submission-versions/listing-versions).
2107
2112
2113
+
As of version 2023.2, this API returns `currentVersion` that contains metadata of the most recent version of the Submission.
2114
+
2108
2115
This endpoint supports retrieving extended metadata; provide a header `X-Extended-Metadata: true` to return a `submitter` data object alongside the `submitterId` Actor ID reference.
2109
2116
2110
2117
+ Parameters
@@ -2121,6 +2128,11 @@ This endpoint supports retrieving extended metadata; provide a header `X-Extende
2121
2128
2122
2129
+ Attributes (Extended Submission)
2123
2130
2131
+
+ Response 301 (text/html)
2132
+
Returns 301 with URL of the specific Submission version if `instanceId` of a Submission edit is provided
2133
+
2134
+
+ Attributes
2135
+
2124
2136
+ Response 403 (application/json)
2125
2137
+ Attributes (Error 403)
2126
2138
@@ -2574,12 +2586,12 @@ This endpoint supports retrieving extended metadata; provide a header `X-Extende
2574
2586
+ Response 200 (application/json)
2575
2587
This is the standard response, if Extended Metadata is not requested:
2576
2588
2577
-
+ Attributes (array[Submission])
2589
+
+ Attributes (array[SubmissionVersion])
2578
2590
2579
2591
+ Response 200 (application/json; extended)
2580
2592
This is the Extended Metadata response, if requested via the appropriate header:
2581
2593
2582
-
+ Attributes (array[Extended Submission])
2594
+
+ Attributes (array[Extended SubmissionVersion])
2583
2595
2584
2596
+ Response 403 (application/json)
2585
2597
+ Attributes (Error 403)
@@ -2596,12 +2608,12 @@ This endpoint supports retrieving extended metadata; provide a header `X-Extende
2596
2608
+ Response 200 (application/json)
2597
2609
This is the standard response, if Extended Metadata is not requested:
2598
2610
2599
-
+ Attributes (Submission)
2611
+
+ Attributes (SubmissionVersion)
2600
2612
2601
2613
+ Response 200 (application/json; extended)
2602
2614
This is the Extended Metadata response, if requested via the appropriate header:
2603
2615
2604
-
+ Attributes (Extended Submission)
2616
+
+ Attributes (Extended SubmissionVersion)
2605
2617
2606
2618
+ Response 403 (application/json)
2607
2619
+ Attributes (Error 403)
@@ -4237,17 +4249,29 @@ These are in alphabetic order, with the exception that the `Extended` versions o
4237
4249
4238
4250
## Submission (object)
4239
4251
+ instanceId: `uuid:85cb9aff-005e-4edd-9739-dc9c1a829c44` (string, required) - The `instanceId` of the `Submission`, given by the Submission XML.
4240
-
+ instanceName: `village third house` (string, optional) - The `instanceName`, if any, given by the Submission XML in the metadata section.
4241
-
+ submitterId: `23` (number, required) - The ID of the `Actor` (`App User`, `User`, or `Public Link`) that submitted this `Submission`.
4242
-
+ deviceId: `imei:123456` (string, optional) - The self-identified `deviceId` of the device that collected the data, sent by it upon submission to the server. On overall ("logical") submission requests, the initial submission `deviceId` will be returned here. For specific version listings of a submission, the value associated with the submission of that particular version will be given.
4243
-
+ userAgent: `Enketo/3.0.4` (string, optional) - The self-identified `userAgent` of the device that collected the data, sent by it upon submission to the server.
4252
+
+ submitterId: `23` (number, required) - The ID of the `Actor` (`App User`, `User`, or `Public Link`) that originally submitted this `Submission`.
4253
+
+ deviceId: `imei:123456` (string, optional) - The self-identified `deviceId` of the device that collected the data, sent by it upon submission to the server. The initial submission `deviceId` will be returned here.
4254
+
+ userAgent: `Enketo/3.0.4` (string, optional) - The self-identified `userAgent` of the device that collected the data, sent by it upon submission to the server. The initial submission `userAgent` will be returned here.
4244
4255
+ reviewState: `approved` (Submission Review State, optional) - The current review state of the submission.
4245
4256
+ createdAt: `2018-01-19T23:58:03.395Z` (string, required) - ISO date format. The time that the server received the Submission.
4246
4257
+ updatedAt: `2018-03-21T12:45:02.312Z` (string, optional) - ISO date format. `null` when the Submission is first created, then updated when the Submission's XML data or metadata is updated.
4258
+
+ currentVersion: (SubmissionVersion) - The current version of the `Submission`.
4259
+
4260
+
## SubmissionVersion (object)
4261
+
+ instanceId: `uuid:85cb9aff-005e-4edd-9739-dc9c1a829c44` (string, required) - The `instanceId` of the `Submission` version, given by the Submission XML.
4262
+
+ instanceName: `village third house` (string, optional) - The `instanceName`, if any, given by the Submission XML in the metadata section.
4263
+
+ submitterId: `23` (number, required) - The ID of the `Actor` (`App User`, `User`, or `Public Link`) that submitted this `Submission` version.
4264
+
+ deviceId: `imei:123456` (string, optional) - The self-identified `deviceId` of the device that submitted the `Submission` version.
4265
+
+ userAgent: `Enketo/3.0.4` (string, optional) - The self-identified `userAgent` of the device that submitted the `Submission` version.
4266
+
+ createdAt: `2018-01-19T23:58:03.395Z` (string, required) - ISO date format. The time that the server received the `Submission` version.
4267
+
+ current: `true` (boolean, required) - Whether the version is current or not.
4247
4268
4248
4269
## Extended Submission (Submission)
4249
4270
+ submitter (Actor, required) - The full details of the `Actor` that submitted this `Submission`.
4250
-
+ formVersion: `1.0` (string, optional) - The version of the form the submission was initially created against. Only returned with specific Submission Version requests.
4271
+
4272
+
## Extended SubmissionVersion (SubmissionVersion)
4273
+
+ submitter (Actor, required) - The full details of the `Actor` that submitted this version of the `Submission`.
4274
+
+ formVersion: `1.0` (string, optional) - The version of the form the submission version was created against. Only returned with specific Submission Version requests.
4251
4275
4252
4276
## Review State Counts (object)
4253
4277
+ received: `3` (number, required) - The number of submissions receieved with no other review state.
0 commit comments