GET https://admin.threekit.com/api/assets
Retrieves list of assets. The list will contain all assets associated with the provided organization ID, and any query parameters if present.
- count - Total number of assets in the list
- perPage - Number of assets returned per page
- page - Page number
- sort - The field and direction sorted by
- assets - The assets contained in this list
REST Endpoint
GET https://admin.threekit.com/api/assets?bearer_token=[bearer_token]&orgId=[orgId]&name=[name]&publicShare=[publicShare]&nameLike=[nameLike]&type=[type]&importedFileId=[importedFileId]&branch=[branch]&tags=[tags]&keywords=[keywords]&metadata=[metadata]&proxyId=[proxyId]&page=[page]&perPage=[perPage]&sort=[sort]
Query Parameters
Name |
In |
Type |
Required |
Description |
bearer_token |
query |
string |
false |
Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId |
query |
string |
true |
Organization ID. |
name |
query |
string |
false |
Name of an asset |
publicShare |
query |
boolean |
false |
Only include assets set to be public |
nameLike |
query |
string |
false |
A string which is included in the asset name |
type |
query |
string |
false |
Asset type |
importedFileId |
query |
string |
false |
ID of the imported file |
branch |
query |
string |
false |
Branch of the asset. |
tags |
query |
string |
false |
Tags of the asset. |
keywords |
query |
string |
false |
Keywords of the asset |
metadata |
query |
string |
false |
Metadata of the asset. Must be passed in as a stringified JSON. |
proxyId |
query |
string |
false |
Proxy ID of an asset |
page |
query |
number |
false |
Page to return, defaults to 1 |
perPage |
query |
number |
false |
Total number of entries per page, defaults to 30 and can only go up to 100 |
sort |
query |
string |
false |
The direction and value to sort by, defaults to createdAt ascending (denoted +createdAt) |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful get request, response body will include the list of assets |
None |
400 |
Bad Request |
User did not pass orgId as query parameter. |
None |
401 |
Unauthorized |
User is not authenticated. They must be authenticated to use this service. |
None |
403 |
Forbidden |
No token was provided in the query string of the request |
None |
422 |
Unprocessable Entity |
User pass the invalid query fields |
None |
Example Implementations
Code
CURL
curl --request GET \
--url 'https://admin.threekit.com/api/assets?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2' \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
"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?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
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;
}
Example responses
{
"page": 1,
"perPage": 50,
"count": 256,
"sort": "-createdAt",
"assets": [
{
"id": "f730da7b-f3e0-45a5-9d95-ec13824d701a",
"name": "Example Name",
"type": "ExampleType",
"as": null,
"createdAt": "Created Time",
"updatedAt": "Updated Time",
"deletedAt": "Deleted Time",
"createdBy": "acb6888b-eee0-40f1-8090-4583a4ef085a",
"orgId": "1f461a49-70c0-45ac-94d9-069d2de8c330",
"branch": "Example Branch",
"description": "Example Description",
"metadata": {},
"tags": [
"tagA",
"tagB"
],
"keywords": [
"Keywords1",
"Keywords2"
],
"publicShare": true,
"importedFileId": "ef266368-0bdd-4371-acee-ea154fc973bf",
"proxyId": "550613a1-a315-438e-97ce-dce549464ec5"
},
{
"id": "4b91eb23-1369-4769-927b-f1a2d3343f44",
"name": "Example Name",
"type": "ExampleType",
"as": null,
"createdAt": "Created Time",
"updatedAt": "Updated Time",
"deletedAt": "Deleted Time",
"createdBy": "fbe4d6de-9270-4d58-acbd-cd75d3380e5e",
"orgId": "1f461a49-70c0-45ac-94d9-069d2de8c330",
"branch": "Example Branch",
"description": "Example Description",
"metadata": {},
"tags": [
"tagA",
"tagB"
],
"keywords": [
"Keywords1",
"Keywords2"
],
"publicShare": false,
"importedFileId": "a231639a-ef14-40af-9d86-0e2d87800437",
"proxyId": "c3ded1be-9dc3-43c9-a0b8-594bee6930dd"
}
]
}
{
"error": {
"code": "orgid_required",
"message": "orgId is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "invalid_query_fields",
"message": "One or more query parameters are invalid"
}
}
GET https://admin.threekit.com/api/assets/{assetId}
Retrieves an asset by ID and organization ID. The asset will have the following information available.
- id - Asset ID
- name - Asset name
- type - Asset type
- createdAt - Time when the asset was created
- updatedAt - Time when the asset was last updated
- deletedAt - Time when the asset was deleted
- createdBy - ID of the user who created the asset
- orgId - Organization ID
- branch - Asset branch
- description - Asset description
- metadata - Asset metadata
- tags - Asset tags
- keywords - Asset keywords
- publicShare - Whether the asset is public or not
- importedFileId - Asset imported file ID if applicable
- proxyId - Asset proxy ID if applicable
- parentFolderId - ID of the folder asset is nested in
- publishedAt - Time when asset was published
- defaultStageId - ID of the stage attached to asset
- defaultCompositeId - ID of the asset composite
- deletedBy - ID of user who deleted asset, if applicable
- nodetags - Tags specified on nodes of the asset
REST Endpoint
GET https://admin.threekit.com/api/assets/{assetId}?bearer_token=[bearer_token]&orgId=[orgId]
Query Parameters
Name |
In |
Type |
Required |
Description |
assetId |
path |
string |
true |
ID of the asset to be retrieved. |
bearer_token |
query |
string |
false |
Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId |
query |
string |
true |
Organization ID. |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns a asset's information |
None |
400 |
Bad Request |
User did not pass orgId as query parameter. |
None |
401 |
Unauthorized |
User is not authenticated. They must be authenticated to use this service. |
None |
403 |
Forbidden |
No token was provided in the query string of the request |
None |
404 |
Not Found |
No asset was found for the given ID |
None |
Example Implementations
Code
CURL
curl --request GET \
--url 'https://admin.threekit.com/api/assets/string?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2' \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/string?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
"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/string?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
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;
}
Example responses
{
"id": "4b91eb23-1369-4769-927b-f1a2d3343f44",
"name": "Example Name",
"type": "ExampleType",
"as": null,
"createdAt": "Created Time",
"updatedAt": "Updated Time",
"deletedAt": "Deleted Time",
"createdBy": "fbe4d6de-9270-4d58-acbd-cd75d3380e5e",
"orgId": "1f461a49-70c0-45ac-94d9-069d2de8c330",
"branch": "Example Branch",
"description": "Example Description",
"metadata": {},
"tags": [
"tagA",
"tagB"
],
"keywords": [
"Keywords1",
"Keywords2"
],
"publicShare": false,
"importedFileId": "a231639a-ef14-40af-9d86-0e2d87800437",
"proxyId": "c3ded1be-9dc3-43c9-a0b8-594bee6930dd",
"parentFolderId": "2def7fb1-df40-4919-81b4-a268c3466529",
"publishedAt": "Published Date",
"defaultStageId": "287751bd-4457-4f1f-bbd5-00190f394a47",
"defaultCompositeId": "b36e2194-4636-44af-99da-984808b5f000",
"deletedBy": "05393a7b-17be-48e3-8817-b14357c6d15e",
"nodetags": [
"tag1"
]
}
{
"error": {
"code": "orgid_required",
"message": "orgId is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "asset_not_found",
"message": "Asset not found"
}
}
PUT https://admin.threekit.com/api/assets/{assetId}
Updates an asset by ID and organization ID. The returned asset will have the following information available.
- id - Asset ID
- name - Asset name
- type - Asset type
- createdAt - Time when the asset was created
- updatedAt - Time when the asset was last updated
- deletedAt - Time when the asset was deleted
- createdBy - ID of the user who created the asset
- orgId - Organization ID
- branch - Asset branch
- description - Asset description
- metadata - Asset metadata
- tags - Asset tags
- keywords - Asset keywords
- publicShare - Whether the asset is public or not
- importedFileId - Asset imported file ID if applicable
- proxyId - Asset proxy ID if applicable
- parentFolderId - ID of the folder asset is nested in
- publishedAt - Time when asset was published
- defaultStageId - ID of the stage attached to asset
- defaultCompositeId - ID of the asset composite
- deletedBy - ID of user who deleted asset, if applicable
- nodetags - Tags specified on nodes of the asset
REST Endpoint
PUT https://admin.threekit.com/api/assets/{assetId}?bearer_token=[bearer_token]&orgId=[orgId]
Query Parameters
Name |
In |
Type |
Required |
Description |
id |
path |
string |
true |
ID of the asset to be retrieved. |
bearer_token |
query |
string |
false |
Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId |
query |
string |
true |
Organization ID. |
body |
body |
updateBody |
true |
Asset update information. |
Body Parameters
{
"name": "string",
"description": "string",
"tags": "string",
"keywords": "string",
"branch": "string",
"publicShare": true,
"proxyId": "string",
"importedFileId": "string",
"parentFolderId": "string",
"publishedAt": "string",
"defaultStageId": "string",
"defaultCompositeId": "string"
}
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns a asset's information |
None |
400 |
Bad Request |
User did not pass orgId as query parameter. |
None |
401 |
Unauthorized |
User is not authenticated. They must be authenticated to use this service. |
None |
403 |
Forbidden |
No token was provided in the query string of the request |
None |
404 |
Not Found |
No asset was found for the given ID |
None |
422 |
Unprocessable Entity |
The request body was missing required fields or contained invalid fields. |
None |
Example Implementations
Code
CURL
curl --request PUT \
--url 'https://admin.threekit.com/api/assets/?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2' \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"name":"string","description":"string","tags":"string","keywords":"string","branch":"string","publicShare":true,"proxyId":"string","importedFileId":"string","parentFolderId":"string","publishedAt":"string","defaultStageId":"string","defaultCompositeId":"string"}'
Node.JS
var http = require("https");
var options = {
"method": "PUT",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
"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({
name: 'string',
description: 'string',
tags: 'string',
keywords: 'string',
branch: 'string',
publicShare: true,
proxyId: 'string',
importedFileId: 'string',
parentFolderId: 'string',
publishedAt: 'string',
defaultStageId: 'string',
defaultCompositeId: 'string'
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/assets/?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\"name\":\"string\",\"description\":\"string\",\"tags\":\"string\",\"keywords\":\"string\",\"branch\":\"string\",\"publicShare\":true,\"proxyId\":\"string\",\"importedFileId\":\"string\",\"parentFolderId\":\"string\",\"publishedAt\":\"string\",\"defaultStageId\":\"string\",\"defaultCompositeId\":\"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
{
"id": "4b91eb23-1369-4769-927b-f1a2d3343f44",
"name": "Example Name",
"type": "ExampleType",
"as": null,
"createdAt": "Created Time",
"updatedAt": "Updated Time",
"deletedAt": "Deleted Time",
"createdBy": "fbe4d6de-9270-4d58-acbd-cd75d3380e5e",
"orgId": "1f461a49-70c0-45ac-94d9-069d2de8c330",
"branch": "Example Branch",
"description": "Example Description",
"metadata": {},
"tags": [
"tagA",
"tagB"
],
"keywords": [
"Keywords1",
"Keywords2"
],
"publicShare": false,
"importedFileId": "a231639a-ef14-40af-9d86-0e2d87800437",
"proxyId": "c3ded1be-9dc3-43c9-a0b8-594bee6930dd",
"parentFolderId": "2def7fb1-df40-4919-81b4-a268c3466529",
"publishedAt": "Published Date",
"defaultStageId": "287751bd-4457-4f1f-bbd5-00190f394a47",
"defaultCompositeId": "b36e2194-4636-44af-99da-984808b5f000",
"deletedBy": "05393a7b-17be-48e3-8817-b14357c6d15e",
"nodetags": [
"tag1"
]
}
{
"error": {
"code": "orgid_required",
"message": "orgId is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "asset_not_found",
"message": "Asset not found"
}
}
{
"error": {
"code": "update_asset_error",
"message": "Cannot update asset"
}
}
DELETE https://admin.threekit.com/api/assets/{assetId}
Deletes an asset by ID and organization ID.
REST Endpoint
DELETE https://admin.threekit.com/api/assets/{assetId}?bearer_token=[bearer_token]&orgId=[orgId]
Query Parameters
Name |
In |
Type |
Required |
Description |
id |
path |
string |
true |
ID of the asset to be deleted. |
bearer_token |
query |
string |
false |
Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId |
query |
string |
true |
Organization ID. |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successfully delete the asset |
None |
400 |
Bad Request |
User did not pass orgId as query parameter. |
None |
401 |
Unauthorized |
User is not authenticated. They must be authenticated to use this service. |
None |
403 |
Forbidden |
No token was provided in the query string of the request |
None |
Example Implementations
Code
CURL
curl --request DELETE \
--url 'https://admin.threekit.com/api/assets/?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2' \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "DELETE",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
"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/?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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;
}
Example responses
{
"message": "ok"
}
{
"error": {
"code": "orgid_required",
"message": "orgId is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
Retrieves assets tags by organization ID and query parameters. The response body will contain an array of tags associated with the organization ID and any query parameters if present
GET https://admin.threekit.com/api/assets/tags?bearer_token=[bearer_token]&orgId=[orgId]&name=[name]&publicShare=[publicShare]&nameLike=[nameLike]&type=[type]&importedFileId=[importedFileId]&branch=[branch]&keywords=[keywords]&metadata=[metadata]&proxyId=[proxyId]&parentFolderId=[parentFolderId]
Name |
In |
Type |
Required |
Description |
bearer_token |
query |
string |
false |
Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId |
query |
string |
true |
Organization ID. |
name |
query |
string |
false |
Name of an asset |
publicShare |
query |
boolean |
false |
Only include assets set to be public |
nameLike |
query |
string |
false |
A string which is included in the asset name |
type |
query |
string |
false |
Asset type |
importedFileId |
query |
string |
false |
ID of the imported file |
branch |
query |
string |
false |
Branch of the asset. |
keywords |
query |
string |
false |
Keywords of the asset |
metadata |
query |
string |
false |
Metadata of the asset. Must be passed in as a stringified JSON. |
proxyId |
query |
string |
false |
Proxy ID of an asset |
parentFolderId |
query |
string |
false |
Parent Folder ID of an asset |
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns tags information |
None |
400 |
Bad Request |
User did not pass orgId as query parameter. |
None |
401 |
Unauthorized |
User is not authenticated. They must be authenticated to use this service. |
None |
403 |
Forbidden |
No token was provided in the query string of the request |
None |
Example Implementations
Code
CURL
curl --request GET \
--url 'https://admin.threekit.com/api/assets/tags?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2' \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/tags?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
"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/tags?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
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;
}
Example responses
{
"tags": [
"tagA",
"tagB",
"tagC"
]
}
{
"error": {
"code": "orgid_required",
"message": "orgId is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
GET https://admin.threekit.com/api/assets/keywords
Retrieves assets keywords by organization ID and query parameters. The response body will contain an array of keywords associated with the organization ID and any query parameters if present
REST Endpoint
GET https://admin.threekit.com/api/assets/keywords?bearer_token=[bearer_token]&orgId=[orgId]&name=[name]&publicShare=[publicShare]&nameLike=[nameLike]&type=[type]&importedFileId=[importedFileId]&branch=[branch]&tags=[tags]&metadata=[metadata]&proxyId=[proxyId]&parentFolderId=[parentFolderId]
Query Parameters
Name |
In |
Type |
Required |
Description |
bearer_token |
query |
string |
false |
Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId |
query |
string |
true |
Organization ID. |
name |
query |
string |
false |
Name of an asset |
publicShare |
query |
boolean |
false |
Only include assets set to be public |
nameLike |
query |
string |
false |
A string which is included in the asset name |
type |
query |
string |
false |
Asset type |
importedFileId |
query |
string |
false |
ID of the imported file |
branch |
query |
string |
false |
Branch of the asset. |
tags |
query |
string |
false |
Tags of the asset. |
metadata |
query |
string |
false |
Metadata of the asset. Must be passed in as a stringified JSON. |
proxyId |
query |
string |
false |
Proxy ID of an asset |
parentFolderId |
query |
string |
false |
Parent Folder ID of an asset |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns keywords information |
None |
400 |
Bad Request |
User did not pass orgId as query parameter. |
None |
401 |
Unauthorized |
User is not authenticated. They must be authenticated to use this service. |
None |
403 |
Forbidden |
No token was provided in the query string of the request |
None |
Example Implementations
Code
CURL
curl --request GET \
--url 'https://admin.threekit.com/api/assets/keywords?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2' \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/keywords?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
"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/keywords?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
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;
}
Example responses
{
"keywords": [
"keyword1",
"keyword2",
"keyword3"
]
}
{
"error": {
"code": "orgid_required",
"message": "orgId is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
POST https://admin.threekit.com/api/assets/{assetId}/clone
Creates a new asset as a copy of an existing asset.
REST Endpoint
POST https://admin.threekit.com/api/assets/{assetId}/clone?bearer_token=[bearer_token]&orgId=[orgId]
Query Parameters
Name |
In |
Type |
Required |
Description |
assetId |
path |
string |
true |
ID of the asset to be cloned. |
bearer_token |
query |
string |
false |
Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId |
query |
string |
true |
Organization ID. |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful post request, response body will include the clone asset details. |
None |
400 |
Bad Request |
User did not pass orgId as query parameter. |
None |
401 |
Unauthorized |
User is not authenticated. They must be authenticated to use this service. |
None |
403 |
Forbidden |
No token was provided in the query string of the request |
None |
404 |
Not Found |
No asset was found for the given ID |
None |
Example Implementations
Code
CURL
curl --request POST \
--url 'https://admin.threekit.com/api/assets/string/clone?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2' \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/string/clone?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
"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/string/clone?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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;
}
Example responses
{
"id": "4b91eb23-1369-4769-927b-f1a2d3343f44",
"name": "Example Name",
"type": "ExampleType",
"as": null,
"createdAt": "Created Time",
"updatedAt": "Updated Time",
"deletedAt": "Deleted Time",
"createdBy": "fbe4d6de-9270-4d58-acbd-cd75d3380e5e",
"orgId": "1f461a49-70c0-45ac-94d9-069d2de8c330",
"branch": "Example Branch",
"description": "Example Description",
"metadata": {},
"tags": [
"tagA",
"tagB"
],
"keywords": [
"Keywords1",
"Keywords2"
],
"publicShare": false,
"importedFileId": "a231639a-ef14-40af-9d86-0e2d87800437",
"proxyId": "c3ded1be-9dc3-43c9-a0b8-594bee6930dd",
"parentFolderId": "2def7fb1-df40-4919-81b4-a268c3466529",
"publishedAt": "Published Date",
"defaultStageId": "287751bd-4457-4f1f-bbd5-00190f394a47",
"defaultCompositeId": "b36e2194-4636-44af-99da-984808b5f000",
"deletedBy": "05393a7b-17be-48e3-8817-b14357c6d15e",
"nodetags": [
"tag1"
]
}
{
"error": {
"code": "orgid_required",
"message": "orgId is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Unauthorized"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "asset_not_found",
"message": "Asset not found"
}
}
POST https://admin.threekit.com/api/assets/{assetId}/restore
Restores a deleted asset.
REST Endpoint
POST https://admin.threekit.com/api/assets/{assetId}/restore?bearer_token=[bearer_token]&orgId=[orgId]
Query Parameters
Name |
In |
Type |
Required |
Description |
assetId |
path |
string |
true |
ID of the asset to be restored. |
bearer_token |
query |
string |
false |
Public access token used to authorize the request. Requests may only come from the token's allowed domains. This parameter is mandatory when making requests from a browser. Outside of the browser instead supply a bearer header using a private access token. |
orgId |
query |
string |
true |
Organization ID. |
body |
body |
updateBody |
false |
Asset restore information. |
Body Parameters
{
"name": "string",
"description": "string",
"tags": "string",
"keywords": "string",
"branch": "string",
"publicShare": true,
"proxyId": "string",
"importedFileId": "string",
"parentFolderId": "string",
"publishedAt": "string",
"defaultStageId": "string",
"defaultCompositeId": "string"
}
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful post request, response body will include the restored asset details. |
None |
422 |
Unprocessable Entity |
Cannot restore an active asset. |
None |
Example Implementations
Code
CURL
curl --request POST \
--url 'https://admin.threekit.com/api/assets/string/restore?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2' \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"name":"string","description":"string","tags":"string","keywords":"string","branch":"string","publicShare":true,"proxyId":"string","importedFileId":"string","parentFolderId":"string","publishedAt":"string","defaultStageId":"string","defaultCompositeId":"string"}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/assets/string/restore?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
"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({
name: 'string',
description: 'string',
tags: 'string',
keywords: 'string',
branch: 'string',
publicShare: true,
proxyId: 'string',
importedFileId: 'string',
parentFolderId: 'string',
publishedAt: 'string',
defaultStageId: 'string',
defaultCompositeId: 'string'
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/assets/string/restore?orgId=d92e91dc-6668-4730-86f2-f3e9000b58a2",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"name\":\"string\",\"description\":\"string\",\"tags\":\"string\",\"keywords\":\"string\",\"branch\":\"string\",\"publicShare\":true,\"proxyId\":\"string\",\"importedFileId\":\"string\",\"parentFolderId\":\"string\",\"publishedAt\":\"string\",\"defaultStageId\":\"string\",\"defaultCompositeId\":\"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
{
"id": "4b91eb23-1369-4769-927b-f1a2d3343f44",
"name": "Example Name",
"type": "ExampleType",
"as": null,
"createdAt": "Created Time",
"updatedAt": "Updated Time",
"deletedAt": "Deleted Time",
"createdBy": "fbe4d6de-9270-4d58-acbd-cd75d3380e5e",
"orgId": "1f461a49-70c0-45ac-94d9-069d2de8c330",
"branch": "Example Branch",
"description": "Example Description",
"metadata": {},
"tags": [
"tagA",
"tagB"
],
"keywords": [
"Keywords1",
"Keywords2"
],
"publicShare": false,
"importedFileId": "a231639a-ef14-40af-9d86-0e2d87800437",
"proxyId": "c3ded1be-9dc3-43c9-a0b8-594bee6930dd",
"parentFolderId": "2def7fb1-df40-4919-81b4-a268c3466529",
"publishedAt": "Published Date",
"defaultStageId": null,
"defaultCompositeId": null,
"deletedBy": null,
"nodetags": []
}
{
"error": {
"code": "restore_asset_error",
"message": "Cannot restore active asset"
}
}
Schemas
createBody
{
"name": "string",
"type": "string",
"orgId": "string",
"createdBy": "string",
"id": "string",
"description": "string",
"tags": "string",
"metadata": {},
"keywords": "string",
"branch": "string",
"publicShare": true,
"proxyId": "string",
"importedFileId": "string"
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
name |
string |
false |
none |
Asset name. |
type |
string |
false |
none |
Asset type. |
orgId |
string |
false |
none |
Organization which owns the asset. |
createdBy |
string |
false |
none |
ID of the user who created the asset. |
id |
string |
false |
none |
Asset ID |
description |
string |
false |
none |
Asset description |
tags |
string |
false |
none |
Asset tags |
metadata |
object |
false |
none |
Asset metadata |
keywords |
string |
false |
none |
Asset keywords |
branch |
string |
false |
none |
Asset branch |
publicShare |
boolean |
false |
none |
Whether share the asset to public or not |
proxyId |
string |
false |
none |
Asset proxy ID. |
importedFileId |
string |
false |
none |
Asset associated imported file ID |
updateBody
{
"name": "string",
"description": "string",
"tags": "string",
"keywords": "string",
"branch": "string",
"publicShare": true,
"proxyId": "string",
"importedFileId": "string",
"parentFolderId": "string",
"publishedAt": "string",
"defaultStageId": "string",
"defaultCompositeId": "string"
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
name |
string |
false |
none |
Asset name. |
description |
string |
false |
none |
Asset description |
tags |
string |
false |
none |
Asset tags |
keywords |
string |
false |
none |
Asset keywords |
branch |
string |
false |
none |
Asset branch |
publicShare |
boolean |
false |
none |
Whether share the asset to public or not |
proxyId |
string |
false |
none |
Asset proxy ID. |
importedFileId |
string |
false |
none |
Asset associated imported file ID |
parentFolderId |
string |
false |
none |
ID of the folder to move asset to. Root folder values are- 1. Catalog items and Stages - 'catalog' 2. Assets and Global Attributes - 'assets' |
publishedAt |
string |
false |
none |
Time when asset was published |
defaultStageId |
string |
false |
none |
ID of the asset stage |
defaultCompositeId |
string |
false |
none |
ID of the asset composite |