MaterialController
Overview
Description
This is a material.
Path /v2/materials
Handles all request regarding materials: creating, updating, deleting.
query-params for every GET-call:
embedTextures: true/false if true the materials contain textureObjects additionally to the textures array (with the ids) so that the client doesn't have to request them seperatly
Material JSON object
An example for a material json object.
fields
externalIdentfier
version
id
color
shading
properties
thumbnail
asset
textures
tags
label
language
catalog
group
links
hidden - deprecated, superseded by visibilityStatus
active - deprecated, superseded by visibilityStatus
activeFrom
activeTill
updated
created
visibilityStatus : possible values (0, 1, 2), note that this value is computed from activeFrom and activeTill if those are set
0 : "shown everywhere "
1 : "shown only in Rubens Admin"
2 : "hidden everywhere" - item is archived
GET /v2/materials
List of all materials matching the filter and visible to the Client
Generates: application/json
Response success (200 OK):
Parameters
POST /v2/materials
Creates a new material in the catalog provided in the body.
Accepts: application/json Generates: application/json
Body:
Response success (201 CREATED):
PUT /v2/materials/:materialId
Updates the metainformation of a material. Thumbnail needs to be uploaded explicitly (can’t be changed with this call).
Accepts: application/json Generates: application/json
Body:
Response success (200 OK):
POST /v2/materials/:materialId/thumbnail
Uploads the thumbnail for the material. Override the last uploaded thumbnail if any.
Accepts: multipart-formdata
Generates: application/json (the adapted material)
Body: thumbnail binary file (filename is only relevant for the ending)
Response success (200 OK):
Updated materialJSON with updated thumbnailUrl.
For uploading a thumbnail to a given material. The image will be uploaded and linked in the material. If the image is bigger than 256x256, it will be resized to fit in to the square 256x256.
GET /v2/materials/:materialId/thumbnail
Returns a temporary redirect (307) to the URL of the thumbnail for this material. If the response status is 403, you are not allowed to see the material. If the response status is 404, the material has no thumbnail.
Last updated