š°Getting Started | ā**Updates |** š Guides | š¢ API | āFAQ
Web Editor Basics
HoloLens
Mobile
Meta Quest
Chapter Series Documentation
Assets
Scripting
Enklu Embedded
API Reference
Release Notes
FAQ
Contact
[Note: Access to this API requires a Studio Subscription.Ā Contact UsĀ for details.]
While the standard workflow for importing assets into Enklu Cloud is with theĀ Web Editor, users with a Studio Subscription may also use the Assets Web API.
To import or update an asset, first ensure you have a valide JWT token by authenticating against the authoring API:
curl -X POST '<https://cloud.enklu.com:10001/v1/email/signin>' \\
-H 'Content-Type: application/json' \\
-d '{ "email": "[email protected]", "password": "12345"}'
If succesful, the response will contain your token:
{
"success": true,
"error": "None",
"body": {
"user": {
"email": "[email protected]",
"displayName": "roland",
"id": "00000000-0000-0000-0000-000000000000"
},
"token": "..."
}
}
Then, you can upload a new asset or update an existing one:
curl -X POST '<https://assets.enklu.com:9091/v1/asset>'
--header 'Authorization: Bearer '${jwt}''
--header 'app: '${appId}''
--header 'Accept: application/json'
--form 'qqfilename="'${fileName}'"'
--form 'qquuid="'${guid}'"'
--form 'qqfile=@'${pathToFile}''
jwt
Ā The authentication token received in the login response.appId
Ā A valid experience id. This can be copied from the "My Experiences" screen in theĀ Enklu Cloud Web EditorfileName
Ā The display name of the file to be imported or updated.guid
Ā A unique id for the asset. If the provided id represents an existing asset associated with your account, the asset will up be updated with a new version.pathToFile
Ā The path to the file on the local file system.A successful response will contain the asset id. This Id can be used in future requests to update the same asset.
{
"success": true,
"error": "None",
"body": {
"id": "11111111-1111-1111-1111-111111111111"
}
}
For more on importing assets, including supported formats, see our guideĀ Importing Your Own Assets. For information on preparing Unity prefabs for import, see our guide to Exporting Unity Prefabs.
Sidebar Table of Contents
Copyright Ā© 2021 Enklu, Inc.