Unable to Find API for Uploading Local Model Files to Unity Asset Manager Cloud Using REST API

Hello Unity Team (Asset Manager Rest API team)

I am currently working with the Unity Asset Manager v1 REST API and have thoroughly explored the available documentation. However, I could not find any specific API endpoint that allows uploading local CAD model files (e.g., .rvt, .skp, .fbx, etc.) directly to the Unity Asset Manager Cloud.

While I am aware that there are existing API references for uploading local files through the Unity Cloud Assets Package and the Python SDK API, I am specifically looking for guidance on how to achieve this with the Asset Manager v1 REST API.

Could you please clarify:

  1. Is there an API endpoint available for uploading local files to the Unity Asset Manager Cloud using the Asset Manager v1 REST API?
  2. If such an endpoint exists, could you kindly provide more details or an example on how to upload these files?

Your assistance would be highly appreciated. Thank you for your time, and I look forward to your response.

Best regards,
Dhruv Modh

Hi Dhruv,
I hope you are doing well.

There is indeed an API that you can use to upload any files to Unity Asset Manager. Assuming that you have already created a new asset via the Create Asset endpoint (or a new version of the asset via Create Asset Version endpoint) or that you know the asset via (possibly returned via Search Assets) you can invoke the sequence of the following endpoints:

  • Create file: this endpoint create a new empty placeholder for the file, it setup all the required metadata but no file has been uploaded. This endpoint will also return an upload URL that you can using the PUT method
  • Use the upload URL returned by the Create file](Unity Services Web API docs) to upload the file (please be aware that in order to use the URL returned to upload the file you will also need to provide the following header: x-ms-blob-type: BlockBlob). Please note that the URL returned has an expiration of 1 hour, after which the URL cannot be used anymore. You can request at any time a new fresh URL to upload the file by invoking the Get Upload URL endpoint.
  • One the file has been uploaded you need to let Asset Manager know by invoking the Finalize File Upload endpoint.

A few notes on the upload:

  • You can create files only in asset versions that have not been submitted yet

  • In case of multiple parallel file creation sequences, the automatic preview generations kick off only when all files have been uploaded

    I hope this helps and please let me know if you need any further assistence.

    Best regards,
    Stefano

1 Like

Hi Stefano,

Thank you for your quick response and detailed explanation on the Asset Manager upload flow. I followed the steps as advised — creating the file, uploading via the signed URL with the appropriate headers (x-ms-blob-type: BlockBlob), and finalizing the upload. However, in the Unity Dashboard, the uploaded asset still shows as 0B in size under the source file section.

To help you understand the issue better, I’ve recorded a screen capture of the entire process, including all API requests and responses.

Due to sensitive information in the video (like access tokens and asset IDs), I’ve uploaded it to Google Drive and kept the link private. Please click the link below and request access — I’ll approve it as soon as I see the request.

Here drive video link: https://drive.google.com/file/d/1BC00SULPLzYZfk5mLFCiq0fBCmtXctU6/view?usp=sharing (Link is private so Stefano, Please Request access.)

Let me know once you’ve requested access or if there’s anything else I can clarify.

Best regards,
Dhruv Modh

Hi Dhruv,
I am happy that the sequence of steps worked for you.

The file size is currently not computed by Asset Manager and we require API users to provide the correct size for each file (automatic file size detection is something we hope to work on in the future).

In order to achieve this, the solution is to set the fileSize field in the Create Asset File endpoint. This is what happens when the files are being uploaded from the frontend.

I hope this helps with your issue,
Best regards,
Stefano

1 Like

Hi Stefano,

Thanks for the quick response and for understanding the issue clearly. The solution you provided worked perfectly.Now I understand the complete flow of asset creation and retrieval.
Next, I will start building a BIM software to upload CAD models and develop multiplatform apps (VR/iOS/Android) that can retrieve all data using the REST API with Service Account authorization.

Regarding fileSize, it’s a bit of a mystery. The documentation should be updated to indicate that fileSize is mandatory—currently, it’s marked as optional.

Thanks again Stefano and Entire Unity Asset manager team.

Best Regards,
Dhruv Modh