Skip to content

Latest commit

 

History

History
80 lines (51 loc) · 2.07 KB

File metadata and controls

80 lines (51 loc) · 2.07 KB

fireblocks.WorkspaceApi

All URIs are relative to https://api.fireblocks.io/v1

Method HTTP request Description
get_workspace GET /workspace Get workspace

get_workspace

Workspace get_workspace()

Get workspace

Returns the workspace ID and name for the authenticated user.

Example

from fireblocks.models.workspace import Workspace
from fireblocks.client import Fireblocks
from fireblocks.client_configuration import ClientConfiguration
from fireblocks.exceptions import ApiException
from fireblocks.base_path import BasePath
from pprint import pprint

# load the secret key content from a file
with open('your_secret_key_file_path', 'r') as file:
    secret_key_value = file.read()

# build the configuration
configuration = ClientConfiguration(
        api_key="your_api_key",
        secret_key=secret_key_value,
        base_path=BasePath.Sandbox, # or set it directly to a string "https://sandbox-api.fireblocks.io/v1"
)


# Enter a context with an instance of the API client
with Fireblocks(configuration) as fireblocks:

    try:
        # Get workspace
        api_response = fireblocks.workspace.get_workspace().result()
        print("The response of WorkspaceApi->get_workspace:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling WorkspaceApi->get_workspace: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

Workspace

Authorization

No authorization required

HTTP request headers

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

HTTP response details

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

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