create #
Creates an asset.
Query Syntax #
HTTP #
URL: http://kuzzle:7512/_/device-manager/:engineId/assets
Method: POST
Other protocols #
{
"controller": "device-manager/assets",
"action": "create",
"engineId": "<engineId>",
"body": {
"model": "<asset model>",
"reference": "<asset reference>",
"metadata": {
"<metadata name>": "<metadata value>"
}
}
}
Arguments #
engineId
: Engine ID
Body properties #
model
: Asset model namereference
: Asset reference (must be unique within a model)metadata
: Object containing metadata
Response #
{
"status": 200,
"error": null,
"controller": "device-manager/assets",
"action": "create",
"requestId": "<unique request identifier>",
"result": {
"_id": "<assetId>",
"_source": {
// Asset content
},
}
}
Edit this page on Github(opens new window)