AssetController
Overview
Description
Path /v2/assets
Asset Processing JSON object
An example for an asset processing object.
{
"id": "id",
"type": 5,
"status": 100,
"tenantId": 3,
"targetId": "<id of the object for which the processing was started>",
"created": "1970-01-01T00:54:54.000Z",
"updated": "2022-05-02T22:23:30.000Z",
"userEmail": "<email of the user that triggered the processing>",
"thumbnail": "<url to the thumbnail for the target object>",
"resultUrl": "<link to result data in storage>",
"label": "<label of the target element>",
"catalogLabel": "<label of the catalog>"
}
Responses are usually wrapped in a meta object, which contains additional information about the response and may contain a single item or a list of items.
{
"assetProcessing": <assetProcessingObject>,
"assetProcessings":
[
<assetProcessing1>,
<assetProcessingObject2>,
...
],
"meta": {
"lastUpdated": "2018-01-23T09:15:39.000Z",
"cached": false,
"total": <number of assetProcessings>,
"serverTime": "2019-03-14T12:29:08.549Z"
}
}
Fields:
id - unique identifier of the processing
created - date of creation
updated - date of last update
type - identifier of the processing type
targetId - combined id of the originating item/configuration
status - current status of the processing
tenantId - identifier of the tenant where the processing was triggered
userEmail - email of the user that triggered the processing
thumbnail - url to perspective image
resultUrl - link to result data in storage
label - label of the item/configuration
catalogLabel - label of the catalog
0
API received job
5
DAP queued the job
10
DAP is processing this job
100
DAP has successfully processed this job
-1
Processing failed
Concepts
Digital Asset Pipe (DAP)
Asset Analyzer
The assetAnalyzer is a synchronous call to the DAP, which returns an analysis of the posted static 3D asset and a link to a .glb file to show in the front end and used for further processing. The analysis contains information about the geometry, textures and materials of the asset. The assetAnalyzer is used to analyze the source file, that is posted to the /analyze endpoint. The source file can be a zip or tar.gz file, that contains the 3D asset and its textures. The assetAnalyzer returns a json object, that contains the analysis of the asset and a link to a .glb file.
3d Asset for AR
The 3d asset for AR is a static 3D asset, that can be used in Augmented Reality applications. It is usually a .glb file or .usdz file, that contains the geometry and textures of the object. The asset is either cached in the relevant element(item/configuration/planSnapshot) or generated on the fly via a syncronous call from the configuration or plan data. Links to already generated ones are part of the assets of the relevant element. Can be requested as binaries directly via the 3dAssets path of the relevant element.
Asset processing
A post to assetProcessing contains assets, that are to be prepared and optimized by the Digital Asset Pipe(DAP) and then added to the object for which they were posted. This operation is asynchronous and the user is notified of the success/failure of the processing by email.
API Reference
POST /analyze
Generates: json Consumes: MultipartFormData
form-parameters:
threeDimensionalAsset (file) : the source file to be processed (zip or tar.gz)
threeDimensionalAssetUrl (string) : URL to the source file
If a threeDimensionalAssetUrl is given, the threeDimensionalAsset is ignored and the file from the Url is taken as a source.
PUT /processings/:id
Generates: json Consumes: MultipartFormData
Path parameters:
id: the id of the item to which we are adding the assets
form-parameters:
"assetResult": json containing the task
Last updated