All URIs are relative to https://api.fireblocks.io/v1
Method | HTTP request | Description |
---|---|---|
getOtaStatus | GET /management/ota | Returns current OTA status |
setOtaStatus | PUT /management/ota | Enable or disable transactions to OTA |
CompletableFuture<ApiResponse> getOtaStatus getOtaStatus()
Returns current OTA status
Returns current OTA status
// Import classes:
import com.fireblocks.sdk.ApiClient;
import com.fireblocks.sdk.ApiException;
import com.fireblocks.sdk.ApiResponse;
import com.fireblocks.sdk.Configuration;
import com.fireblocks.sdk.models.*;
import com.fireblocks.sdk.api.OtaBetaApi;
import java.util.concurrent.CompletableFuture;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.fireblocks.io/v1");
OtaBetaApi apiInstance = new OtaBetaApi(defaultClient);
try {
CompletableFuture<ApiResponse<GetOtaStatus200Response>> response = apiInstance.getOtaStatus();
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
System.out.println("Response body: " + response.get().getData());
} catch (InterruptedException | ExecutionException e) {
ApiException apiException = (ApiException)e.getCause();
System.err.println("Exception when calling OtaBetaApi#getOtaStatus");
System.err.println("Status code: " + apiException.getCode());
System.err.println("Response headers: " + apiException.getResponseHeaders());
System.err.println("Reason: " + apiException.getResponseBody());
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling OtaBetaApi#getOtaStatus");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
This endpoint does not need any parameter.
CompletableFuture<ApiResponse<GetOtaStatus200Response>>
No authorization required
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Current OTA status | - |
404 | Configuration not found for tenant | - |
CompletableFuture<ApiResponse> setOtaStatus setOtaStatus(setOtaStatusRequest, idempotencyKey)
Enable or disable transactions to OTA
Enable or disable transactions to OTA
// Import classes:
import com.fireblocks.sdk.ApiClient;
import com.fireblocks.sdk.ApiException;
import com.fireblocks.sdk.ApiResponse;
import com.fireblocks.sdk.Configuration;
import com.fireblocks.sdk.models.*;
import com.fireblocks.sdk.api.OtaBetaApi;
import java.util.concurrent.CompletableFuture;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.fireblocks.io/v1");
OtaBetaApi apiInstance = new OtaBetaApi(defaultClient);
SetOtaStatusRequest setOtaStatusRequest = new SetOtaStatusRequest(); // SetOtaStatusRequest |
String idempotencyKey = "idempotencyKey_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.
try {
CompletableFuture<ApiResponse<Void>> response = apiInstance.setOtaStatus(setOtaStatusRequest, idempotencyKey);
System.out.println("Status code: " + response.get().getStatusCode());
System.out.println("Response headers: " + response.get().getHeaders());
} catch (InterruptedException | ExecutionException e) {
ApiException apiException = (ApiException)e.getCause();
System.err.println("Exception when calling OtaBetaApi#setOtaStatus");
System.err.println("Status code: " + apiException.getCode());
System.err.println("Response headers: " + apiException.getResponseHeaders());
System.err.println("Reason: " + apiException.getResponseBody());
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling OtaBetaApi#setOtaStatus");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
System.err.println("Reason: " + e.getResponseBody());
e.printStackTrace();
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
setOtaStatusRequest | SetOtaStatusRequest | ||
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] |
CompletableFuture<ApiResponse>
No authorization required
- Content-Type: application/json
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
202 | Successfully updated OTA status | - |
400 | Bad request | - |
409 | Similar request already pending | - |
500 | Internal server error | - |