GET https://admin.threekit.com/api/jobs
Retrieves the list of jobs from the token's organization, optionally filtered by status. For each entry the following information will be available.
- id - Job ID
- createdBy - ID of the user who created the job
- title - Job title
- orgId - Organization ID
- schedulerState - User-desired job state
- type - Job type
- createdAt - Time when the job was created
- updatedAt - Time when the job was last updated
- parameters - The metadata related to the job
- taskStatusPending - Number of pending tasks
- taskStatusRunning - Number of running tasks
- taskStatusStopped - Number of stopped tasks
- taskProgress - Overall progress of tasks
- taskResultFailures - Number of stopped tasks that failed
- taskResultSuccesses - Number of stopped tasks that succeeded
- taskCount - Number of tasks
- priority - Priority of the job
- status - Status of the job
REST Endpoint
GET https://admin.threekit.com/api/jobs?orgId=[orgId]&status=[status]&perPage=[perPage]&page=[page]&sort=[sort]
Query Parameters
Name |
In |
Type |
Required |
Description |
orgId |
query |
string |
false |
Organization ID |
status |
query |
string |
false |
Status of a job |
perPage |
query |
number |
false |
Total number of entries per page, defaults to 30 and can only go up to 100 |
page |
query |
number |
false |
Page to return, defaults to 1 |
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 jobs |
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/jobs \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs",
"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/jobs",
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
{
"jobs": [
{
"createdAt": "2020-03-18T21:29:15.899Z",
"createdBy": "a40657fe-39ce-4121-8a1d-3bd50a2411e4",
"id": "2ffab20d-fe6c-413a-ad16-40ba29074a3f",
"orgId": "fac36695-7a74-4c55-b9f2-344306f664f1",
"parameters": {},
"priority": 0,
"schedulerState": "active",
"status": "stopped",
"taskCount": 1,
"taskProgress": 1,
"taskResultFailures": 0,
"taskResultSuccesses": 1,
"taskStatusPending": 0,
"taskStatusRunning": 0,
"taskStatusStopped": 1,
"title": "render-webgl",
"type": "render-webgl",
"updatedAt": "2020-03-18T21:29:27.372Z"
},
{
"createdAt": "2019-12-17T19:20:57.429Z",
"createdBy": "8b40fe95-5ccc-451a-81ad-21ee263ddd22",
"id": "e2d46fc7-9637-4cb2-bb57-b811d9f8ff3f",
"orgId": "fac36695-7a74-4c55-b9f2-344306f664f1",
"parameters": {},
"priority": 0,
"schedulerState": "active",
"status": "running",
"taskCount": 1,
"taskProgress": 0.25,
"taskResultFailures": 0,
"taskResultSuccesses": 0,
"taskStatusPending": 0,
"taskStatusRunning": 1,
"taskStatusStopped": 0,
"title": "render-webgl",
"type": "render-webgl",
"updatedAt": "2019-12-17T20:21:36.791Z"
}
]
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
POST https://admin.threekit.com/api/jobs
Creates a job which sends a POST request. The sent request body will include the job's ID and any relevant information.
REST Endpoint
POST https://admin.threekit.com/api/jobs
Query Parameters
Name |
In |
Type |
Required |
Description |
body |
body |
createJobBody |
true |
Job creation information. |
Body Parameters
{
"createdBy": "string",
"title": "string",
"type": "string",
"orgId": "string",
"id": "string",
"schedulerState": "string"
}
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful POST request, response body will include the created job details. |
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 |
The request body was missing required fields or contained invalid fields. |
None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/jobs \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"createdBy":"string","title":"string","type":"string","orgId":"string","id":"string","schedulerState":"string"}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs",
"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({
createdBy: 'string',
title: 'string',
type: 'string',
orgId: 'string',
id: 'string',
schedulerState: 'string'
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"createdBy\":\"string\",\"title\":\"string\",\"type\":\"string\",\"orgId\":\"string\",\"id\":\"string\",\"schedulerState\":\"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
[
{
"createdAt": "2020-01-23T16:00:45.326Z",
"createdBy": "e2be8921-b74d-4547-8837-a5b8db7e4a8c",
"id": "34fcbf13-e653-466a-bfdd-7a9b6179c146",
"orgId": "dfc84db7-e6b5-4877-845e-1885be111fe3",
"parameters": {},
"priority": 0,
"schedulerState": "active",
"status": "stopped",
"taskCount": 2,
"taskProgress": 1,
"taskResultFailures": 0,
"taskResultSuccesses": 1,
"taskStatusPending": 0,
"taskStatusRunning": 0,
"taskStatusStopped": 1,
"title": "render-webgl",
"type": "render-webgl",
"updatedAt": "2020-01-23T16:01:18.372Z"
}
]
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "create_job_error",
"message": "Create job error"
}
}
GET https://admin.threekit.com/api/jobs/{jobId}
Retrieves a job. The job will have the following information available.
- id - Job ID
- createdBy - ID of the user who created the job
- title - Job title
- orgId - Organization ID
- schedulerState - User-desired job state
- type - Job type
- createdAt - Time when the job was created
- updatedAt - Time when the job was last updated
- parameters - The metadata related to the job
- taskStatusPending - Number of pending tasks
- taskStatusRunning - Number of running tasks
- taskStatusStopped - Number of stopped tasks
- taskProgress - Overall progress of tasks
- taskResultFailures - Number of stopped tasks that failed
- taskResultSuccesses - Number of stopped tasks that succeeded
- taskCount - Number of tasks
- priority - Priority of the job
- status - Status of the job
REST Endpoint
GET https://admin.threekit.com/api/jobs/{jobId}
Query Parameters
Name |
In |
Type |
Required |
Description |
jobId |
path |
string |
true |
ID of the job to be retrieved. |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns a job's information |
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 job was found for the given ID |
None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/jobs/string \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/string",
"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/jobs/string",
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
[
{
"createdAt": "2019-12-17T19:20:57.429Z",
"createdBy": "5b3bf5f9-09c6-4796-a799-368c7909a518",
"id": "25a83e94-afb6-4d2d-a70a-78bc43ea078d",
"orgId": "5960dc50-3c36-48e2-aa3f-dec71a586c5a",
"parameters": {},
"priority": 0,
"schedulerState": "active",
"status": "running",
"taskCount": 1,
"taskProgress": 0.75,
"taskResultFailures": 0,
"taskResultSuccesses": 0,
"taskStatusPending": 0,
"taskStatusRunning": 1,
"taskStatusStopped": 0,
"title": "Example Title",
"type": "Example Type",
"updatedAt": "2019-12-17T20:21:36.791Z"
}
]
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "job_not_found",
"message": "Job not found"
}
}
PUT https://admin.threekit.com/api/jobs/{jobId}
Modifies metadata of a job
REST Endpoint
PUT https://admin.threekit.com/api/jobs/{jobId}
Query Parameters
Name |
In |
Type |
Required |
Description |
jobId |
path |
string |
true |
ID of the job to be modified. |
body |
body |
updateJobBody |
true |
Job update information. |
Body Parameters
{
"parameters": {}
}
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns the modified job's information |
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 job was found for the given ID |
None |
Example Implementations
Code
CURL
curl --request PUT \
--url https://admin.threekit.com/api/jobs/string \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"parameters":{}}'
Node.JS
var http = require("https");
var options = {
"method": "PUT",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/string",
"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({ parameters: {} }));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/jobs/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\"parameters\":{}}",
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
[
{
"createdAt": "2019-12-17T19:20:57.429Z",
"createdBy": "f68986c5-6e9e-495f-8ddd-a517b4c51644",
"id": "4bd52287-0f1a-4617-8f0e-dc6b8949edd9",
"orgId": "fff2e02f-acd5-42df-b194-856bc1d7c4ea",
"parameters": {},
"priority": 0,
"schedulerState": "active",
"status": "running",
"taskCount": 1,
"taskProgress": 0.25,
"taskResultFailures": 0,
"taskResultSuccesses": 0,
"taskStatusPending": 0,
"taskStatusRunning": 1,
"taskStatusStopped": 0,
"title": "Example Title",
"type": "exampleType",
"updatedAt": "2019-12-17T20:21:36.791Z"
}
]
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "job_not_found",
"message": "Job not found"
}
}
GET https://admin.threekit.com/api/jobs/tasks
Retrieves the list of tasks, optionally filtered by associated job ID, run status, and organization ID. For each entry the following information will be available.
- id - Task ID
- createdBy - ID of the user who created the task
- title - Task title
- orgId - Organization ID
- type - Task type
- jobId - ID of the associated job
- createdAt - Time when the job was created
- updatedAt - Time when the job was last updated
- parameters - The metadata related to the task
- runStatus - Status of the most recent run
- runResult - Result of the most recent run
- runProgress - Progress of the most recent run
- reportProgress - Whether to report progress or not
REST Endpoint
GET https://admin.threekit.com/api/jobs/tasks?orgId=[orgId]&jobId=[jobId]&runStatus=[runStatus]
Query Parameters
Name |
In |
Type |
Required |
Description |
orgId |
query |
string |
false |
Organization ID |
jobId |
query |
string |
false |
ID of a job |
runStatus |
query |
string |
false |
Status of the most recent run |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful get request, response body will include the list of tasks |
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/jobs/tasks \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/tasks",
"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/jobs/tasks",
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
{
"tasks": [
{
"id": "1b552b2d-8565-4eb1-b6d6-ed07bbbbbb74",
"createdBy": "d456969d-ee12-4346-80bc-6c148decf3ee",
"title": "Example Title",
"type": "exampleType",
"createdAt": "2020-03-25T19:14:24.066Z",
"parameters": {
"fileId": "dc4effdc-e847-4ede-9d59-c7e075db0ae2"
},
"orgId": "2379984c-3745-4954-84e1-2a9d382ae297",
"jobId": "eedc2a90-5a31-4911-9163-fe514173793a",
"reportProgress": true,
"updatedAt": "2020-03-25T19:14:40.935Z",
"runStatus": "stopped",
"runResult": "Success",
"runProgress": 1
},
{
"id": "4390f524-8bab-4786-b19c-3700626d1bc4",
"createdBy": "0aa95b27-a584-4ceb-8e0d-0386abf63411",
"title": "Example Title",
"type": "exampleType",
"createdAt": "2020-03-25T18:39:16.474Z",
"parameters": {
"fileId": "183e5953-0e80-4098-9efb-30f58054d0c6"
},
"orgId": "b4eeffdc-77b0-4533-9b3d-d9b506ede10c",
"jobId": "52d94614-a78e-4450-9170-0c3c32a4e653",
"reportProgress": true,
"updatedAt": "2020-03-25T18:39:29.810Z",
"runStatus": "stopped",
"runResult": "Success",
"runProgress": 1
}
]
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
POST https://admin.threekit.com/api/jobs/tasks
Creates a task which sends a POST request. The sent request body will include the job's ID and any relevant information.
REST Endpoint
POST https://admin.threekit.com/api/jobs/tasks
Query Parameters
Name |
In |
Type |
Required |
Description |
body |
body |
createTaskBody |
true |
Task creation information. |
Body Parameters
{
"createdBy": "string",
"title": "string",
"type": "string",
"orgId": "string",
"id": "string",
"jobId": "string",
"parameters": {}
}
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful POST request, response body will include the created task details. |
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 |
The request body was missing required fields or contained invalid fields. |
None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/jobs/tasks \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"createdBy":"string","title":"string","type":"string","orgId":"string","id":"string","jobId":"string","parameters":{}}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/tasks",
"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({
createdBy: 'string',
title: 'string',
type: 'string',
orgId: 'string',
id: 'string',
jobId: 'string',
parameters: {}
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/jobs/tasks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"createdBy\":\"string\",\"title\":\"string\",\"type\":\"string\",\"orgId\":\"string\",\"id\":\"string\",\"jobId\":\"string\",\"parameters\":{}}",
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": "2547ad06-4815-41c7-824a-22a9a02077c8",
"createdBy": "de3056f2-e4cf-4f40-95e7-089be27ead41",
"title": "Example Title",
"type": "exampleType",
"createdAt": "2020-03-25T17:40:32.695Z",
"parameters": {
"format": "exampleFormat",
"assetId": "54016cce-f13c-4d3a-83db-debaf62593c1"
},
"orgId": "447aebec-4d2f-4afa-86e3-94b97f56dece",
"jobId": "4842dfd8-720b-412a-a9be-a39c4fc535e0",
"reportProgress": true,
"updatedAt": "2020-03-25T17:40:41.681Z",
"runStatus": "stopped",
"runResult": "Success",
"runProgress": 1
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "create_task_error",
"message": "Create task error"
}
}
GET https://admin.threekit.com/api/jobs/tasks/{taskId}
Retrieves a task. The task will have the following information available.
- id - Task ID
- createdBy - ID of the user who created the task
- title - Task title
- orgId - Organization ID
- type - Task type
- jobId - ID of the associated job
- createdAt - Time when the job was created
- updatedAt - Time when the job was last updated
- parameters - The metadata related to the task
- runStatus - Status of the most recent run
- runResult - Result of the most recent run
- runProgress - Progress of the most recent run
- reportProgress - Whether to report progress or not
REST Endpoint
GET https://admin.threekit.com/api/jobs/tasks/{taskId}
Query Parameters
Name |
In |
Type |
Required |
Description |
taskId |
path |
string |
true |
ID of the task to be retrieved. |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns a task's information |
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 task was found for the given ID |
None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/jobs/tasks/string \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/tasks/string",
"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/jobs/tasks/string",
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": "2547ad06-4815-41c7-824a-22a9a02077c8",
"createdBy": "de3056f2-e4cf-4f40-95e7-089be27ead41",
"title": "Example Title",
"type": "exampleType",
"createdAt": "2020-03-25T17:40:32.695Z",
"parameters": {
"format": "exampleFormat",
"assetId": "54016cce-f13c-4d3a-83db-debaf62593c1"
},
"orgId": "447aebec-4d2f-4afa-86e3-94b97f56dece",
"jobId": "4842dfd8-720b-412a-a9be-a39c4fc535e0",
"reportProgress": true,
"updatedAt": "2020-03-25T17:40:41.681Z",
"runStatus": "stopped",
"runResult": "Success",
"runProgress": 1
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "task_not_found",
"message": "Task not found"
}
}
PUT https://admin.threekit.com/api/jobs/tasks/{taskId}
Modifies metadata of a task.
REST Endpoint
PUT https://admin.threekit.com/api/jobs/tasks/{taskId}
Query Parameters
Name |
In |
Type |
Required |
Description |
taskId |
path |
string |
true |
ID of the task to be modified. |
body |
body |
updateTaskBody |
true |
Task update information. |
Body Parameters
{
"parameters": {},
"updatedAt": "string"
}
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns the modified task's information |
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 task was found for the given ID |
None |
Example Implementations
Code
CURL
curl --request PUT \
--url https://admin.threekit.com/api/jobs/tasks/string \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"parameters":{},"updatedAt":"string"}'
Node.JS
var http = require("https");
var options = {
"method": "PUT",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/tasks/string",
"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({ parameters: {}, updatedAt: 'string' }));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/jobs/tasks/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\"parameters\":{},\"updatedAt\":\"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": "8b2a1023-e80a-491f-9b7c-8b63e8ef07ed",
"createdBy": "f1f8bff1-7796-4b4e-8d3f-48e3c8de315d",
"title": "Example Title",
"type": "exampleType",
"createdAt": "2020-03-25T17:40:12.166Z",
"parameters": {
"fileId": "23534900-cab9-4483-888d-229df49ae144"
},
"orgId": "644cd167-bf33-4b6a-8c4d-e9971ff6c891",
"jobId": "ee1199d6-9c17-4baf-a4e1-f16df0f9c79c",
"reportProgress": true,
"updatedAt": "2020-03-25T17:40:24.181Z",
"runStatus": "stopped",
"runResult": "Success",
"runProgress": 1
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "task_not_found",
"message": "Task not found"
}
}
GET https://admin.threekit.com/api/jobs/runs
Retrieves the list of runs, optionally filtering by associated job ID, task ID, and organization ID. For each entry the following information will be available.
- id - ID of the runs
- taskId - ID of the associated task
- jobId - ID of the associated job
- createdBy - ID of the user who created the run
- createdAt - Time when the run was created
- updatedAt - Time when the pod was last updated
- startedAt - Time when the run started
- stoppedAt - Time when the run stopped
- results - The result of the run
- resultCode - The result code
- resultMessage - The content of the result
- error - Error produced by the run
- progress - The progress of the run
- GPUTime - The GPU time used by the run
- CPUTime - The CPU time used by the run
- machineType - Type of machine
- cpuPlatform - GCE CPU Architecture
- gpuType - Type of GPU (if present)
- instanceID - GCE Instance ID
- limitCPUs - CPU limit in vCPUs
- requestCPUs - CPU request in vCPUs
- nodeCPUs - Number of CPUs in the node
- limitRAM - Memory limit in bytes
- requestRAM - Memory request in bytes
- nodeRAM - Memory node in bytes
- orgId - Organization ID
- podId - Pod ID
- preemptible - Whether the virtual machine is preemptible or not
- RAMUsage - RAM usage
- reportProgress - Whether progress is reported or not
- wallClockTime - Time of wall clock
- zone - GCE zone where the run was performed
REST Endpoint
GET https://admin.threekit.com/api/jobs/runs?orgId=[orgId]&jobId=[jobId]&taskId=[taskId]
Query Parameters
Name |
In |
Type |
Required |
Description |
orgId |
query |
string |
false |
Organization ID |
jobId |
query |
string |
true |
ID of a job |
taskId |
query |
string |
true |
ID of a task |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful get request, response body will include the list of runs |
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/jobs/runs?taskId=taskId%3D'\''5c63cf39-45d9-4577-a867-3a74e6c772ea'\''&jobId=jobId%3D'\''34d6e7df-5019-4be6-9ca5-5f2905dd090f'\''' \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/runs?taskId=taskId%3D'5c63cf39-45d9-4577-a867-3a74e6c772ea'&jobId=jobId%3D'34d6e7df-5019-4be6-9ca5-5f2905dd090f'",
"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/jobs/runs?taskId=taskId%3D'5c63cf39-45d9-4577-a867-3a74e6c772ea'&jobId=jobId%3D'34d6e7df-5019-4be6-9ca5-5f2905dd090f'",
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
{
"runs": [
{
"CPUTime": null,
"GPUTime": null,
"RAMUsage": null,
"cpuPlatform": null,
"createdAt": "2019-12-17T19:21:13.296Z",
"createdBy": "d94db91a-db7f-4fbc-87f1-13abfc2faf20",
"error": null,
"gpuType": null,
"id": "456791e5-7c95-4310-8a60-e8112ba2cd80",
"instanceID": null,
"jobId": "b0ccf7d6-e648-4598-96e2-74c49d5befc8",
"limitCPUs": null,
"limitRAM": null,
"machine": null,
"machineType": null,
"nodeCPUs": null,
"nodeRAM": null,
"orgId": "cc054cd4-f060-4840-b596-2a679eb56c4f",
"podId": null,
"preemptible": null,
"progress": 0.25,
"reportProgress": true,
"requestCPUs": null,
"requestRAM": null,
"resultCode": null,
"resultMessage": null,
"results": null,
"startedAt": "2019-12-17T19:21:13.235Z",
"stoppedAt": null,
"taskId": "db86fe6d-b341-4e2b-9aff-0348c558e8e8",
"updatedAt": "2019-12-17T19:21:15.386Z",
"wallClockTime": null,
"zone": null
},
{
"CPUTime": null,
"GPUTime": null,
"RAMUsage": null,
"cpuPlatform": null,
"createdAt": "2019-12-17T19:51:12.517Z",
"createdBy": "1af49a74-cd2a-4dac-845e-b2576d609086",
"error": null,
"gpuType": null,
"id": "522bf9f9-d8b8-4b92-98af-4003bb87af81",
"instanceID": null,
"jobId": "64b375ed-f452-4d6a-9945-b7066aa633d1",
"limitCPUs": null,
"limitRAM": null,
"machine": null,
"machineType": null,
"nodeCPUs": null,
"nodeRAM": null,
"orgId": "cc054cd4-f060-4840-b596-2a679eb56c4f",
"podId": null,
"preemptible": null,
"progress": 0.75,
"reportProgress": true,
"requestCPUs": null,
"requestRAM": null,
"resultCode": null,
"resultMessage": null,
"results": null,
"startedAt": "2019-12-17T19:51:12.452Z",
"stoppedAt": null,
"taskId": "9ca1d8c6-e825-4120-985b-0ee454dda1d4",
"updatedAt": "2019-12-17T19:51:15.599Z",
"wallClockTime": null,
"zone": null
}
]
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
POST https://admin.threekit.com/api/jobs/runs
Creates a run which sends a POST request. The sent request body will include the run's ID and any relevant information.
REST Endpoint
POST https://admin.threekit.com/api/jobs/runs
Query Parameters
Name |
In |
Type |
Required |
Description |
body |
body |
createRunBody |
true |
Run creation information. |
Body Parameters
{
"createdBy": "string",
"orgId": "string",
"taskId": "string",
"id": "string",
"jobId": "string",
"reportProgress": true,
"progress": 0,
"startedAt": "string",
"createdAt": "string",
"requestCPUs": "string",
"limitCPUs": "string",
"nodeCPUs": "string",
"requestRAM": "string",
"limitRAM": "string",
"nodeRAM": "string",
"cpuPlatform": "string",
"machineType": "string",
"gpuType": "string",
"instanceID": "string",
"zone": "string",
"preemptible": "string",
"podId": "string"
}
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful POST request, response body will include the created run details. |
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 |
The request body was missing required fields or contained invalid fields. |
None |
Example Implementations
Code
CURL
curl --request POST \
--url https://admin.threekit.com/api/jobs/runs \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"createdBy":"string","orgId":"string","taskId":"string","id":"string","jobId":"string","reportProgress":true,"progress":0,"startedAt":"string","createdAt":"string","requestCPUs":"string","limitCPUs":"string","nodeCPUs":"string","requestRAM":"string","limitRAM":"string","nodeRAM":"string","cpuPlatform":"string","machineType":"string","gpuType":"string","instanceID":"string","zone":"string","preemptible":"string","podId":"string"}'
Node.JS
var http = require("https");
var options = {
"method": "POST",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/runs",
"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({
createdBy: 'string',
orgId: 'string',
taskId: 'string',
id: 'string',
jobId: 'string',
reportProgress: true,
progress: 0,
startedAt: 'string',
createdAt: 'string',
requestCPUs: 'string',
limitCPUs: 'string',
nodeCPUs: 'string',
requestRAM: 'string',
limitRAM: 'string',
nodeRAM: 'string',
cpuPlatform: 'string',
machineType: 'string',
gpuType: 'string',
instanceID: 'string',
zone: 'string',
preemptible: 'string',
podId: 'string'
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/jobs/runs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "{\"createdBy\":\"string\",\"orgId\":\"string\",\"taskId\":\"string\",\"id\":\"string\",\"jobId\":\"string\",\"reportProgress\":true,\"progress\":0,\"startedAt\":\"string\",\"createdAt\":\"string\",\"requestCPUs\":\"string\",\"limitCPUs\":\"string\",\"nodeCPUs\":\"string\",\"requestRAM\":\"string\",\"limitRAM\":\"string\",\"nodeRAM\":\"string\",\"cpuPlatform\":\"string\",\"machineType\":\"string\",\"gpuType\":\"string\",\"instanceID\":\"string\",\"zone\":\"string\",\"preemptible\":\"string\",\"podId\":\"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
{
"GPUTime": null,
"RAMUsage": null,
"cpuPlatform": null,
"createdAt": "2019-12-17T20:21:32.709Z",
"createdBy": "3a0ddcf9-8079-438e-ac63-f3a079e3f0ad",
"error": null,
"gpuType": null,
"id": "8bb5d203-44b9-47d9-81e9-a3d3f20af9cd",
"instanceID": null,
"jobId": "baabf620-68ea-46a8-91da-3a6d7ba8bc47",
"limitCPUs": null,
"limitRAM": null,
"machine": null,
"machineType": null,
"nodeCPUs": null,
"nodeRAM": null,
"orgId": "017e794b-3dce-4771-aaa5-84c6983c57e1",
"podId": null,
"preemptible": null,
"progress": 0.25,
"reportProgress": true,
"requestCPUs": null,
"requestRAM": null,
"resultCode": null,
"resultMessage": null,
"results": null,
"startedAt": "2019-12-17T20:21:32.584Z",
"stoppedAt": null,
"taskId": "1640af63-cb2e-4d5a-ab59-98e3c0f2d48c",
"updatedAt": "2019-12-17T20:21:36.781Z",
"wallClockTime": null,
"zone": null
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "create_run_error",
"message": "Create run error"
}
}
GET https://admin.threekit.com/api/jobs/runs/{runId}
Retrieves a run. The run will have the following information available.
- id - ID of the runs
- taskId - ID of the associated task
- jobId - ID of the associated job
- createdBy - ID of the user who created the run
- createdAt - Time when the run was created
- updatedAt - Time when the pod was last updated
- startedAt - Time when the run started
- stoppedAt - Time when the run stopped
- results - The result of the run
- resultCode - The result code
- resultMessage - The content of the result
- error - Error produced by the run
- progress - The progress of the run
- GPUTime - The GPU time used by the run
- CPUTime - The CPU time used by the run
- machineType - Type of machine
- cpuPlatform - GCE CPU Architecture
- gpuType - Type of GPU (if present)
- instanceID - GCE Instance ID
- limitCPUs - CPU limit in vCPUs
- requestCPUs - CPU request in vCPUs
- nodeCPUs - Number of CPUs in the node
- limitRAM - Memory limit in bytes
- requestRAM - Memory request in bytes
- nodeRAM - Memory node in bytes
- orgId - Organization ID
- podId - Pod ID
- preemptible - Whether the virtual machine is preemptible or not
- RAMUsage - RAM usage
- reportProgress - Whether progress is reported or not
- wallClockTime - Time of wall clock
- zone - GCE zone where the run was performed
REST Endpoint
GET https://admin.threekit.com/api/jobs/runs/{runId}
Query Parameters
Name |
In |
Type |
Required |
Description |
runId |
path |
string |
true |
ID of the run to be retrieved. |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns a run's information |
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 run was found for the given ID |
None |
Example Implementations
Code
CURL
curl --request GET \
--url https://admin.threekit.com/api/jobs/runs/string \
--header 'authorization: Bearer {access-token}'
Node.JS
var http = require("https");
var options = {
"method": "GET",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/runs/string",
"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/jobs/runs/string",
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": "19f80218-d11a-466d-8641-dfa0ebfece66",
"taskId": "6c2dc95d-6801-4532-b971-ac6b8abe9148",
"createdAt": "2019-12-17T19:21:13.296Z",
"updatedAt": "2019-12-17T19:21:15.386Z",
"stoppedAt": null,
"results": null,
"resultCode": null,
"resultMessage": null,
"error": null,
"progress": 0.25,
"machine": null,
"startedAt": "2019-12-17T19:21:13.235Z",
"GPUTime": null,
"CPUTime": null,
"jobId": "e2d46fc7-9637-4cb2-bb57-b811d9f8ff3f",
"reportProgress": true,
"orgId": "9643a403-bf17-4917-95d3-1929c3a0ca37",
"createdBy": "9643a403-bf17-4917-95d3-1929c3a0ca37",
"RAMUsage": null,
"wallClockTime": null,
"requestCPUs": null,
"limitCPUs": null,
"nodeCPUs": null,
"requestRAM": null,
"limitRAM": null,
"nodeRAM": null,
"cpuPlatform": null,
"machineType": null,
"gpuType": null,
"instanceID": null,
"zone": null,
"preemptible": null,
"podId": null
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "run_not_found",
"message": "Run not found"
}
}
PUT https://admin.threekit.com/api/jobs/runs/{runId}
Modifies an incomplete run with the contents showed in the request body.
REST Endpoint
PUT https://admin.threekit.com/api/jobs/runs/{runId}
Query Parameters
Name |
In |
Type |
Required |
Description |
runId |
path |
string |
true |
ID of the run to be modified. |
body |
body |
updateRunBody |
true |
Run update information. |
Body Parameters
{
"startedAt": "string",
"stoppedAt": "string",
"resultCode": "string",
"error": "string",
"progress": "string",
"results": "string",
"machine": "string"
}
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Returns a modified run's information |
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 run was found for the given ID |
None |
Example Implementations
Code
CURL
curl --request PUT \
--url https://admin.threekit.com/api/jobs/runs/string \
--header 'authorization: Bearer {access-token}' \
--header 'content-type: application/json' \
--data '{"startedAt":"string","stoppedAt":"string","resultCode":"string","error":"string","progress":"string","results":"string","machine":"string"}'
Node.JS
var http = require("https");
var options = {
"method": "PUT",
"hostname": "admin.threekit.com",
"port": null,
"path": "/api/jobs/runs/string",
"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({
startedAt: 'string',
stoppedAt: 'string',
resultCode: 'string',
error: 'string',
progress: 'string',
results: 'string',
machine: 'string'
}));
req.end();
PHP
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://admin.threekit.com/api/jobs/runs/string",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => "{\"startedAt\":\"string\",\"stoppedAt\":\"string\",\"resultCode\":\"string\",\"error\":\"string\",\"progress\":\"string\",\"results\":\"string\",\"machine\":\"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": "19f80218-d11a-466d-8641-dfa0ebfece66",
"taskId": "6c2dc95d-6801-4532-b971-ac6b8abe9148",
"createdAt": "2019-12-17T19:21:13.296Z",
"updatedAt": "2019-12-17T19:21:15.386Z",
"stoppedAt": null,
"results": null,
"resultCode": null,
"resultMessage": null,
"error": null,
"progress": 0.25,
"machine": null,
"startedAt": "2019-12-17T19:21:13.235Z",
"GPUTime": null,
"CPUTime": null,
"jobId": "e2d46fc7-9637-4cb2-bb57-b811d9f8ff3f",
"reportProgress": true,
"orgId": "9643a403-bf17-4917-95d3-1929c3a0ca37",
"createdBy": "9643a403-bf17-4917-95d3-1929c3a0ca37",
"RAMUsage": null,
"wallClockTime": null,
"requestCPUs": null,
"limitCPUs": null,
"nodeCPUs": null,
"requestRAM": null,
"limitRAM": null,
"nodeRAM": null,
"cpuPlatform": null,
"machineType": null,
"gpuType": null,
"instanceID": null,
"zone": null,
"preemptible": null,
"podId": null
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "run_not_found",
"message": "Run not found"
}
}
GET https://admin.threekit.com/api/jobs/reports
Retrieves the report of all runs of a given organization. For each entry the following information will be available.
- title - Title of the run
- type - Type of the run
- createdBy - ID of the user who created this run
- progress - The progress of the run
- orgId - Organization ID
- startedAt - Time when the run started
- stoppedAt - Time when the run stopped
- jobTitle - The title of the associated job
REST Endpoint
GET https://admin.threekit.com/api/jobs/reports?orgId=[orgId]
Query Parameters
Name |
In |
Type |
Required |
Description |
orgId |
query |
string |
true |
Organization ID |
Response Codes
Status |
Meaning |
Description |
Schema |
200 |
OK |
Successful get request, response body will include the reports |
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 |
User forgot to pass the organization ID |
None |
Example Implementations
Code
CURL
curl --request GET \
--url 'https://admin.threekit.com/api/jobs/reports?orgId=orgId%3D'\''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/jobs/reports?orgId=orgId%3D'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/jobs/reports?orgId=orgId%3D'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
{
"runs": [
{
"createdBy": "0181daf0-2972-446b-9ec6-f7aa941f7da0",
"jobTitle": "Example Job Title",
"orgId": "0837c9a7-d5c6-4438-85b1-4f69579bf0a0",
"progress": 1,
"startedAt": "2020-03-18T21:29:21.944Z",
"stoppedAt": "2020-03-18T21:29:27.349Z",
"title": "Example Title",
"type": "Example Type"
},
{
"createdBy": "ac1e6307-56b4-4221-a08f-ff7bcf29b1a3",
"jobTitle": "Example Job Title",
"orgId": "d1240e2f-ad13-4143-bba1-b6287fa948d8",
"progress": 1,
"startedAt": "2020-02-10T17:19:43.491Z",
"stoppedAt": "2020-02-10T17:19:49.948Z",
"title": "Example Title",
"type": "Example Type"
}
]
}
{
"error": {
"code": "users_service_unavailable",
"message": "Error reaching users service"
}
}
{
"error": {
"code": "forbidden",
"message": "forbidden"
}
}
{
"error": {
"code": "runs_not_found",
"message": "Runs not found"
}
}
Schemas
createJobBody
{
"createdBy": "string",
"title": "string",
"type": "string",
"orgId": "string",
"id": "string",
"schedulerState": "string"
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
createdBy |
string |
false |
none |
ID of user who created the job |
title |
string |
false |
none |
Title of the job to be created |
type |
string |
false |
none |
Type of the job to be created |
orgId |
string |
false |
none |
Organization that owns the job |
id |
string |
false |
none |
ID of the job |
schedulerState |
string |
false |
none |
User-desired job state |
updateJobBody
{
"parameters": {}
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
parameters |
object |
false |
none |
Metadata of the job |
createTaskBody
{
"createdBy": "string",
"title": "string",
"type": "string",
"orgId": "string",
"id": "string",
"jobId": "string",
"parameters": {}
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
createdBy |
string |
false |
none |
ID of user who created the task |
title |
string |
false |
none |
Title of the task to be created |
type |
string |
false |
none |
Type of the task to be created |
orgId |
string |
false |
none |
Organization that owns the job |
id |
string |
false |
none |
ID of the job |
jobId |
string |
false |
none |
ID of the associated job |
parameters |
object |
false |
none |
Metadata of the task |
updateTaskBody
{
"parameters": {},
"updatedAt": "string"
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
parameters |
object |
false |
none |
Metadata of the task |
updatedAt |
string |
false |
none |
Time when the task was last updated |
createRunBody
{
"createdBy": "string",
"orgId": "string",
"taskId": "string",
"id": "string",
"jobId": "string",
"reportProgress": true,
"progress": 0,
"startedAt": "string",
"createdAt": "string",
"requestCPUs": "string",
"limitCPUs": "string",
"nodeCPUs": "string",
"requestRAM": "string",
"limitRAM": "string",
"nodeRAM": "string",
"cpuPlatform": "string",
"machineType": "string",
"gpuType": "string",
"instanceID": "string",
"zone": "string",
"preemptible": "string",
"podId": "string"
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
createdBy |
string |
false |
none |
ID of user created the run |
orgId |
string |
false |
none |
Organization that owns the job |
taskId |
string |
false |
none |
ID of the related rask |
id |
string |
false |
none |
ID of the run |
jobId |
string |
false |
none |
ID of the associated job |
reportProgress |
boolean |
false |
none |
Whether to show progress |
progress |
number |
false |
none |
Progress of the run |
startedAt |
string |
false |
none |
The start time of the run |
createdAt |
string |
false |
none |
The creation time of the run |
requestCPUs |
string |
false |
none |
unknown |
limitCPUs |
string |
false |
none |
unknown |
nodeCPUs |
string |
false |
none |
unknown |
requestRAM |
string |
false |
none |
unknown |
limitRAM |
string |
false |
none |
unknown |
nodeRAM |
string |
false |
none |
unknown |
cpuPlatform |
string |
false |
none |
unknown |
machineType |
string |
false |
none |
Type of the machine |
gpuType |
string |
false |
none |
Type of the GPU |
instanceID |
string |
false |
none |
unknown |
zone |
string |
false |
none |
unknown |
preemptible |
string |
false |
none |
unknown |
podId |
string |
false |
none |
ID of the pod |
updateRunBody
{
"startedAt": "string",
"stoppedAt": "string",
"resultCode": "string",
"error": "string",
"progress": "string",
"results": "string",
"machine": "string"
}
Properties
Name |
Type |
Required |
Restrictions |
Description |
startedAt |
string |
false |
none |
Time when the run was started |
stoppedAt |
string |
false |
none |
Time when the run was stopped |
resultCode |
string |
false |
none |
The code of the result |
error |
string |
false |
none |
Error produced by the run |
progress |
string |
false |
none |
The progress of the run |
results |
string |
false |
none |
The results of the run |
machine |
string |
false |
none |
The machine used for the run |