Upload 3D Assets API
HTTP Method / Path: POST /configwise/api/components/:productNumber|:componentId/[ios|android|original]
The following suffixes of invocation URL are supported:
/ios
if you upload IOS specific 3D models.
.scn
,.usd
and.usdz
3D model file formats are supported for IOS./android
if you upload ANDROID specific 3D models.
.glb
and.gltf
formats are supported for ANDROID./original
if you upload original 3D models.
.dae
and.fbx
formats are supported as a original 3D models.
NOTICE: Original 3D models will be shown in IOS mobile application only and only if NO attached IOS specific 3d models. We do not recommend to upload original
3D models - instead always upload IOS and ANDROID models only. Further original
models will be marked as outdated (the supporting of these files will be removed from ConfigWise).
Authorization: Request must include 'x-token' header, eg: 'x-token': '755c0fadf29146c3b65778528a3abb12'. See Setup API token to generate or retrieve the API token defined in the ConfigWise Portal.
Required HTTP headers:
x-token: YOUR_API_TOKEN
Content-Type: multipart/form-data
Accept: application/json
As a URL parameter you can use 'product number' or 'internal component id'.
Uploading of files is executed through HTTP multipart/form-data
. The body of your request must contain one file field (field name must be files
). This files
field must contain array of uploaded files (so you upload multiple files in one HTTP request). Here is the curl
example how to invoke this API method:
$ curl -L -v -X POST https://manage.configwise.io/configwise/api/components/PR-01004/ios \ -H 'x-token: YOUR_API_TOKEN' \ -H 'Accept: application/json' \ -F files[]=@/path/to/your/file01.scn \ -F files[]=@/path/to/your/file02.png \ -F files[]=@/path/to/your/file03.jpg
An example of success response:
200 HTTP response code
{ "id": "6Yz5Q7AGkh", "productNumber": "PR-01004", "name": "YourProduct", "appName": "YourProduct (app)", "createdAt": "2019-12-06T15:12:42.092Z", "updatedAt": "2019-12-08T16:01:59.348Z", "isFloating": true, "description": "Description of YourProduct", "productLink": "https://my.store.com/product/YOUR_PRODUCT", "isVariance": true, "parentProductNumber": "PR-01001", "published": true, "thumbnail": null, "iosModel": "https://manage.configwise.io/configwise/files/companies/EZVEjkaKiH/catalog/components/6Yz5Q7AGkh/scn/184f4ef1-2cc5-4276-8949-43b960ef7efc/file01.scn", "iosModelAssets": [ "https://manage.configwise.io/configwise/files/companies/EZVEjkaKiH/catalog/components/6Yz5Q7AGkh/scn/184f4ef1-2cc5-4276-8949-43b960ef7efc/file02.png", "https://manage.configwise.io/configwise/files/companies/EZVEjkaKiH/catalog/components/6Yz5Q7AGkh/scn/184f4ef1-2cc5-4276-8949-43b960ef7efc/file03.jpg" ], "androidModel": null, "androidModelAssets": [], "originalModel": null, "originalModelAssets": [], "fileSizes": [ { "filePath": "companies/EZVEjkaKiH/catalog/components/6Yz5Q7AGkh/scn/184f4ef1-2cc5-4276-8949-43b960ef7efc/file01.scn", "size": 301336 }, { "filePath": "companies/EZVEjkaKiH/catalog/components/6Yz5Q7AGkh/scn/184f4ef1-2cc5-4276-8949-43b960ef7efc/file02.png", "size": 129658 }, { "filePath": "companies/EZVEjkaKiH/catalog/components/6Yz5Q7AGkh/scn/184f4ef1-2cc5-4276-8949-43b960ef7efc/file03.jpg", "size": 1753535 } ], "nodesToTags": [], "tagsToMaterials": [] }
Examples of error responses:
404 HTTP response code (if requested component not found)
{ "error": "Not Found." }
400 HTTP response code (if incorrect parameters in the HTTP request)
// In case if you only attached assets and forgot to attach required 3D model file. { "error": "3D model file is required in uploading content." } // In case if no attached files to upload at all. { "error": "No uploading file." }
403 HTTP response code (if incorrect 'x-token' header in the response)
{ "error": "Forbidden." }
500 HTTP response code (if server side error occurs)
{ "error": "Internal Server Error" }