Asset Jobs API
POST https://admin.threekit.com/api/asset-jobs/clara
Imports a scene from clara.io, specified by its id.
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/clara
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | importClaraBody | true | Import information. |
Body Parameters
{
"claraURL": "string",
"orgId": "string",
"sync": true
}
Response Codes
{
"claraURL": "string",
"orgId": "string",
"sync": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Clara import job was started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, Clara import couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/clara \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"claraURL":"string","orgId":"string","sync":true}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/clara",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ claraURL: 'string', orgId: 'string', sync: true }));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/clara",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"claraURL\":\"string\",\"orgId\":\"string\",\"sync\":true}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "import started",
"jobId": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"job": {
"id": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"createdBy": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"orgId": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"title": "Import",
"schedulerState": "active",
"type": "import",
"createdAt": "2019-10-29T18:44:27.697Z",
"updatedAt": "2019-10-29T18:44:27.697Z",
"priority": 0,
"tasks": [
{
"title": "Import",
"type": "import",
"jobId": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"id": "18411e6c-fa86-11e9-add5-67cc104c1950"
}
]
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"importFailure": {
"summary": "Clara scene is not found or wasn't provided in request",
"value": {
"error": {
"type": "clara_import_failure",
"message": "\"claraURL\" found in the request"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/imports
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/clara \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"claraURL":"string","orgId":"string","sync":true}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/clara",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ claraURL: 'string', orgId: 'string', sync: true }));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/clara",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"claraURL\":\"string\",\"orgId\":\"string\",\"sync\":true}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "import started",
"jobId": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"job": {
"id": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"createdBy": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"orgId": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"title": "Import",
"schedulerState": "active",
"type": "import",
"createdAt": "2019-10-29T18:44:27.697Z",
"updatedAt": "2019-10-29T18:44:27.697Z",
"priority": 0,
"tasks": [
{
"title": "Import",
"type": "import",
"jobId": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"id": "18411e6c-fa86-11e9-add5-67cc104c1950"
}
]
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"importFailure": {
"summary": "Clara scene is not found or wasn't provided in request",
"value": {
"error": {
"type": "clara_import_failure",
"message": "\"claraURL\" found in the request"
}
}
}
}
Imports multiple 3D models and images, creating corresponding assets.
Supported 3D filetypes include .gltf, .glb, .fbx, .obj, .usd, .usda, .usdc, .usdz, .step, .dwg and .iges.
Supported image filetypes include .png, .hdr, and .exr
NOTE - This does not allow the sync parameter to be used which means that the API will not wait for the call to finish
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/imports
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | importBody | true | Import information. |
Body Parameters
{
"fileId": "string",
"orgId": "string",
"sync": true,
"settings": {
"vrSceneMode": "string",
"vrSceneTool": "string",
"importAs": "string",
"dontOverwriteAssets": true,
"updateMaterials": true,
"updateTextures": true
},
"parentFolderId": "string",
"targetId": "string"
}
Response Codes
{
"fileId": "string",
"orgId": "string",
"sync": true,
"settings": {
"vrSceneMode": "string",
"vrSceneTool": "string",
"importAs": "string",
"dontOverwriteAssets": true,
"updateMaterials": true,
"updateTextures": true
},
"parentFolderId": "string",
"targetId": "string"
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Asset import job was started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, import couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/imports \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"fileId":"string","orgId":"string","sync":true,"settings":{"vrSceneMode":"string","vrSceneTool":"string","importAs":"string","dontOverwriteAssets":true,"updateMaterials":true,"updateTextures":true},"parentFolderId":"string","targetId":"string"}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/imports",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
fileId: 'string',
orgId: 'string',
sync: true,
settings: {
vrSceneMode: 'string',
vrSceneTool: 'string',
importAs: 'string',
dontOverwriteAssets: true,
updateMaterials: true,
updateTextures: true
},
parentFolderId: 'string',
targetId: 'string'
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"fileId\":\"string\",\"orgId\":\"string\",\"sync\":true,\"settings\":{\"vrSceneMode\":\"string\",\"vrSceneTool\":\"string\",\"importAs\":\"string\",\"dontOverwriteAssets\":true,\"updateMaterials\":true,\"updateTextures\":true},\"parentFolderId\":\"string\",\"targetId\":\"string\"}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "import started",
"jobId": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"job": {
"id": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"createdBy": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"orgId": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"title": "Import",
"schedulerState": "active",
"type": "import",
"createdAt": "2019-10-29T18:44:27.697Z",
"updatedAt": "2019-10-29T18:44:27.697Z",
"priority": 0,
"tasks": [
{
"title": "Import",
"type": "import",
"jobId": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"id": "18411e6c-fa86-11e9-add5-67cc104c1950"
}
]
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"importFailure": {
"summary": "File is not found or wasn't provided in request",
"value": {
"error": {
"type": "import_failure",
"message": "No file found in the request"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/:assetId/export/:format
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/imports \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"fileId":"string","orgId":"string","sync":true,"settings":{"vrSceneMode":"string","vrSceneTool":"string","importAs":"string","dontOverwriteAssets":true,"updateMaterials":true,"updateTextures":true},"parentFolderId":"string","targetId":"string"}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/imports",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
fileId: 'string',
orgId: 'string',
sync: true,
settings: {
vrSceneMode: 'string',
vrSceneTool: 'string',
importAs: 'string',
dontOverwriteAssets: true,
updateMaterials: true,
updateTextures: true
},
parentFolderId: 'string',
targetId: 'string'
}));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/imports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"fileId\":\"string\",\"orgId\":\"string\",\"sync\":true,\"settings\":{\"vrSceneMode\":\"string\",\"vrSceneTool\":\"string\",\"importAs\":\"string\",\"dontOverwriteAssets\":true,\"updateMaterials\":true,\"updateTextures\":true},\"parentFolderId\":\"string\",\"targetId\":\"string\"}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "import started",
"jobId": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"job": {
"id": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"createdBy": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"orgId": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"title": "Import",
"schedulerState": "active",
"type": "import",
"createdAt": "2019-10-29T18:44:27.697Z",
"updatedAt": "2019-10-29T18:44:27.697Z",
"priority": 0,
"tasks": [
{
"title": "Import",
"type": "import",
"jobId": "aff4a702-fa85-11e9-8c6f-13d2bb1ab759",
"id": "18411e6c-fa86-11e9-add5-67cc104c1950"
}
]
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"importFailure": {
"summary": "File is not found or wasn't provided in request",
"value": {
"error": {
"type": "import_failure",
"message": "No file found in the request"
}
}
}
}
Exports an asset or a product. Supported export formats include GLB, USDZ, and FBX. To export a product, replace asset ID with the product ID in the url.
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/:assetId/export/:format?cache=[cache]&wait=[wait]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
cache | query | boolean | false | Caches the file created. |
wait | query | boolean | false | It will query for the latest version of the file. If the latest version is not available, |
body | body | exportBody | true | Export information. |
Detailed descriptions
wait: It will query for the latest version of the file. If the latest version is not available, it will serve an older version and queue a job for the new one. If no version is available, it will create one and send it back in the response. This parameter will only work in conjunction with the cache parameter. It has no effect if the cache parameter is not present in the request.
Body Parameters
{
"title": "string",
"orgId": "string",
"configuration": {},
"sync": true
}
Response Codes
{
"title": "string",
"orgId": "string",
"configuration": {},
"sync": true
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Asset export job was started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, export job couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/:assetId/export/:format \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"title":"string","orgId":"string","configuration":{},"sync":true}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/:assetId/export/:format",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ title: 'string', orgId: 'string', configuration: {}, sync: true }));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/:assetId/export/:format",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"title\":\"string\",\"orgId\":\"string\",\"configuration\":{},\"sync\":true}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "export started",
"jobId": "22401a9e-fa86-11e9-8234-ebb42336687b",
"job": {
"id": "22401a9e-fa86-11e9-8234-ebb42336687b",
"createdBy": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"orgId": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"title": "ExportedFile.fbx",
"schedulerState": "active",
"type": "export",
"createdAt": "2019-10-29T18:59:23.715Z",
"updatedAt": "2019-10-29T18:59:23.715Z",
"priority": 0,
"tasks": [
{
"title": "ExportedFile.fbx",
"type": "export",
"jobId": "22401a9e-fa86-11e9-8234-ebb42336687b",
"id": "024905d2-80d5-4384-978c-1e04e75ce720"
}
]
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Export job could not be created",
"value": {
"error": {
"type": "export_failure",
"message": "failed to create job"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/:assetId/render/webgl/image
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/:assetId/export/:format \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"title":"string","orgId":"string","configuration":{},"sync":true}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/:assetId/export/:format",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({ title: 'string', orgId: 'string', configuration: {}, sync: true }));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/:assetId/export/:format",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"title\":\"string\",\"orgId\":\"string\",\"configuration\":{},\"sync\":true}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "export started",
"jobId": "22401a9e-fa86-11e9-8234-ebb42336687b",
"job": {
"id": "22401a9e-fa86-11e9-8234-ebb42336687b",
"createdBy": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"orgId": "c87b4f24-fa85-11e9-b80e-bbd116e35040",
"title": "ExportedFile.fbx",
"schedulerState": "active",
"type": "export",
"createdAt": "2019-10-29T18:59:23.715Z",
"updatedAt": "2019-10-29T18:59:23.715Z",
"priority": 0,
"tasks": [
{
"title": "ExportedFile.fbx",
"type": "export",
"jobId": "22401a9e-fa86-11e9-8234-ebb42336687b",
"id": "024905d2-80d5-4384-978c-1e04e75ce720"
}
]
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Export job could not be created",
"value": {
"error": {
"type": "export_failure",
"message": "failed to create job"
}
}
}
}
Renders an asset using WebGL. To render a product, replace asset ID with the product ID in the url. This API allows for passing a stage ID as well as a stage configuration as optional parameters, to render products or assets with a specific scene(called stage).
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/:assetId/render/webgl/image?cache=[cache]&wait=[wait]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
cache | query | boolean | false | Caches the file created. |
wait | query | boolean | false | It will query for the latest version of the file. If the latest version is not available, |
body | body | renderBody | true | Render information. |
Detailed descriptions
wait: It will query for the latest version of the file. If the latest version is not available, it will serve an older version and queue a job for the new one. If no version is available, it will create one and send it back in the response. This parameter will only work in conjunction with the cache parameter. It has no effect if the cache parameter is not present in the request.
Body Parameters
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"sync": true,
"settings": {
"output": {
"resolution": {
"width": 512,
"height": 512
}
}
}
}
Response Codes
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"sync": true,
"settings": {
"output": {
"resolution": {
"width": 512,
"height": 512
}
}
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Asset render job was started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, render job couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/:assetId/render/webgl/image \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","configuration":{},"stageId":"string","stageConfiguration":{},"sync":true,"settings":{"output":{"resolution":{"width":512,"height":512}}}}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/:assetId/render/webgl/image",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
configuration: {},
stageId: 'string',
stageConfiguration: {},
sync: true,
settings: { output: { resolution: { width: 512, height: 512 } } }
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/:assetId/render/webgl/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"configuration\":{},\"stageId\":\"string\",\"stageConfiguration\":{},\"sync\":true,\"settings\":{\"output\":{\"resolution\":{\"width\":512,\"height\":512}}}}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"runs": {
"id": "0a5277cd-6e49-4e4a-b86c-1fdf053c7919",
"taskId": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"createdAt": "2020-01-30T19:23:59.756Z",
"updatedAt": "2020-01-30T19:24:06.215Z",
"stoppedAt": "2020-01-30T19:24:06.188Z",
"results": {
"files": {
"id": "da8e94c2-30a3-4acd-9b26-75a41ac91ed2",
"name": "ExampleAssetName.png",
"stderr": {
"id": "89ee7354-309c-499a-9add-9283d1c975b9",
"name": "stderr"
},
"stdout": {
"id": "ec3380ff-9120-4100-b708-a7337016f1ec",
"name": "stdout"
}
},
"resultCode": "Success",
"resultMessage": null,
"error": null,
"progress": 1,
"machine": null,
"startedAt": "2020-01-30T19:23:59.729Z",
"GPUTime": null,
"CPUTime": null,
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"reportProgress": true
}
}
}
}
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"fileId": "16d886fd-5fb3-4ac0-a1e6-373600f25170",
"jobId": "7ebf3b1f-0f2c-4c32-8fe3-c08e0639d3a5",
"job": null,
"_id": "7ebf3b1f-0f2c-4c32-8fe3-c08e0639d3a5",
"runs": {
"results": {
"files": {
"id": "16d886fd-5fb3-4ac0-a1e6-373600f25170"
}
}
}
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/:assetId/render/vray/image
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/:assetId/render/webgl/image \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","configuration":{},"stageId":"string","stageConfiguration":{},"sync":true,"settings":{"output":{"resolution":{"width":512,"height":512}}}}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/:assetId/render/webgl/image",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
configuration: {},
stageId: 'string',
stageConfiguration: {},
sync: true,
settings: { output: { resolution: { width: 512, height: 512 } } }
}));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/:assetId/render/webgl/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"configuration\":{},\"stageId\":\"string\",\"stageConfiguration\":{},\"sync\":true,\"settings\":{\"output\":{\"resolution\":{\"width\":512,\"height\":512}}}}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"runs": {
"id": "0a5277cd-6e49-4e4a-b86c-1fdf053c7919",
"taskId": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"createdAt": "2020-01-30T19:23:59.756Z",
"updatedAt": "2020-01-30T19:24:06.215Z",
"stoppedAt": "2020-01-30T19:24:06.188Z",
"results": {
"files": {
"id": "da8e94c2-30a3-4acd-9b26-75a41ac91ed2",
"name": "ExampleAssetName.png",
"stderr": {
"id": "89ee7354-309c-499a-9add-9283d1c975b9",
"name": "stderr"
},
"stdout": {
"id": "ec3380ff-9120-4100-b708-a7337016f1ec",
"name": "stdout"
}
},
"resultCode": "Success",
"resultMessage": null,
"error": null,
"progress": 1,
"machine": null,
"startedAt": "2020-01-30T19:23:59.729Z",
"GPUTime": null,
"CPUTime": null,
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"reportProgress": true
}
}
}
}
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"fileId": "16d886fd-5fb3-4ac0-a1e6-373600f25170",
"jobId": "7ebf3b1f-0f2c-4c32-8fe3-c08e0639d3a5",
"job": null,
"_id": "7ebf3b1f-0f2c-4c32-8fe3-c08e0639d3a5",
"runs": {
"results": {
"files": {
"id": "16d886fd-5fb3-4ac0-a1e6-373600f25170"
}
}
}
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
Renders an asset using VRay. To render a product, replace asset ID with the product ID in the url. This API allows for passing a stage ID as well as a stage configuration as optional parameters, to render products or assets with a specific scene(called stage).
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/:assetId/render/vray/image?cache=[cache]&wait=[wait]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
cache | query | boolean | false | Caches the file created. |
wait | query | boolean | false | It will query for the latest version of the file. If the latest version is not available, |
body | body | renderBody | true | Render information. |
Detailed descriptions
wait: It will query for the latest version of the file. If the latest version is not available, it will serve an older version and queue a job for the new one. If no version is available, it will create one and send it back in the response. This parameter will only work in conjunction with the cache parameter. It has no effect if the cache parameter is not present in the request.
Body Parameters
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"sync": true,
"settings": {
"output": {
"resolution": {
"width": 512,
"height": 512
}
}
}
}
Response Codes
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"sync": true,
"settings": {
"output": {
"resolution": {
"width": 512,
"height": 512
}
}
}
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Asset render job was started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, render job couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/:assetId/render/vray/image \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","configuration":{},"stageId":"string","stageConfiguration":{},"sync":true,"settings":{"output":{"resolution":{"width":512,"height":512}}}}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/:assetId/render/vray/image",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
configuration: {},
stageId: 'string',
stageConfiguration: {},
sync: true,
settings: { output: { resolution: { width: 512, height: 512 } } }
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/:assetId/render/vray/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"configuration\":{},\"stageId\":\"string\",\"stageConfiguration\":{},\"sync\":true,\"settings\":{\"output\":{\"resolution\":{\"width\":512,\"height\":512}}}}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"runs": {
"id": "0a5277cd-6e49-4e4a-b86c-1fdf053c7919",
"taskId": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"createdAt": "2020-01-30T19:23:59.756Z",
"updatedAt": "2020-01-30T19:24:06.215Z",
"stoppedAt": "2020-01-30T19:24:06.188Z",
"results": {
"files": {
"id": "da8e94c2-30a3-4acd-9b26-75a41ac91ed2",
"name": "ExampleAssetName.png",
"stderr": {
"id": "89ee7354-309c-499a-9add-9283d1c975b9",
"name": "stderr"
},
"stdout": {
"id": "ec3380ff-9120-4100-b708-a7337016f1ec",
"name": "stdout"
}
},
"resultCode": "Success",
"resultMessage": null,
"error": null,
"progress": 1,
"machine": null,
"startedAt": "2020-01-30T19:23:59.729Z",
"GPUTime": null,
"CPUTime": null,
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"reportProgress": true
}
}
}
}
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"fileId": "16d886fd-5fb3-4ac0-a1e6-373600f25170",
"jobId": "7ebf3b1f-0f2c-4c32-8fe3-c08e0639d3a5",
"job": null,
"_id": "7ebf3b1f-0f2c-4c32-8fe3-c08e0639d3a5",
"runs": {
"results": {
"files": {
"id": "16d886fd-5fb3-4ac0-a1e6-373600f25170"
}
}
}
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/renders
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/:assetId/render/vray/image \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","configuration":{},"stageId":"string","stageConfiguration":{},"sync":true,"settings":{"output":{"resolution":{"width":512,"height":512}}}}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/:assetId/render/vray/image",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
configuration: {},
stageId: 'string',
stageConfiguration: {},
sync: true,
settings: { output: { resolution: { width: 512, height: 512 } } }
}));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/:assetId/render/vray/image",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"configuration\":{},\"stageId\":\"string\",\"stageConfiguration\":{},\"sync\":true,\"settings\":{\"output\":{\"resolution\":{\"width\":512,\"height\":512}}}}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"runs": {
"id": "0a5277cd-6e49-4e4a-b86c-1fdf053c7919",
"taskId": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"createdAt": "2020-01-30T19:23:59.756Z",
"updatedAt": "2020-01-30T19:24:06.215Z",
"stoppedAt": "2020-01-30T19:24:06.188Z",
"results": {
"files": {
"id": "da8e94c2-30a3-4acd-9b26-75a41ac91ed2",
"name": "ExampleAssetName.png",
"stderr": {
"id": "89ee7354-309c-499a-9add-9283d1c975b9",
"name": "stderr"
},
"stdout": {
"id": "ec3380ff-9120-4100-b708-a7337016f1ec",
"name": "stdout"
}
},
"resultCode": "Success",
"resultMessage": null,
"error": null,
"progress": 1,
"machine": null,
"startedAt": "2020-01-30T19:23:59.729Z",
"GPUTime": null,
"CPUTime": null,
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"reportProgress": true
}
}
}
}
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"fileId": "16d886fd-5fb3-4ac0-a1e6-373600f25170",
"jobId": "7ebf3b1f-0f2c-4c32-8fe3-c08e0639d3a5",
"job": null,
"_id": "7ebf3b1f-0f2c-4c32-8fe3-c08e0639d3a5",
"runs": {
"results": {
"files": {
"id": "16d886fd-5fb3-4ac0-a1e6-373600f25170"
}
}
}
}
{
"msg": "WebGL render started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "render-webgl",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Conf Asset.png' --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":640,\"height\":640}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":640,\"height\":640},\"format\":\"render-webgl\"}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "render-webgl",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
Calculates and initiates renders of all possible combinations of all items and stages. For an item with a composition attached to it, all combinations of each layer are rendered. For item without any comp, all combinations are rendered. Currently the maximum resolution we support for renders is 4K.
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/renders
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | bulkRendersBody | true | Render information |
Body Parameters
{
"orgId": "string",
"type": "string",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
]
}
Response Codes
{
"orgId": "string",
"type": "string",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Asset renders jobs started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, render job couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/renders \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","type":"string","assets":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}],"stages":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}]}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/renders",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
type: 'string',
assets: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
],
stages: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
]
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/renders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"type\":\"string\",\"assets\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}],\"stages\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"msg": "Renders started",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"job": {
"id": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"title": "virtual-photographer-vray-renders",
"schedulerState": "active",
"type": "render-vray",
"createdAt": "2020-02-20T14:42:19.701Z",
"updatedAt": "2020-02-20T14:42:19.701Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh result.png --orgId 6db538e0-db6a-4d5d-acbc-2da0a7a30697 --assetId 89ef25c5-ce6c-422c-9f30-271e3d334463 --authToken '<Token>' --settings '{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}'",
"title": "virtual-photographer-vray-renders",
"version": "1.2.11-epic-virtual-photographer.4",
"envFromSecret": "render-vray",
"parameters": "{\"image\":\"registry.gitlab.com/threekit/core/render-vray:1.2.11-epic-virtual-photographer.4\",\"assetId\":\"f23dbb04-194e-49e8-85e9-a99577121142\",\"orgId\":\"006bb297-7493-46d7-af36-167214c26f66\",\"settings\":{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}}",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"type": "render-vray",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"id": "3fc02f73-787d-44d8-9f30-9959547c26c3"
}
}
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --stageId 8036b3dd-3e26-4709-9881-67c35b9c1e48 --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"stageId\":\"8036b3dd-3e26-4709-9881-67c35b9c1e48\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/composites
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/renders \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","type":"string","assets":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}],"stages":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}]}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/renders",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
type: 'string',
assets: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
],
stages: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
]
}));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/renders",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"type\":\"string\",\"assets\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}],\"stages\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"msg": "Renders started",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"job": {
"id": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"title": "virtual-photographer-vray-renders",
"schedulerState": "active",
"type": "render-vray",
"createdAt": "2020-02-20T14:42:19.701Z",
"updatedAt": "2020-02-20T14:42:19.701Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh result.png --orgId 6db538e0-db6a-4d5d-acbc-2da0a7a30697 --assetId 89ef25c5-ce6c-422c-9f30-271e3d334463 --authToken '<Token>' --settings '{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}'",
"title": "virtual-photographer-vray-renders",
"version": "1.2.11-epic-virtual-photographer.4",
"envFromSecret": "render-vray",
"parameters": "{\"image\":\"registry.gitlab.com/threekit/core/render-vray:1.2.11-epic-virtual-photographer.4\",\"assetId\":\"f23dbb04-194e-49e8-85e9-a99577121142\",\"orgId\":\"006bb297-7493-46d7-af36-167214c26f66\",\"settings\":{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}}",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"type": "render-vray",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"id": "3fc02f73-787d-44d8-9f30-9959547c26c3"
}
}
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --stageId 8036b3dd-3e26-4709-9881-67c35b9c1e48 --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"stageId\":\"8036b3dd-3e26-4709-9881-67c35b9c1e48\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
Calculates and initiates composite jobs of all possible combinations of all items and stages. If applicable it also initiates a separate job to render out missing layers in the process
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/composites
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | bulkRendersBody | true | Composite job information |
Body Parameters
{
"orgId": "string",
"type": "string",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
]
}
Response Codes
{
"orgId": "string",
"type": "string",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Asset renders jobs started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, render job couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/composites \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","type":"string","assets":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}],"stages":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}]}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/composites",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
type: 'string',
assets: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
],
stages: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
]
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/composites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"type\":\"string\",\"assets\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}],\"stages\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"msg": "Renders started",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"job": {
"id": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"title": "virtual-photographer-vray-renders",
"schedulerState": "active",
"type": "render-vray",
"createdAt": "2020-02-20T14:42:19.701Z",
"updatedAt": "2020-02-20T14:42:19.701Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh result.png --orgId 6db538e0-db6a-4d5d-acbc-2da0a7a30697 --assetId 89ef25c5-ce6c-422c-9f30-271e3d334463 --authToken '<Token>' --settings '{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}'",
"title": "virtual-photographer-vray-renders",
"version": "1.2.11-epic-virtual-photographer.4",
"envFromSecret": "render-vray",
"parameters": "{\"image\":\"registry.gitlab.com/threekit/core/render-vray:1.2.11-epic-virtual-photographer.4\",\"assetId\":\"f23dbb04-194e-49e8-85e9-a99577121142\",\"orgId\":\"006bb297-7493-46d7-af36-167214c26f66\",\"settings\":{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}}",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"type": "render-vray",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"id": "3fc02f73-787d-44d8-9f30-9959547c26c3"
}
}
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --stageId 8036b3dd-3e26-4709-9881-67c35b9c1e48 --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"stageId\":\"8036b3dd-3e26-4709-9881-67c35b9c1e48\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/exports
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/composites \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","type":"string","assets":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}],"stages":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}]}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/composites",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
type: 'string',
assets: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
],
stages: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
]
}));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/composites",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"type\":\"string\",\"assets\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}],\"stages\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"msg": "Renders started",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"job": {
"id": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"title": "virtual-photographer-vray-renders",
"schedulerState": "active",
"type": "render-vray",
"createdAt": "2020-02-20T14:42:19.701Z",
"updatedAt": "2020-02-20T14:42:19.701Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh result.png --orgId 6db538e0-db6a-4d5d-acbc-2da0a7a30697 --assetId 89ef25c5-ce6c-422c-9f30-271e3d334463 --authToken '<Token>' --settings '{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}'",
"title": "virtual-photographer-vray-renders",
"version": "1.2.11-epic-virtual-photographer.4",
"envFromSecret": "render-vray",
"parameters": "{\"image\":\"registry.gitlab.com/threekit/core/render-vray:1.2.11-epic-virtual-photographer.4\",\"assetId\":\"f23dbb04-194e-49e8-85e9-a99577121142\",\"orgId\":\"006bb297-7493-46d7-af36-167214c26f66\",\"settings\":{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}}",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"type": "render-vray",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"id": "3fc02f73-787d-44d8-9f30-9959547c26c3"
}
}
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --stageId 8036b3dd-3e26-4709-9881-67c35b9c1e48 --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"stageId\":\"8036b3dd-3e26-4709-9881-67c35b9c1e48\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
Calculates and initiates export jobs of all possible combinations of all items and stages. Composition node is not taken into account for export jobs
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/exports
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | bulkRendersBody | true | Export job information |
Body Parameters
{
"orgId": "string",
"type": "string",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
]
}
Response Codes
{
"orgId": "string",
"type": "string",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Asset renders jobs started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, render job couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/exports \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","type":"string","assets":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}],"stages":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}]}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/exports",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
type: 'string',
assets: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
],
stages: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
]
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"type\":\"string\",\"assets\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}],\"stages\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"msg": "Renders started",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"job": {
"id": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"title": "virtual-photographer-vray-renders",
"schedulerState": "active",
"type": "render-vray",
"createdAt": "2020-02-20T14:42:19.701Z",
"updatedAt": "2020-02-20T14:42:19.701Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh result.png --orgId 6db538e0-db6a-4d5d-acbc-2da0a7a30697 --assetId 89ef25c5-ce6c-422c-9f30-271e3d334463 --authToken '<Token>' --settings '{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}'",
"title": "virtual-photographer-vray-renders",
"version": "1.2.11-epic-virtual-photographer.4",
"envFromSecret": "render-vray",
"parameters": "{\"image\":\"registry.gitlab.com/threekit/core/render-vray:1.2.11-epic-virtual-photographer.4\",\"assetId\":\"f23dbb04-194e-49e8-85e9-a99577121142\",\"orgId\":\"006bb297-7493-46d7-af36-167214c26f66\",\"settings\":{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}}",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"type": "render-vray",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"id": "3fc02f73-787d-44d8-9f30-9959547c26c3"
}
}
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --stageId 8036b3dd-3e26-4709-9881-67c35b9c1e48 --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"stageId\":\"8036b3dd-3e26-4709-9881-67c35b9c1e48\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/downloads
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/exports \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","type":"string","assets":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}],"stages":[{"assetId":"string","layerId":"string","configuration":{},"configurations":[{}],"subset":{"attributes":{"exampleNonTagPartRefName":{"filterMode":"include","values":["9449ccb1-d6bc-4abc-9cd7-cfa4326b070c","43f78351-1800-403d-a208-ff7a33cc2d43"]},"exampleTagPartRefName":{"filterMode":"exclude","values":["#exampleTag1","#exampleTag2"]},"exampleStringAttName":{"filterMode":"include","values":["exampleValue1","exampleValue2"]}},"layers":{"filterMode":"exclude","values":["74763dc2-728b-4c04-868d-8ef7c56341c5"]},"uniqAttrs":"all"}}]}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/exports",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
type: 'string',
assets: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
],
stages: [
{
assetId: 'string',
layerId: 'string',
configuration: {},
configurations: [ {} ],
subset: {
attributes: {
exampleNonTagPartRefName: {
filterMode: 'include',
values: [
'9449ccb1-d6bc-4abc-9cd7-cfa4326b070c',
'43f78351-1800-403d-a208-ff7a33cc2d43'
]
},
exampleTagPartRefName: {
filterMode: 'exclude',
values: [ '#exampleTag1', '#exampleTag2' ]
},
exampleStringAttName: {
filterMode: 'include',
values: [ 'exampleValue1', 'exampleValue2' ]
}
},
layers: {
filterMode: 'exclude',
values: [ '74763dc2-728b-4c04-868d-8ef7c56341c5' ]
},
uniqAttrs: 'all'
}
}
]
}));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/exports",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"type\":\"string\",\"assets\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}],\"stages\":[{\"assetId\":\"string\",\"layerId\":\"string\",\"configuration\":{},\"configurations\":[{}],\"subset\":{\"attributes\":{\"exampleNonTagPartRefName\":{\"filterMode\":\"include\",\"values\":[\"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c\",\"43f78351-1800-403d-a208-ff7a33cc2d43\"]},\"exampleTagPartRefName\":{\"filterMode\":\"exclude\",\"values\":[\"#exampleTag1\",\"#exampleTag2\"]},\"exampleStringAttName\":{\"filterMode\":\"include\",\"values\":[\"exampleValue1\",\"exampleValue2\"]}},\"layers\":{\"filterMode\":\"exclude\",\"values\":[\"74763dc2-728b-4c04-868d-8ef7c56341c5\"]},\"uniqAttrs\":\"all\"}}]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"msg": "Renders started",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"job": {
"id": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"title": "virtual-photographer-vray-renders",
"schedulerState": "active",
"type": "render-vray",
"createdAt": "2020-02-20T14:42:19.701Z",
"updatedAt": "2020-02-20T14:42:19.701Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh result.png --orgId 6db538e0-db6a-4d5d-acbc-2da0a7a30697 --assetId 89ef25c5-ce6c-422c-9f30-271e3d334463 --authToken '<Token>' --settings '{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}'",
"title": "virtual-photographer-vray-renders",
"version": "1.2.11-epic-virtual-photographer.4",
"envFromSecret": "render-vray",
"parameters": "{\"image\":\"registry.gitlab.com/threekit/core/render-vray:1.2.11-epic-virtual-photographer.4\",\"assetId\":\"f23dbb04-194e-49e8-85e9-a99577121142\",\"orgId\":\"006bb297-7493-46d7-af36-167214c26f66\",\"settings\":{\"width\":512,\"height\":512,\"renderObjectsIds\":false,\"renderMode\":\"cpu\"}}",
"createdBy": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"orgId": "6db538e0-db6a-4d5d-acbc-2da0a7a30697",
"type": "render-vray",
"jobId": "a3ae486c-9d73-4845-8c96-de910ec0b521",
"id": "3fc02f73-787d-44d8-9f30-9959547c26c3"
}
}
}
{
"msg": "Renders started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders",
"schedulerState": "active",
"type": "render-webgl",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh render 'Example Test.png' --assetId f9e897f5-ce66-4c56-a955-f517e85a47fe --stageId 8036b3dd-3e26-4709-9881-67c35b9c1e48 --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --settings '{\"width\":640,\"height\":640}'",
"title": "virtual-photographer-webgl-renders",
"version": "1.2.0-epic-virtual-photographer.1",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"stageId\":\"8036b3dd-3e26-4709-9881-67c35b9c1e48\",\"settings\":{\"width\":640,\"height\":640},\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\",\"format\":\"render-webgl\",\"webhookUrls\":[\"http://layers-service:3029/api/layers\"],\"jobType\":\"VP\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "render-webgl",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
Fetches the results of a job or extracts the source files from texture assets and zips them up. Job result zips work for only render jobs and export jobs. If the item linked to the job has a composite node, it will create composite images for the item and then download them. For items without a composite node, the results are downloaded as is. **NOTE - **For layered render jobs, the latest configurator of the item is used to determine the configurations. If changes have been made to the configurator after the render job was completed, there is a possibility that the composite output may be incorrect. The results are cached by default, so if someone tries to initiate a download job for a cached entry they will receive the files list
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/downloads
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | downloadJobBody | true | Information for initiating download job |
Body Parameters
{
"jobId": "8a16a470-eeb5-495d-81f0-b839e4fe1d46",
"orgId": "14238e51-10ad-44e1-8561-31437af5ce83",
"format": "jpeg",
"downloadType": "texture",
"assetIds": [
"c7dc4cee-4268-4861-acca-537c08986cb4",
"b7c2c442-d412-478b-8113-2aeabedf1544"
]
}
Response Codes
{
"jobId": "8a16a470-eeb5-495d-81f0-b839e4fe1d46",
"orgId": "14238e51-10ad-44e1-8561-31437af5ce83",
"format": "jpeg",
"downloadType": "texture",
"assetIds": [
"c7dc4cee-4268-4861-acca-537c08986cb4",
"b7c2c442-d412-478b-8113-2aeabedf1544"
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Donwload job started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | JobId not provided in the request | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/downloads \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"jobId":"8a16a470-eeb5-495d-81f0-b839e4fe1d46","orgId":"14238e51-10ad-44e1-8561-31437af5ce83","format":"jpeg","downloadType":"texture","assetIds":["c7dc4cee-4268-4861-acca-537c08986cb4","b7c2c442-d412-478b-8113-2aeabedf1544"]}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/downloads",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
jobId: '8a16a470-eeb5-495d-81f0-b839e4fe1d46',
orgId: '14238e51-10ad-44e1-8561-31437af5ce83',
format: 'jpeg',
downloadType: 'texture',
assetIds: [
'c7dc4cee-4268-4861-acca-537c08986cb4',
'b7c2c442-d412-478b-8113-2aeabedf1544'
]
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/downloads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"jobId\":\"8a16a470-eeb5-495d-81f0-b839e4fe1d46\",\"orgId\":\"14238e51-10ad-44e1-8561-31437af5ce83\",\"format\":\"jpeg\",\"downloadType\":\"texture\",\"assetIds\":[\"c7dc4cee-4268-4861-acca-537c08986cb4\",\"b7c2c442-d412-478b-8113-2aeabedf1544\"]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "Download job started started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders download job",
"schedulerState": "active",
"type": "zip-download",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "./entryPoint.sh --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --jobId 87f81a5c-06f3-4f81-9051-04a1135ed117 --format png",
"title": "virtual-photographer-webgl-renders download job",
"envFromSecret": "zip-downloader",
"parameters": "{\"jobId\":\"87f81a5c-06f3-4f81-9051-04a1135ed117\",\"format\":\"png\",\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\", \"type\": \"zip-downloader\", \"cache\": \"true\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "zip-downloader",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Download job failed",
"value": {
"error": {
"type": "download_job_failed",
"message": "jobId needed to download results from"
}
}
}
}
POST https://admin.threekit.com/api/asset-jobs/:assetId/composite
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/downloads \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"jobId":"8a16a470-eeb5-495d-81f0-b839e4fe1d46","orgId":"14238e51-10ad-44e1-8561-31437af5ce83","format":"jpeg","downloadType":"texture","assetIds":["c7dc4cee-4268-4861-acca-537c08986cb4","b7c2c442-d412-478b-8113-2aeabedf1544"]}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/downloads",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
jobId: '8a16a470-eeb5-495d-81f0-b839e4fe1d46',
orgId: '14238e51-10ad-44e1-8561-31437af5ce83',
format: 'jpeg',
downloadType: 'texture',
assetIds: [
'c7dc4cee-4268-4861-acca-537c08986cb4',
'b7c2c442-d412-478b-8113-2aeabedf1544'
]
}));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/downloads",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"jobId\":\"8a16a470-eeb5-495d-81f0-b839e4fe1d46\",\"orgId\":\"14238e51-10ad-44e1-8561-31437af5ce83\",\"format\":\"jpeg\",\"downloadType\":\"texture\",\"assetIds\":[\"c7dc4cee-4268-4861-acca-537c08986cb4\",\"b7c2c442-d412-478b-8113-2aeabedf1544\"]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "Download job started started",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"job": {
"id": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"createdBy": "71beda14-5cbf-487f-82b8-765b40337902",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"title": "virtual-photographer-webgl-renders download job",
"schedulerState": "active",
"type": "zip-download",
"createdAt": "2020-02-19T15:29:25.978Z",
"updatedAt": "2020-02-19T15:29:25.978Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning\"": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "./entryPoint.sh --orgId f9e897f5-ce66-4c56-a955-f517e85a47fe --jobId 87f81a5c-06f3-4f81-9051-04a1135ed117 --format png",
"title": "virtual-photographer-webgl-renders download job",
"envFromSecret": "zip-downloader",
"parameters": "{\"jobId\":\"87f81a5c-06f3-4f81-9051-04a1135ed117\",\"format\":\"png\",\"orgId\":\"f9e897f5-ce66-4c56-a955-f517e85a47fe\", \"type\": \"zip-downloader\", \"cache\": \"true\"}",
"createdBy": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"orgId": "f9e897f5-ce66-4c56-a955-f517e85a47fe",
"type": "zip-downloader",
"jobId": "f15d23fb-6728-4dd8-95dd-e5b54b7ba058",
"id": "d8878950-c406-40dc-8999-517e8065930f"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Download job failed",
"value": {
"error": {
"type": "download_job_failed",
"message": "jobId needed to download results from"
}
}
}
}
Composites products layer images into a single image. urrently the maximum resolution we support for composites is 4K.
REST Endpoint
POST https://admin.threekit.com/api/asset-jobs/:assetId/composite
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
body | body | compositeBody | true | Composite request information |
Body Parameters
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"sync": true,
"settings": {
"inputHeight": 0,
"inputWidth": 0,
"height": 0,
"width": 0,
"format": "string"
},
"imageMagickConvertCommands": [
{
"height": 0,
"width": 0,
"format": "string",
"command": "string",
"filename": "string"
}
]
}
Response Codes
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"sync": true,
"settings": {
"inputHeight": 0,
"inputWidth": 0,
"height": 0,
"width": 0,
"format": "string"
},
"imageMagickConvertCommands": [
{
"height": 0,
"width": 0,
"format": "string",
"command": "string",
"filename": "string"
}
]
}
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Asset composite job was started. | None |
401 | Unauthorized | Unauthorized to make the request. | None |
422 | Unprocessable Entity | Malformed request, render job couldn't start. | None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/:assetId/composite \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","configuration":{},"stageId":"string","stageConfiguration":{},"sync":true,"settings":{"inputHeight":0,"inputWidth":0,"height":0,"width":0,"format":"string"},"imageMagickConvertCommands":[{"height":0,"width":0,"format":"string","command":"string","filename":"string"}]}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/:assetId/composite",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
configuration: {},
stageId: 'string',
stageConfiguration: {},
sync: true,
settings: {
inputHeight: 0,
inputWidth: 0,
height: 0,
width: 0,
format: 'string'
},
imageMagickConvertCommands: [
{
height: 0,
width: 0,
format: 'string',
command: 'string',
filename: 'string'
}
]
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/:assetId/composite",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"configuration\":{},\"stageId\":\"string\",\"stageConfiguration\":{},\"sync\":true,\"settings\":{\"inputHeight\":0,\"inputWidth\":0,\"height\":0,\"width\":0,\"format\":\"string\"},\"imageMagickConvertCommands\":[{\"height\":0,\"width\":0,\"format\":\"string\",\"command\":\"string\",\"filename\":\"string\"}]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Example responses
{
"msg": "Composite job finished",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "Composite",
"schedulerState": "active",
"type": "composite",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --configuration '{\"attr1\":\"b\",\"attr2\":\"a\"}' --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":1000,\"height\":1000}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":1000,\"height\":1000},\"configuration\":{\"chair\":\"b\",\"pillow\":\"a\"}}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "composite",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"runs": {
"id": "0a5277cd-6e49-4e4a-b86c-1fdf053c7919",
"taskId": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"createdAt": "2020-01-30T19:23:59.756Z",
"updatedAt": "2020-01-30T19:24:06.215Z",
"stoppedAt": "2020-01-30T19:24:06.188Z",
"results": {
"files": {
"id": "da8e94c2-30a3-4acd-9b26-75a41ac91ed2",
"name": "result.png",
"stderr": {
"id": "89ee7354-309c-499a-9add-9283d1c975b9",
"name": "stderr"
},
"stdout": {
"id": "ec3380ff-9120-4100-b708-a7337016f1ec",
"name": "stdout"
}
},
"resultCode": "Success",
"resultMessage": null,
"error": null,
"progress": 1,
"machine": null,
"startedAt": "2020-01-30T19:23:59.729Z",
"GPUTime": null,
"CPUTime": null,
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"reportProgress": true
}
}
}
}
}
{
"msg": "Composite job started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "Composite",
"schedulerState": "active",
"type": "composite",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --configuration '{\"attr1\":\"b\",\"attr2\":\"a\"}' --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":1000,\"height\":1000}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":1000,\"height\":1000},\"configuration\":{\"chair\":\"b\",\"pillow\":\"a\"}}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "composite",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
GET https://admin.threekit.com/api/assets/thumbnail/:assetId
REST Endpoint
GET https://admin.threekit.com/api/assets/thumbnail/:assetId?cache=[cache]&wait=[wait]
curl --request POST \
--url https://admin.threekit.com/api/asset-jobs/:assetId/composite \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"orgId":"string","configuration":{},"stageId":"string","stageConfiguration":{},"sync":true,"settings":{"inputHeight":0,"inputWidth":0,"height":0,"width":0,"format":"string"},"imageMagickConvertCommands":[{"height":0,"width":0,"format":"string","command":"string","filename":"string"}]}'
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/asset-jobs/:assetId/composite",
"headers": {
"content-type": "application/json",
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({
orgId: 'string',
configuration: {},
stageId: 'string',
stageConfiguration: {},
sync: true,
settings: {
inputHeight: 0,
inputWidth: 0,
height: 0,
width: 0,
format: 'string'
},
imageMagickConvertCommands: [
{
height: 0,
width: 0,
format: 'string',
command: 'string',
filename: 'string'
}
]
}));
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/asset-jobs/:assetId/composite",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"orgId\":\"string\",\"configuration\":{},\"stageId\":\"string\",\"stageConfiguration\":{},\"sync\":true,\"settings\":{\"inputHeight\":0,\"inputWidth\":0,\"height\":0,\"width\":0,\"format\":\"string\"},\"imageMagickConvertCommands\":[{\"height\":0,\"width\":0,\"format\":\"string\",\"command\":\"string\",\"filename\":\"string\"}]}",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}",
"content-type: application/json"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
"msg": "Composite job finished",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "Composite",
"schedulerState": "active",
"type": "composite",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --configuration '{\"attr1\":\"b\",\"attr2\":\"a\"}' --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":1000,\"height\":1000}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":1000,\"height\":1000},\"configuration\":{\"chair\":\"b\",\"pillow\":\"a\"}}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "composite",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"runs": {
"id": "0a5277cd-6e49-4e4a-b86c-1fdf053c7919",
"taskId": "8b68a334-beda-4d39-a981-5ae3b3bf563b",
"createdAt": "2020-01-30T19:23:59.756Z",
"updatedAt": "2020-01-30T19:24:06.215Z",
"stoppedAt": "2020-01-30T19:24:06.188Z",
"results": {
"files": {
"id": "da8e94c2-30a3-4acd-9b26-75a41ac91ed2",
"name": "result.png",
"stderr": {
"id": "89ee7354-309c-499a-9add-9283d1c975b9",
"name": "stderr"
},
"stdout": {
"id": "ec3380ff-9120-4100-b708-a7337016f1ec",
"name": "stdout"
}
},
"resultCode": "Success",
"resultMessage": null,
"error": null,
"progress": 1,
"machine": null,
"startedAt": "2020-01-30T19:23:59.729Z",
"GPUTime": null,
"CPUTime": null,
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"reportProgress": true
}
}
}
}
}
{
"msg": "Composite job started",
"jobId": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"job": {
"id": "e4d2b6b9-20c8-4fcb-b059-cd637ac3933d",
"createdBy": "9f750942-bb50-4f69-924e-0ee9db06a395",
"orgId": "9f750942-bb50-4f69-924e-0ee9db06a395",
"title": "Composite",
"schedulerState": "active",
"type": "composite",
"createdAt": "2020-01-30T19:23:54.731Z",
"updatedAt": "2020-01-30T19:23:54.731Z",
"parameters": {},
"taskStatusPending": null,
"taskStatusRunning": null,
"taskStatusStopped": null,
"status": null,
"taskProgress": null,
"taskCount": null,
"taskResultSuccesses": null,
"taskResultFailures": null,
"priority": 0,
"tasks": {
"image": "<Internal image path>",
"cmd": "/app/entryPoint.sh --assetId b467b5b7-43c6-4446-b928-fbef6f931e0e --orgId a9ae6830-2008-4324-a05a-cf98f2cca5af --configuration '{\"attr1\":\"b\",\"attr2\":\"a\"}' --authToken '34374e5c-5f00-4c34-93fc-8a2fe09e0a29' --settings '{\"width\":1000,\"height\":1000}'",
"title": "render-webgl",
"version": "1.1.6",
"envFromSecret": "render-webgl",
"parameters": "{\"assetId\":\"b467b5b7-43c6-4446-b928-fbef6f931e0e\",\"settings\":{\"width\":1000,\"height\":1000},\"configuration\":{\"chair\":\"b\",\"pillow\":\"a\"}}",
"createdBy": "0f05b3e3-4562-4278-b9b5-ace6dee2ca3a",
"orgId": "a9ae6830-2008-4324-a05a-cf98f2cca5af",
"type": "composite",
"jobId": "1da61e13-0a63-486e-96f5-03a1ed627e29",
"id": "8b68a334-beda-4d39-a981-5ae3b3bf563b"
}
}
}
{
"error": {
"type": "unauthorized",
"message": "unauthorized"
}
}
{
"exportFailure": {
"summary": "Render job failed",
"value": {
"error": {
"type": "render_failure",
"message": "failed to create job"
}
}
}
}
GET https://admin.threekit.com/api/assets/thumbnail/:assetId?cache=[cache]&wait=[wait]
Query Parameters
Name | In | Type | Required | Description |
---|---|---|---|---|
cache | query | boolean | false | Caches the file created. |
wait | query | boolean | false | It will query for the latest version of the file. If the latest version is not available, |
Detailed descriptions
wait: It will query for the latest version of the file. If the latest version is not available, it will serve an older version and queue a job for the new one. If no version is available, it will create one and send it back in the response. This parameter will only work in conjunction with the cache parameter. It has no effect if the cache parameter is not present in the request.
Response Codes
Status | Meaning | Description | Schema |
---|---|---|---|
200 | OK | Thumbnail retrieved. | None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/assets/thumbnail/:assetId \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/thumbnail/:assetId",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/assets/thumbnail/:assetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
Schemas
curl --request GET \
--url https://admin.threekit.com/api/assets/thumbnail/:assetId \
--header 'authorization: Bearer {access-token}'
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/thumbnail/:assetId",
"headers": {
"authorization": "Bearer {access-token}"
}
};
var req = http.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/assets/thumbnail/:assetId",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => array(
"authorization: Bearer {access-token}"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
importBody
{
"fileId": "string",
"orgId": "string",
"sync": true,
"settings": {
"vrSceneMode": "string",
"vrSceneTool": "string",
"importAs": "string",
"dontOverwriteAssets": true,
"updateMaterials": true,
"updateTextures": true
},
"parentFolderId": "string",
"targetId": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
fileId | string | false | none | ID of the file asset to be imported. |
orgId | string | false | none | Organization which owns the target asset. |
sync | boolean | false | none | If the request has the sync option set, it will wait for the job to finish and then return the results (jobId and job details). Otherwise it will return only the jobId. |
settings | importSettingsExample | false | none | Import settings. Unspecified attributes will use the default values. |
parentFolderId | string | false | none | Specify the ID of the folder to import the asset in. If no value is provided, the file name is used to search for an asset with the same name across the entire asset database in the org. If a match is found that asset is updated otherwise a new asset is created. |
targetId | string | false | none | Specify the asset of the ID to be updated. If an existing asset needs to be updated and the ID is known, this parameter can be used to specify the exact asset that needs to be updated. |
bulkImportBody
{
"orgId": "string",
"settings": {
"vrSceneMode": "string",
"vrSceneTool": "string",
"importAs": "string",
"dontOverwriteAssets": true,
"updateMaterials": true,
"updateTextures": true
},
"files": [
{
"fileId": "string",
"orgId": "string",
"sync": true,
"settings": {
"vrSceneMode": "string",
"vrSceneTool": "string",
"importAs": "string",
"dontOverwriteAssets": true,
"updateMaterials": true,
"updateTextures": true
},
"parentFolderId": "string",
"targetId": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
orgId | string | false | none | Organization which owns the target asset. |
settings | importSettingsExample | false | none | Import settings. Unspecified attributes will use the default values. |
files | [importBody] | false | none | none |
importSettingsExample
{
"vrSceneMode": "string",
"vrSceneTool": "string",
"importAs": "string",
"dontOverwriteAssets": true,
"updateMaterials": true,
"updateTextures": true
}
Default settings for a import request.
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
vrSceneMode | string | false | none | If importing a VRScene file, specify what it should be imported as. The available options are scene, material and model. The default value is scene. |
vrSceneTool | string | false | none | If importing a VRScene file, specify the tool used to create the file so that it is imported correctly. The available if options are maya and max. The default value is maya. |
importAs | string | false | none | Specify the type of asset to be imported. The available options are scene and model. The default value is model |
dontOverwriteAssets | boolean | false | none | In the event that an asset with the same name already exists, this option will determine whether a new asset should be created or the existing asset be updated. The default value is false |
updateMaterials | boolean | false | none | For files containing material definition, this option determines whether those should be updated or not. The default value is true |
updateTextures | boolean | false | none | For files containing texture definition, this option determines whether those should be updated or not. The default value is true |
importClaraBody
{
"claraURL": "string",
"orgId": "string",
"sync": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
claraURL | string | false | none | ID of the Clara asset to be imported. |
orgId | string | false | none | Organization which owns the target asset. |
sync | boolean | false | none | If the request has the sync option set, it will wait for the job to finish and then return the results (jobId and job details). Otherwise it will return only the jobId. |
exportBody
{
"title": "string",
"orgId": "string",
"configuration": {},
"sync": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
title | string | false | none | Filename to save the export as. |
orgId | string | false | none | Organization which owns the asset or product to export. |
configuration | object | false | none | Configuration information. Attribute keys with valid attribute option values. |
sync | boolean | false | none | If the request has the sync option set, it will wait for the job to finish and then return the results (jobId and job details). Otherwise it will return only the jobId. |
configExample
{
"caseIsVisible": true,
"liningIsVisible": true,
"attachmentStyle": "classic",
"nAttachments": 4
}
Example of a configuration object for an export request
Properties
None
renderBody
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"sync": true,
"settings": {
"output": {
"resolution": {
"width": 512,
"height": 512
}
}
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
orgId | string | false | none | Organization which owns the asset or product to render. |
configuration | object | false | none | Specify a specific configuration of the asset or product to be rendered |
stageId | string | false | none | Scene ID to be used as a stage for renders |
stageConfiguration | object | false | none | Specify a configuration of the stage, to be used for renders |
sync | boolean | false | none | If the request has the sync option set, it will wait for the job to finish and then return the results (jobId and job details). Otherwise it will return only the jobId. |
settings | renderSettingsExample | false | none | Render settings. Unspecified attributes will use the default values. |
rendersBody
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"type": "string",
"layerId": "string",
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
orgId | string | false | none | Organization which owns the item to render. |
configuration | object | false | none | Specify a configuration of the item or layer to be rendered. |
stageId | string | false | none | Stage ID to be used as a stage for renders. |
stageConfiguration | object | false | none | Specify a configuration of the stage, to be used for renders. |
type | string | false | none | Specify if the renders should use WebGL or VRay. If this parameter is not provided, the API automatically defaults to webGL renders. |
layerId | string | false | none | If specified, it will render all possible combinations of that layer. If a configuration is specified in the request, it will only render that configuration for the layer |
configurations | [object] | false | none | Can be used to render all configurations provided in the request. This parameter is an array of configuration objects. |
subset | subsetRenderParameter | false | none | Parameter to allow rendering subset of attribute values |
bulkExportBody
{
"orgId": "string",
"type": "gltf",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
orgId | string | false | none | Organization which owns the item/items to render. |
type | string | false | none | Specify the AR export format(gLTF or USDZ). This parameter is mandatory. The values this field accepts are glb and usdz |
assets | [individualAssetBody] | false | none | none |
stages | [individualAssetBody] | false | none | none |
bulkCompositesBody
{
"orgId": "string",
"type": "string",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
},
"imageMagickConvertCommands": [
"string"
],
"compositeId": "string"
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"renderedMissingLayers": true
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
orgId | string | false | none | Organization which owns the item/items to composites of. |
type | string | false | none | Specify if the renders should use WebGL or VRay. This is to applicable only if missing layers needs to be rendered |
assets | [individualCompositeAssetBody] | false | none | none |
stages | [individualAssetBody] | false | none | none |
renderedMissingLayers | boolean | false | none | Specify if missing layers need to be rendered before creating composites |
bulkRendersBody
{
"orgId": "string",
"type": "string",
"assets": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
],
"stages": [
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
orgId | string | false | none | Organization which owns the item/items to render. |
type | string | false | none | Specify if the renders should use WebGL or VRay. If this parameter is not provided, the API automatically defaults to webGL renders. |
assets | [individualAssetBody] | false | none | none |
stages | [individualAssetBody] | false | none | none |
downloadJobBody
{
"jobId": "8a16a470-eeb5-495d-81f0-b839e4fe1d46",
"orgId": "14238e51-10ad-44e1-8561-31437af5ce83",
"format": "jpeg",
"downloadType": "texture",
"assetIds": [
"c7dc4cee-4268-4861-acca-537c08986cb4",
"b7c2c442-d412-478b-8113-2aeabedf1544"
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
jobId | string | false | none | ID of the job to download the results of. This can only be an export job or a render job. |
orgId | string | false | none | ID of the org linked to the job |
format | string | false | none | Format to download the results in. This parameter is only applicable for render jobs. For export jobs the format is extracted from the job details and used to fetch the correct files. For the render jobs only two formats are supported at the moment, png and jpeg. For render jobs the default format is png. |
downloadType | string | false | none | Specify the download job type. It currently supports only two values - texture and jobResult. The default value is jobResult. |
assetIds | [string] | false | none | List of UUIDs of texture assets to download source textures of. This will only work for texture assets containing the Image operator. Textures without one, or non-texture assets, will be ignored |
Enumerated Values
Property | Value |
---|---|
downloadType | texture |
downloadType | jobResult |
individualCompositeAssetBody
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
},
"imageMagickConvertCommands": [
"string"
],
"compositeId": "string"
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
assetId | string | false | none | ID of the item or stage to create composites of |
layerId | string | false | none | If specified, it will render all possible combinations of a layer. If a configuration is specified in the request, it will only render that configuration for the layer |
configuration | object | false | none | Specify a configuration of the item, stage or layer to be rendered. |
configurations | [object] | false | none | Can be used to render all configurations provided in the request. This parameter is an array of configuration objects. |
subset | subsetRenderParameter | false | none | Parameter to allow rendering subset of attribute values |
imageMagickConvertCommands | [string] | false | none | Specify imageMagick commands that should run after the composite is created. This allows users to customize the composite results. |
compositeId | string | false | none | Provide a specific composite asset that should be used to create composites. If none are provided and the asset has a composite asset attached to it, that composite is used by default. |
individualAssetBody
{
"assetId": "string",
"layerId": "string",
"configuration": {},
"configurations": [
{}
],
"subset": {
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
assetId | string | false | none | ID of the item or stage to be rendered |
layerId | string | false | none | If specified, it will render all possible combinations of a layer. If a configuration is specified in the request, it will only render that configuration for the layer |
configuration | object | false | none | Specify a configuration of the item, stage or layer to be rendered. |
configurations | [object] | false | none | Can be used to render all configurations provided in the request. This parameter is an array of configuration objects. |
subset | subsetRenderParameter | false | none | Parameter to allow rendering subset of attribute values |
compositeBody
{
"orgId": "string",
"configuration": {},
"stageId": "string",
"stageConfiguration": {},
"sync": true,
"settings": {
"inputHeight": 0,
"inputWidth": 0,
"height": 0,
"width": 0,
"format": "string"
},
"imageMagickConvertCommands": [
{
"height": 0,
"width": 0,
"format": "string",
"command": "string",
"filename": "string"
}
]
}
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
orgId | string | false | none | Organization which owns the asset or product to create the composite image of. |
configuration | object | false | none | Specify a configuration of the asset or item to create the composite image of. |
stageId | string | false | none | Use layers for composite, created with a specific stage ID. |
stageConfiguration | object | false | none | Use layers for composite, created with a specific stage configuration. |
sync | boolean | false | none | If the request has the sync option set, it will wait for the job to finish and then return the results (jobId and job details). Otherwise it will return only the jobId. |
settings | object | false | none | Specify the resolution of the composite to be created. |
» inputHeight | number | false | none | Specify height of layer image to be used for scaling. This parameter is needed only when an image needs to be scaled. |
» inputWidth | number | false | none | Specify width of layer image to be used for scaling. This parameter is needed only when an image needs to be scaled. |
» height | number | false | none | Specify height of the output image. If inputHeight is also present in the request, this parameter will scale the height of the layer image. Otherwise it will use the layer image as is. Default value is 1000. |
» width | number | false | none | Specify width of the output image. If inputWidth is also present in the request, this parameter will scale the height of the layer image. Otherwise it will use the layer image as is. Default value is 1000. |
» format | string | false | none | Specify format of the result file. default to png |
imageMagickConvertCommands | [object] | false | none | generate additioanl post process images from the composite results. |
» height | number | false | none | Specify height of the result image |
» width | number | false | none | Specify width of the result image. |
» format | string | false | none | Specify format of the result file |
» command | string | false | none | Imagemagick command to generate post process images. |
» filename | string | false | none | Specify result file name. |
renderSettingsExample
{
"output": {
"resolution": {
"width": 512,
"height": 512
}
}
}
Default settings for a render request.
Properties
None
subsetRenderParameter
{
"attributes": {
"exampleNonTagPartRefName": {
"filterMode": "include",
"values": [
"9449ccb1-d6bc-4abc-9cd7-cfa4326b070c",
"43f78351-1800-403d-a208-ff7a33cc2d43"
]
},
"exampleTagPartRefName": {
"filterMode": "exclude",
"values": [
"#exampleTag1",
"#exampleTag2"
]
},
"exampleStringAttName": {
"filterMode": "include",
"values": [
"exampleValue1",
"exampleValue2"
]
}
},
"layers": {
"filterMode": "exclude",
"values": [
"74763dc2-728b-4c04-868d-8ef7c56341c5"
]
},
"uniqAttrs": "all"
}
Structure of subset parameter
Properties
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
attributes | object | false | none | none |
» attributeName | object | false | none | This will be the name of the attribute to to fetch the the subset of values of. For bulk rendering, this parameter is only applicable for attributes which share the same name and list of values across items |
»» filterMode | string | false | none | This is the subset mode to be applied. It can only have two values "include" or "exclude". "include" will ensure that the only the values specified in the parameter will be used for renders. "exclude" will ensure that the values specified in the paramter will be excluded from the renders. The default value is "include" |
»» values | [string] | false | none | Array of values to be filtered. For a Part Reference attribute(non-tags) this will be an array of UUIDs. For part reference with tags this will be an array of tags with each tag of the the format "# |
layers | object | false | none | none |
» filterMode | string | false | none | This is the subset mode to be applied. It can only have two values "include" or "exclude". "include" will ensure that the only the values specified in the parameter will be used for renders. "exclude" will ensure that the values specified in the paramter will be excluded from the renders. The default value is "include". NOTE - This is only applicable if an item has a composite node attached to it. |
» values | [string] | false | none | Array of values to be filtered. This will be an array of UUIDs, each UUID corresponding to the layer node present in the composite node of an item. |
uniqAttrs | string | false | none | Parameter to define behaviour for unique (non-shared) attributes when running renders for multiple items. It only accepts two values - "all" and "default". "all" will render all possible values of the attribute and "default" will only render the defautl value of the attribute. NOTE - This is only applicable on bulk rendering |