Form content

Create an asset snapshot

When creating an asset snapshot, you must provide either:

  • the asset (as a URI), or
  • the source (as a JSON object representing the asset)

…but not both.

post/api/v2/asset_snapshots/

Request

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

Request body

OR

Example request

{
  "asset": "https://kf.kobotoolbox.org/api/v2/assets/a3C9wWefqZVkChNLKqqXVZ/"
}

Response

urlstring uri required
uidstring required
ownerstring uri required
date_createdstring date-time required
xmlstring uri required
enketopreviewlinkstring uri required
assetstring uri required
asset_version_idstring required

Example response

{
  "url": "https://kf.kobotoolbox.org/api/v2/asset_snapshots/sEMPghTguZsxj4rn4s9dvS/",
  "owner": "https://kf.kobotoolbox.org/api/v2/users/bob/",
  "xml": "https://kf.kobotoolbox.org/api/v2/asset_snapshots/sEMPghTguZsxj4rn4s9dvS/",
  "enketopreviewlink": "https://kf.kobotoolbox.org/api/v2/asset_snapshots/sEMPghTguZsxj4rn4s9dvS/preview/",
  "asset": "https://kf.kobotoolbox.org/api/v2/assets/a3C9wWefqZVkChNLKqqXVZ/"
}

Changes