All URIs are relative to https://developers.fireblocks.com/reference/
Method | HTTP request | Description |
---|---|---|
cancelJob | POST /batch/{jobId}/cancel | Cancel a running job |
continueJob | POST /batch/{jobId}/continue | Continue a paused job |
getJob | GET /batch/{jobId} | Get job details |
getJobTasks | GET /batch/{jobId}/tasks | Return a list of tasks for given job |
getJobs | GET /batch/jobs | Return a list of jobs belonging to tenant |
pauseJob | POST /batch/{jobId}/pause | Pause a job |
cancelJob()
Stop the given job immediately. If the job is in the ‘Active’ state, the job will be canceled after completing the current task. Vault accounts and Wallets that are already created will not be affected.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, JobManagementApiCancelJobRequest } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: JobManagementApiCancelJobRequest = {
// string | The requested job id
jobId: jobId_example,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.jobManagement.cancelJob(body).then((res: FireblocksResponse<any>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
jobId | [string] | The requested job id | defaults to undefined |
idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | canceled successfully | - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
continueJob()
Continue the given paused job.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, JobManagementApiContinueJobRequest } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: JobManagementApiContinueJobRequest = {
// string | The requested job id
jobId: jobId_example,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.jobManagement.continueJob(body).then((res: FireblocksResponse<any>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
jobId | [string] | The requested job id | defaults to undefined |
idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | continued successfully | - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Job getJob()
Get an object describing the given job
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, JobManagementApiGetJobRequest, Job } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: JobManagementApiGetJobRequest = {
// string | The requested job id
jobId: jobId_example,
};
fireblocks.jobManagement.getJob(body).then((res: FireblocksResponse<Job>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
jobId | [string] | The requested job id | defaults to undefined |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | A JSON object that describes the job | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tasks getJobTasks()
Return a list of tasks for given job
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, JobManagementApiGetJobTasksRequest, Tasks } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: JobManagementApiGetJobTasksRequest = {
// string | The requested job id
jobId: jobId_example,
};
fireblocks.jobManagement.getJobTasks(body).then((res: FireblocksResponse<Tasks>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
jobId | [string] | The requested job id | defaults to undefined |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | An array of tasks | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Jobs getJobs()
Get an array of objects including all active, paused, canceled, and complete jobs in a workspace.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, JobManagementApiGetJobsRequest, Jobs } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: JobManagementApiGetJobsRequest = {
// number | Start of time range in ms since 1970 (optional)
fromTime: 56,
// number | End of time range in ms since 1970 (optional)
toTime: 56,
};
fireblocks.jobManagement.getJobs(body).then((res: FireblocksResponse<Jobs>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
fromTime | [number] | Start of time range in ms since 1970 | (optional) defaults to undefined |
toTime | [number] | End of time range in ms since 1970 | (optional) defaults to undefined |
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | An array of jobs | * X-Request-ID - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
pauseJob()
Pause the given job, after the current task is done. A paused job can later be resumed by calling ‘continue’, or canceled.
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, JobManagementApiPauseJobRequest } from '@fireblocks/ts-sdk';
// Set the environment variables for authentication
process.env.FIREBLOCKS_BASE_PATH = BasePath.Sandbox; // or assign directly to "https://sandbox-api.fireblocks.io/v1"
process.env.FIREBLOCKS_API_KEY = "my-api-key";
process.env.FIREBLOCKS_SECRET_KEY = readFileSync("./fireblocks_secret.key", "utf8");
const fireblocks = new Fireblocks();
let body: JobManagementApiPauseJobRequest = {
// string | The requested job id
jobId: jobId_example,
// string | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. (optional)
idempotencyKey: idempotencyKey_example,
};
fireblocks.jobManagement.pauseJob(body).then((res: FireblocksResponse<any>) => {
console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
jobId | [string] | The requested job id | defaults to undefined |
idempotencyKey | [string] | A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours. | (optional) defaults to undefined |
void (empty response body)
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | paused successfully | - |
0 | Error Response | * X-Request-ID - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]