With the next release (v0.17) we are reworking the way resource files are stored and retrieved to communicate the difference between them and project files more clearly. This brings the following changes:
(1) Changed APIs for upload and download/display
Using the Upload / Download APIs for vehicle images, device images, app images, app gallery images, app imprint files and app terms of use files will be deprecated. Instead use the APIv2 endpoints specific for each resource, which you will be able to find in the API explorer.
As an example for the vehicles
resource:
- To upload a resource file, instead of
upload.pantaris.io
usePOST /v2/vehicles/:id/image
- To download or display a resource file, instead of
download.pantaris.io
useGET /v2/vehicles/:id/image
- To remove a resource file, use
DELETE /v2/vehicles/:id/image
(new) - Remove the manual call to
PATCH /v2/vehicles/:id
which was necessary to set theimage
property
We will migrate existing resource files to these new APIs gradually, so during the first few days after the release you might see errors when attempting to download legacy resource files.
The previous endpoints will continue working as usual during this release, but with the following release v0.18 we will disable this legacy support. We might reach out to you to aid in your migration if we see your application using the old endpoints.
(2) Resource file IDs are no longer valid for the /v2/files
endpoints
The /v2/files
endpoints will no longer accept any IDs of resource files for any requests. They will fail with status 404 (“Not Found”). This was not necessary and somewhat restricted previously already, so it’s unlikely this impacts you.