Hi - we’re using self hosted on an Azure instance and I’m trying to create assets via the REST API.
I’m able to create a new asset and receive an endpoint to upload to however, I’m struggling via a POST request to upload a file. My request is along the lines of…
However I receive HTTP/1.1 204 No Content on when I post. Is there a specific key name needed for the filePath to upload in this instance?
Self hosted API just says “upload” - so some clarity on this would be most appreciated given it’s self hosted rather than SaaS and on Azure rather than AWS
Hey! so it looks like everything is working as expected. The 204 No Content message is expected when upload is complete. The last step you should need to do is to tell self-hosted that the file upload is complete. To do that just run a POST on …/v1/assets/{assetID}/uploadComplete. This should also return a 204 with No Content. Once that happens you should see that a tiling job for that asset ID has been kicked off in self-hosted.
The general flow should be.
POST to /v1/assets to get the upload URL
POST to the upload URL and wait for a 204 response
POST to the /uploadComplete URL to tell self-hosted that it is done
It should be pretty much the same process between self-hosted and SaaS, the only difference being the URL that you are uploading to will be a local URL and not an S3 bucket. The one thing to note is that each file within the form data upload object should be represented as 'relative/path/to/file':"file stream". The photo below shows that section of the docs with the drop down expanded.