Survey data

Duplicate submission

Duplicates the data of a submission

{id} can be:

  • The primary key of the submission
  • Its _uuid <sup>1</sup>
  • Its rootUuid (without "uuid:" prefix)

<sup>1</sup> Please note that using the _uuid may match several submissions, only the first match will be returned.

post/api/v2/assets/{uid_asset}/data/{id}/duplicate/

Request

  • The document declares no server URL.
  • Auth: one of:
    • HTTP basic
    • API key in header Authorization

Path parameters

idstring required

Integer ID (PK) or rootUuid

uid_assetstring required

UID of the parent asset

Request body

payloadinteger[] required

Response

_idinteger required
formhub/uuidstring
__version__string required
meta/instanceIDstring required
meta/rootUuidstring required
meta/deprecatedIDstring
meta/formVersionsstring
_xform_id_stringstring required
_uuidstring required
_statusstring required
_geolocationnumber[] required
_submission_timestring date-time required
_submitted_bystring required

Example response

{
  "_attachments": [
    {
      "download_url": "https://kf.kobotoolbox.org/api/v2/assets/aTPPUDScaFZkvBzd8FyK4Q/data/18/attachments/1",
      "download_large_url": "https://kf.kobotoolbox.org/api/v2/assets/aTPPUDScaFZkvBzd8FyK4Q/data/18/attachments/attWNZNwhXK6HDYVkZJSn9jy/large/",
      "download_medium_url": "https://kf.kobotoolbox.org/api/v2/assets/aTPPUDScaFZkvBzd8FyK4Q/data/18/attachments/attWNZNwhXK6HDYVkZJSn9jy/medium/",
      "download_small_url": "https://kf.kobotoolbox.org/api/v2/assets/aTPPUDScaFZkvBzd8FyK4Q/data/18/attachments/attWNZNwhXK6HDYVkZJSn9jy/small/",
      "mimetype": "image/png"
    }
  ]
}

Changes

    • info

      added the optional property / to the response with the status

    • breaking

      response property _supplementalDetails list-of-types was widened by adding types null to media type application/json of response 200