# NetworkConnectionsApi

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

Method | HTTP request | Description
------------- | ------------- | -------------
[**checkThirdPartyRouting**](#checkThirdPartyRouting) | **GET** /network_connections/{connectionId}/is_third_party_routing/{assetType} | Retrieve third-party network routing validation
[**createNetworkConnection**](#createNetworkConnection) | **POST** /network_connections | Create a new network connection
[**createNetworkId**](#createNetworkId) | **POST** /network_ids | Creates a new Network ID
[**deleteNetworkConnection**](#deleteNetworkConnection) | **DELETE** /network_connections/{connectionId} | Delete a network connection by ID
[**deleteNetworkId**](#deleteNetworkId) | **DELETE** /network_ids/{networkId} | Delete specific network ID.
[**getNetwork**](#getNetwork) | **GET** /network_connections/{connectionId} | Get a network connection
[**getNetworkConnections**](#getNetworkConnections) | **GET** /network_connections | List network connections
[**getNetworkId**](#getNetworkId) | **GET** /network_ids/{networkId} | Return specific network ID.
[**getNetworkIds**](#getNetworkIds) | **GET** /network_ids | Get all network IDs
[**getRoutingPolicyAssetGroups**](#getRoutingPolicyAssetGroups) | **GET** /network_ids/routing_policy_asset_groups | Return all enabled routing policy asset groups
[**searchNetworkIds**](#searchNetworkIds) | **GET** /network_ids/search | Get both local IDs and discoverable remote IDs
[**setNetworkIdDiscoverability**](#setNetworkIdDiscoverability) | **PATCH** /network_ids/{networkId}/set_discoverability | Update network ID\&#39;s discoverability.
[**setNetworkIdName**](#setNetworkIdName) | **PATCH** /network_ids/{networkId}/set_name | Update network ID\&#39;s name.
[**setNetworkIdRoutingPolicy**](#setNetworkIdRoutingPolicy) | **PATCH** /network_ids/{networkId}/set_routing_policy | Update network id routing policy.
[**setRoutingPolicy**](#setRoutingPolicy) | **PATCH** /network_connections/{connectionId}/set_routing_policy | Update network connection routing policy.


# **checkThirdPartyRouting**
> ThirdPartyRouting checkThirdPartyRouting()

The Fireblocks Network allows for flexibility around incoming deposits. A receiver can receive network deposits to locations other than Fireblocks. This endpoint validates whether future transactions are routed to the displayed recipient or to a 3rd party.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiCheckThirdPartyRoutingRequest, ThirdPartyRouting } 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: NetworkConnectionsApiCheckThirdPartyRoutingRequest = {
  // string | The ID of the network connection
  connectionId: connectionId_example,
  // string | The destination asset type
  assetType: assetType_example,
};

fireblocks.networkConnections.checkThirdPartyRouting(body).then((res: FireblocksResponse<ThirdPartyRouting>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **connectionId** | [**string**] | The ID of the network connection | defaults to undefined
 **assetType** | [**string**] | The destination asset type | defaults to undefined


### Return type

**[ThirdPartyRouting](../models/ThirdPartyRouting.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | result for the validation |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **createNetworkConnection**
> NetworkConnectionResponse createNetworkConnection()

Initiates a new network connection. **Note:** This API call is subject to Flexible Routing Schemes.  Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type:   - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail.   - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one.   - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\"  Default Workspace Presets:   - Network Profile Crypto → **Custom**   - Network Profile FIAT → **None**   - Network Connection Crypto → **Default**   - Network Connection FIAT → **Default**  Supported asset groups for routing police can be found at `/network_ids/routing_policy_asset_groups`      - **Note**: By default, Custom routing scheme uses (`dstId` = `0`, `dstType` = `VAULT`). 

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiCreateNetworkConnectionRequest, NetworkConnectionResponse } 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: NetworkConnectionsApiCreateNetworkConnectionRequest = {
  // NetworkConnection (optional)
  networkConnection: param_value,
  // 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.networkConnections.createNetworkConnection(body).then((res: FireblocksResponse<NetworkConnectionResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **networkConnection** | **[NetworkConnection](../models/NetworkConnection.md)**|  |
 **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

**[NetworkConnectionResponse](../models/NetworkConnectionResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | A Network Connection object |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **createNetworkId**
> NetworkIdResponse createNetworkId()

Create a new Network ID.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiCreateNetworkIdRequest, NetworkIdResponse } 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: NetworkConnectionsApiCreateNetworkIdRequest = {
  // CreateNetworkIdRequest (optional)
  createNetworkIdRequest: param_value,
  // 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.networkConnections.createNetworkId(body).then((res: FireblocksResponse<NetworkIdResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **createNetworkIdRequest** | **[CreateNetworkIdRequest](../models/CreateNetworkIdRequest.md)**|  |
 **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

**[NetworkIdResponse](../models/NetworkIdResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Returns the new network ID in your workspace |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **deleteNetworkConnection**
> DeleteNetworkConnectionResponse deleteNetworkConnection()

Deletes an existing network connection specified by its connection ID.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiDeleteNetworkConnectionRequest, DeleteNetworkConnectionResponse } 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: NetworkConnectionsApiDeleteNetworkConnectionRequest = {
  // string | The ID of the network connection to delete
  connectionId: connectionId_example,
};

fireblocks.networkConnections.deleteNetworkConnection(body).then((res: FireblocksResponse<DeleteNetworkConnectionResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **connectionId** | [**string**] | The ID of the network connection to delete | defaults to undefined


### Return type

**[DeleteNetworkConnectionResponse](../models/DeleteNetworkConnectionResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Network ID |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **deleteNetworkId**
> DeleteNetworkIdResponse deleteNetworkId()

Deletes a network by its ID.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiDeleteNetworkIdRequest, DeleteNetworkIdResponse } 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: NetworkConnectionsApiDeleteNetworkIdRequest = {
  // string | The ID of the network
  networkId: networkId_example,
};

fireblocks.networkConnections.deleteNetworkId(body).then((res: FireblocksResponse<DeleteNetworkIdResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **networkId** | [**string**] | The ID of the network | defaults to undefined


### Return type

**[DeleteNetworkIdResponse](../models/DeleteNetworkIdResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Network ID |  -  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getNetwork**
> NetworkConnectionResponse getNetwork()

Gets a network connection by ID.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiGetNetworkRequest, NetworkConnectionResponse } 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: NetworkConnectionsApiGetNetworkRequest = {
  // string | The ID of the connection
  connectionId: connectionId_example,
};

fireblocks.networkConnections.getNetwork(body).then((res: FireblocksResponse<NetworkConnectionResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **connectionId** | [**string**] | The ID of the connection | defaults to undefined


### Return type

**[NetworkConnectionResponse](../models/NetworkConnectionResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | A network connection |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getNetworkConnections**
> GetNetworkConnectionsResponse getNetworkConnections()

Returns all network connections.  **Note:** This API call is subject to Flexible Routing Schemes.  Your routing policy defines how your transactions are routed. You can choose 1 of the 3 different schemes mentioned below for each asset type:   - **None**; Defines the profile routing to no destination for that asset type. Incoming transactions to asset types routed to `None` will fail.   - **Custom**; Route to an account that you choose. If you remove the account, incoming transactions will fail until you choose another one.   - **Default**; Use the routing specified by the network profile the connection is connected to. This scheme is also referred to as \"Profile Routing\"  Default Workspace Presets:   - Network Profile Crypto → **Custom**   - Network Profile FIAT → **None**   - Network Connection Crypto → **Default**   - Network Connection FIAT → **Default**

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, GetNetworkConnectionsResponse } 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:any = {};

fireblocks.networkConnections.getNetworkConnections(body).then((res: FireblocksResponse<GetNetworkConnectionsResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters
This endpoint does not need any parameter.


### Return type

**[GetNetworkConnectionsResponse](../models/GetNetworkConnectionsResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | A list of network connections |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getNetworkId**
> NetworkIdResponse getNetworkId()

Returns specific network ID.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiGetNetworkIdRequest, NetworkIdResponse } 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: NetworkConnectionsApiGetNetworkIdRequest = {
  // string | The ID of the network
  networkId: networkId_example,
};

fireblocks.networkConnections.getNetworkId(body).then((res: FireblocksResponse<NetworkIdResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **networkId** | [**string**] | The ID of the network | defaults to undefined


### Return type

**[NetworkIdResponse](../models/NetworkIdResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Network ID |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getNetworkIds**
> GetNetworkIdsResponse getNetworkIds()

Retrieves a list of all local and discoverable remote network IDs.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, GetNetworkIdsResponse } 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:any = {};

fireblocks.networkConnections.getNetworkIds(body).then((res: FireblocksResponse<GetNetworkIdsResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters
This endpoint does not need any parameter.


### Return type

**[GetNetworkIdsResponse](../models/GetNetworkIdsResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | A list of network IDs |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **getRoutingPolicyAssetGroups**
> GetRoutingPolicyAssetGroupsResponse getRoutingPolicyAssetGroups()

Returns all enabled routing policy asset groups

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, GetRoutingPolicyAssetGroupsResponse } 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:any = {};

fireblocks.networkConnections.getRoutingPolicyAssetGroups(body).then((res: FireblocksResponse<GetRoutingPolicyAssetGroupsResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters
This endpoint does not need any parameter.


### Return type

**[GetRoutingPolicyAssetGroupsResponse](../models/GetRoutingPolicyAssetGroupsResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | A list of enabled routing policy asset groups |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **searchNetworkIds**
> SearchNetworkIdsResponse searchNetworkIds()

Retrieves a list of all local and discoverable remote network IDs. Can be filtered. 

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiSearchNetworkIdsRequest, SearchNetworkIdsResponse } 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: NetworkConnectionsApiSearchNetworkIdsRequest = {
  // string | Search string - displayName networkId. Optional (optional)
  search: search_example,
  // boolean | Exclude your networkIds. Optional, default false (optional)
  excludeSelf: true,
  // boolean | Include just your networkIds. Optional, default false (optional)
  onlySelf: true,
  // boolean | Exclude connected networkIds. Optional, default false (optional)
  excludeConnected: true,
  // string | ID of the record after which to fetch $limit records (optional)
  pageCursor: pageCursor_example,
  // number | Number of records to fetch. By default, it is 50 (optional)
  pageSize: 8.14,
};

fireblocks.networkConnections.searchNetworkIds(body).then((res: FireblocksResponse<SearchNetworkIdsResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **search** | [**string**] | Search string - displayName networkId. Optional | (optional) defaults to undefined
 **excludeSelf** | [**boolean**] | Exclude your networkIds. Optional, default false | (optional) defaults to undefined
 **onlySelf** | [**boolean**] | Include just your networkIds. Optional, default false | (optional) defaults to undefined
 **excludeConnected** | [**boolean**] | Exclude connected networkIds. Optional, default false | (optional) defaults to undefined
 **pageCursor** | [**string**] | ID of the record after which to fetch $limit records | (optional) defaults to undefined
 **pageSize** | [**number**] | Number of records to fetch. By default, it is 50 | (optional) defaults to 50


### Return type

**[SearchNetworkIdsResponse](../models/SearchNetworkIdsResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | A list of network IDs |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **setNetworkIdDiscoverability**
> SetNetworkIdResponse setNetworkIdDiscoverability(setNetworkIdDiscoverabilityRequest, )

Update whether or not the network ID is discoverable by others.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiSetNetworkIdDiscoverabilityRequest, SetNetworkIdResponse } 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: NetworkConnectionsApiSetNetworkIdDiscoverabilityRequest = {
  // SetNetworkIdDiscoverabilityRequest
  setNetworkIdDiscoverabilityRequest: param_value,
  // string | The ID of the network
  networkId: networkId_example,
};

fireblocks.networkConnections.setNetworkIdDiscoverability(body).then((res: FireblocksResponse<SetNetworkIdResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **setNetworkIdDiscoverabilityRequest** | **[SetNetworkIdDiscoverabilityRequest](../models/SetNetworkIdDiscoverabilityRequest.md)**|  |
 **networkId** | [**string**] | The ID of the network | defaults to undefined


### Return type

**[SetNetworkIdResponse](../models/SetNetworkIdResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Network ID |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **setNetworkIdName**
> SetNetworkIdResponse setNetworkIdName(setNetworkIdNameRequest, )

Updates name of a specified network ID.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiSetNetworkIdNameRequest, SetNetworkIdResponse } 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: NetworkConnectionsApiSetNetworkIdNameRequest = {
  // SetNetworkIdNameRequest
  setNetworkIdNameRequest: param_value,
  // string | The ID of the network
  networkId: networkId_example,
};

fireblocks.networkConnections.setNetworkIdName(body).then((res: FireblocksResponse<SetNetworkIdResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **setNetworkIdNameRequest** | **[SetNetworkIdNameRequest](../models/SetNetworkIdNameRequest.md)**|  |
 **networkId** | [**string**] | The ID of the network | defaults to undefined


### Return type

**[SetNetworkIdResponse](../models/SetNetworkIdResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Network ID |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **setNetworkIdRoutingPolicy**
> SetNetworkIdResponse setNetworkIdRoutingPolicy()

Updates the routing policy of a specified network ID.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiSetNetworkIdRoutingPolicyRequest, SetNetworkIdResponse } 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: NetworkConnectionsApiSetNetworkIdRoutingPolicyRequest = {
  // string | The ID of the network
  networkId: networkId_example,
  // SetNetworkIdRoutingPolicyRequest (optional)
  setNetworkIdRoutingPolicyRequest: param_value,
};

fireblocks.networkConnections.setNetworkIdRoutingPolicy(body).then((res: FireblocksResponse<SetNetworkIdResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **setNetworkIdRoutingPolicyRequest** | **[SetNetworkIdRoutingPolicyRequest](../models/SetNetworkIdRoutingPolicyRequest.md)**|  |
 **networkId** | [**string**] | The ID of the network | defaults to undefined


### Return type

**[SetNetworkIdResponse](../models/SetNetworkIdResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Network ID |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)

# **setRoutingPolicy**
> SetRoutingPolicyResponse setRoutingPolicy()

Updates an existing network connection\'s routing policy.

### Example


```typescript
import { readFileSync } from 'fs';
import { Fireblocks, BasePath } from '@fireblocks/ts-sdk';
import type { FireblocksResponse, NetworkConnectionsApiSetRoutingPolicyRequest, SetRoutingPolicyResponse } 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: NetworkConnectionsApiSetRoutingPolicyRequest = {
  // string | The ID of the network connection
  connectionId: connectionId_example,
  // SetRoutingPolicyRequest (optional)
  setRoutingPolicyRequest: param_value,
};

fireblocks.networkConnections.setRoutingPolicy(body).then((res: FireblocksResponse<SetRoutingPolicyResponse>) => {
  console.log('API called successfully. Returned data: ' + JSON.stringify(res, null, 2));
}).catch((error:any) => console.error(error));
```


### Parameters

Name | Type | Description  | Notes
------------- | ------------- | ------------- | -------------
 **setRoutingPolicyRequest** | **[SetRoutingPolicyRequest](../models/SetRoutingPolicyRequest.md)**|  |
 **connectionId** | [**string**] | The ID of the network connection | defaults to undefined


### Return type

**[SetRoutingPolicyResponse](../models/SetRoutingPolicyResponse.md)**

### Authorization

No authorization required

### HTTP request headers

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


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
**200** | Network ID |  * X-Request-ID -  <br>  |
**0** | Error Response |  * X-Request-ID -  <br>  |

[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)


