Untitled

šŸ“°Getting Started | ā­**Updates |** šŸ“ Guides | šŸ”¢ API | ā“FAQ

Guides Overview

[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.

Importing and Updating Assets

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}''

Request Parameters

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"
  }
}

Resources

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


Untitled

Copyright Ā© 2021 Enklu, Inc.