Skip to content

Latest commit

 

History

History
137 lines (88 loc) · 5.44 KB

WebhooksApi.md

File metadata and controls

137 lines (88 loc) · 5.44 KB

WebhooksApi

All URIs are relative to https://developers.fireblocks.com/reference/

Method HTTP request Description
resendTransactionWebhooks POST /webhooks/resend/{txId} Resend failed webhooks for a transaction by ID
resendWebhooks POST /webhooks/resend Resend failed webhooks

resendTransactionWebhooks

ResendWebhooksByTransactionIdResponse resendTransactionWebhooks(resendTransactionWebhooksRequest, )

Resends failed webhook notifications for a transaction by ID.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, WebhooksApiResendTransactionWebhooksRequest, ResendWebhooksByTransactionIdResponse } 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: WebhooksApiResendTransactionWebhooksRequest = {
  // ResendTransactionWebhooksRequest
  resendTransactionWebhooksRequest: param_value,
  // string | The ID of the transaction for webhooks
  txId: txId_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.webhooks.resendTransactionWebhooks(body).then((res: FireblocksResponse<ResendWebhooksByTransactionIdResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
resendTransactionWebhooksRequest ResendTransactionWebhooksRequest
txId [string] The ID of the transaction for webhooks 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

Return type

ResendWebhooksByTransactionIdResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

resendWebhooks

ResendWebhooksResponse resendWebhooks()

Resends all failed webhook notifications.

Example

import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, WebhooksApiResendWebhooksRequest, ResendWebhooksResponse } 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: WebhooksApiResendWebhooksRequest = {
  // 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.webhooks.resendWebhooks(body).then((res: FireblocksResponse<ResendWebhooksResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));

Parameters

Name Type Description Notes
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

Return type

ResendWebhooksResponse

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 OK * X-Request-ID -
0 Error Response * X-Request-ID -

[Back to top] [Back to API list] [Back to Model list] [Back to README]