Up - API Reference - Home
Requires JWT.
Update an asset's fields.
We can change the name, title, description, or transforms for the asset.
If we update the name, paths and pathnames are updated automatically for the subtree as well.
You can't update the root.
POST /api/p/<project gid>/assets/update
Authorization: Bearer <JWT>
{
"asset": "<asset gid>",
"name": "modified name",
"title": {"en": "Modified Title"},
"description": {"en": "Modified Description"},
"transforms": {…},
}
asset the asset's gid.
These are all optional, but at least one must be provided.
name the name of the asset
title a localized title for the asset, only the specified languages are updated
description a localized description for the asset, only the specified languages are updated
transforms a specialized field, don't update this unless you know exactly what you're doing
Authorization: <JWT>
{
"success": true,
"result": {
"asset": "<asset gid>"
},
"data": {
"assets": {
"<asset gid>": {
"gid": "<asset gid>",
…,
"name": "modified name",
"title": {"en": "Modified Title", "nl": "Titel"},
"description": {"en": "Modified Description", "nl": "Omschrijving"},
…
}
}
}
}
asset the updated asset.
assets Asset info with hierarchy, type, name. Unordered.
400 Bad request - missing parameters or wrong type or value
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable entity - asset doesn't exist or is root