Manage projects and library content
Create or clone an asset
When cloning an asset, you must provide:
- the name (as a string),
- the clone_from (the uid representing the asset),
- the asset_type
Where asset_type must be one of these values:
- block (can be cloned to block, question, survey, template)
- question (can be cloned to question, survey, template)
- survey (can be cloned to block, question, survey, template)
- template (can be cloned to survey, template)
Settings are cloned only when type of assets are survey or template. In that case, share-metadata is not preserved.
When creating a new block or question asset, settings are not saved either.
post/api/v2/assets/
Request
- The document declares no server URL.
- Auth: one of:
- HTTP basic
- API key in header Authorization
Request body
Response
Example response
{
"url": "https://kf.kobotoolbox.org/api/v2/assets/aBeA23YCYjkGTFvYVHuAyU/",
"owner": "https://kf.kobotoolbox.org/api/v2/users/bob/",
"parent": "https://kf.kobotoolbox.org/api/v2/assets/a3C9wWefqZVkChNLKqqXVZ/",
"deployed_versions": {
"results": [
{
"url": "https://kf.kobotoolbox.org/api/v2/assets/aBeA23YCYjkGTFvYVHuAyU/versions/vBeA23YCYjkGTFvYVHuAyU/"
}
]
},
"xform_link": "https://kf.kobotoolbox.org/api/v2/assets/aBeA23YCYjkGTFvYVHuAyU/xform/",
"hooks_link": "https://kf.kobotoolbox.org/api/v2/assets/aBeA23YCYjkGTFvYVHuAyU/hooks/",
"xls_link": "https://kf.kobotoolbox.org/api/v2/assets/aBeA23YCYjkGTFvYVHuAyU.xls",
"exports": "https://kf.kobotoolbox.org/api/v2/assets/aBeA23YCYjkGTFvYVHuAyU/exports/",
"data": "https://kf.kobotoolbox.org/api/v2/assets/aBeA23YCYjkGTFvYVHuAyU/data/",
"paired_data": "https://kf.kobotoolbox.org/api/v2/assets/aBeA23YCYjkGTFvYVHuAyU/paired-data/"
}Changes
- breaking
the response property
//became nullable for the status
- breaking
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info