11# ApiUserApi
22
3- All URIs are relative to * https://api .fireblocks.io/v1 *
3+ All URIs are relative to https://developers .fireblocks.com/reference/
44
55| Method | HTTP request | Description |
66| ------------- | ------------- | -------------|
@@ -24,21 +24,26 @@ creates api user
2424import com.fireblocks.sdk.ApiClient ;
2525import com.fireblocks.sdk.ApiException ;
2626import com.fireblocks.sdk.ApiResponse ;
27- import com.fireblocks.sdk.Configuration ;
28- import com.fireblocks.sdk.models.* ;
27+ import com.fireblocks.sdk.BasePath ;
28+ import com.fireblocks.sdk.Fireblocks ;
29+ import com.fireblocks.sdk.ConfigurationOptions ;
30+ import com.fireblocks.sdk.model.* ;
2931import com.fireblocks.sdk.api.ApiUserApi ;
3032import java.util.concurrent.CompletableFuture ;
33+ import java.util.concurrent.ExecutionException ;
3134
3235public class Example {
3336 public static void main (String [] args ) {
34- ApiClient defaultClient = Configuration . getDefaultApiClient();
35- defaultClient. setBasePath(" https://api.fireblocks.io/v1" );
37+ ConfigurationOptions configurationOptions = new ConfigurationOptions ()
38+ .basePath(BasePath . Sandbox )
39+ .apiKey(" my-api-key" )
40+ .secretKey(" my-secret-key" );
41+ Fireblocks fireblocks = new Fireblocks (configurationOptions);
3642
37- ApiUserApi apiInstance = new ApiUserApi (defaultClient);
3843 CreateAPIUser createAPIUser = new CreateAPIUser (); // CreateAPIUser |
3944 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.
4045 try {
41- CompletableFuture<ApiResponse<Void > > response = apiInstance . createApiUser(createAPIUser, idempotencyKey);
46+ CompletableFuture<ApiResponse<Void > > response = fireblocks . apiUser() . createApiUser(createAPIUser, idempotencyKey);
4247 System . out. println(" Status code: " + response. get(). getStatusCode());
4348 System . out. println(" Response headers: " + response. get(). getHeaders());
4449 } catch (InterruptedException | ExecutionException e) {
@@ -84,7 +89,7 @@ No authorization required
8489### HTTP response details
8590| Status code | Description | Response headers |
8691| -------------| -------------| ------------------|
87- | ** 204 ** | User sent for creation | * X-Request-ID - <br > |
92+ | ** 200 ** | User sent for creation | * X-Request-ID - <br > |
8893| ** 401** | Unauthorized. Missing / invalid JWT token in Authorization header. | * X-Request-ID - <br > |
8994| ** 403** | Lacking permissions. | * X-Request-ID - <br > |
9095| ** 5XX** | Internal error. | * X-Request-ID - <br > |
@@ -93,7 +98,7 @@ No authorization required
9398
9499## getApiUsers
95100
96- > CompletableFuture<ApiResponse<Void >> getApiUsers getApiUsers()
101+ > CompletableFuture<ApiResponse<GetAPIUsersResponse >> getApiUsers getApiUsers()
97102
98103get api users
99104
@@ -106,21 +111,27 @@ get api users from the current tenant
106111import com.fireblocks.sdk.ApiClient ;
107112import com.fireblocks.sdk.ApiException ;
108113import com.fireblocks.sdk.ApiResponse ;
109- import com.fireblocks.sdk.Configuration ;
110- import com.fireblocks.sdk.models.* ;
114+ import com.fireblocks.sdk.BasePath ;
115+ import com.fireblocks.sdk.Fireblocks ;
116+ import com.fireblocks.sdk.ConfigurationOptions ;
117+ import com.fireblocks.sdk.model.* ;
111118import com.fireblocks.sdk.api.ApiUserApi ;
112119import java.util.concurrent.CompletableFuture ;
120+ import java.util.concurrent.ExecutionException ;
113121
114122public class Example {
115123 public static void main (String [] args ) {
116- ApiClient defaultClient = Configuration . getDefaultApiClient();
117- defaultClient. setBasePath(" https://api.fireblocks.io/v1" );
124+ ConfigurationOptions configurationOptions = new ConfigurationOptions ()
125+ .basePath(BasePath . Sandbox )
126+ .apiKey(" my-api-key" )
127+ .secretKey(" my-secret-key" );
128+ Fireblocks fireblocks = new Fireblocks (configurationOptions);
118129
119- ApiUserApi apiInstance = new ApiUserApi (defaultClient);
120130 try {
121- CompletableFuture<ApiResponse<Void > > response = apiInstance . getApiUsers();
131+ CompletableFuture<ApiResponse<GetAPIUsersResponse > > response = fireblocks . apiUser() . getApiUsers();
122132 System . out. println(" Status code: " + response. get(). getStatusCode());
123133 System . out. println(" Response headers: " + response. get(). getHeaders());
134+ System . out. println(" Response body: " + response. get(). getData());
124135 } catch (InterruptedException | ExecutionException e) {
125136 ApiException apiException = (ApiException )e. getCause();
126137 System . err. println(" Exception when calling ApiUserApi#getApiUsers" );
@@ -145,8 +156,8 @@ This endpoint does not need any parameter.
145156
146157### Return type
147158
159+ CompletableFuture<ApiResponse<[ ** GetAPIUsersResponse** ] ( GetAPIUsersResponse.md ) >>
148160
149- CompletableFuture<ApiResponse<Void >>
150161
151162### Authorization
152163
0 commit comments