Survey data

Get an asset's attachment using xpath

  • uid_data can be the primary key of the submission or its uuid. Please note that using the uuid may match several submissions, only the first match will be returned.

Use the xpath property to retrieve an attachment.

curl -X GET https://kf.kobotoolbox.org/api/v2/assets/aSAvYreNzVEkrWg5Gdcvg/data/451/attachment/?xpath=Upload_a_file

Get an MP3 file from an audio or video file

Convert audio and video files. Only conversions to MP3 is supported for this feature

curl -X GET https://kf.kobotoolbox.org/api/v2/assets/aSAvYreNzVEkrWg5Gdcvg/data/451/attachment/?xpath=Upload_a_file&format=mp3
get/api/v2/assets/{uid_asset}/data/{uid_data}/attachments/

Request

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

Path parameters

uid_assetstring required

UID of the parent asset

uid_datastring required

UID of the parent data

Query parameters

format'mp3'
xpathstring required

Response

Will return a content type with the type of the attachment as well as the attachment itself.

Changes