---
title: BimWorksClient
summary: Class in BIM.works_SDK.
order: 10
languages: [csharp]
sdk-package: .NET · BIM.works_SDK
---

# BimWorksClient

[[page:reference/dotnet/api|API catalogue]] · `BIM.works_SDK` · Class

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public class BimWorksClient : IDisposable
````

The main object to interact with a BIM.works Repository, this object should be created by the [[page:reference/dotnet/bim-works-sdk/bimworksclientfactory-6a18d580|BimWorksClientFactory]]

## Inheritance and interfaces

- `System.Object`
- `System.IDisposable`

## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-ctor-989b34db7ffe|BimWorksClient(Uri)]] | Constructor | Protected constructor, this object should be created by the BimWorksClientFactory |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-ctor-67f768d9eef1|BimWorksClient(Uri, ClientIdentity)]] | Constructor | Protected constructor, this object should be created by the BimWorksClientFactory |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-actions-b6c2a6ddc501|Actions]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-admin-526a3839a84e|Admin]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-auth-5ef76fbec2a6|Auth]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-authtoken-c6d0e132cad6|AuthToken]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-bim-ee1864f07880|Bim]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-checks-fce07e1a3cef|Checks]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-client-2ba62303d419|Client]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-close-e7d9cdc06cde|Close()]] | Method | Close this client. It is important to close clients that are not used anymore to avoid resource consumption on both the client and the server |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-connectwebsocket-30ad4317e551|ConnectWebSocket()]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-createasynctask-cf0309296b48|CreateAsyncTask(Request)]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-createexception-dddbfef54bd1|CreateException(JsonElement)]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-createhttpexception-4c812d7d5455|CreateHttpException(HttpResponseMessage)]] | Method | The exception for an HTTP answer that is not a success: the server's error when the body carries one, else the HTTP status |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-dispose-958c401b0693|Dispose()]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-execute-90a49ddcca5c|Execute(AsyncTask)]] | Method | Method to execute a Request. Generally end-users should not call this method directly, but should use the namespaced/typed API calls. |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-execute-203ef9e56842|Execute(Request)]] | Method | Method to execute a Request. Generally end-users should not call this method directly, but should use the namespaced/typed API calls. |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-fs-975dba3a84a0|Fs]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-getaddress-7d4df7b72639|GetAddress()]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-getauthtoken-c2a4a025ad33|GetAuthToken()]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-getendpointid-a24d63e51955|GetEndPointId()]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-gethttpclient-85b383184f03|GetHttpClient()]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-gettask-bb92da9e1e47|GetTask(Guid)]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-gis-cbc282440ef7|Gis]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-identity-781b761cbf53|Identity]] | Field | What this client says it is on every request (X-BIMworks-Client, User-Agent) and on its WebSocket |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-info-660fa102ad8d|Info]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-querydelegated-014c53b292bb|QueryDelegated(ISet&lt;Guid&gt;, BimQueryV1, ISet&lt;string&gt;, TimeSpan)]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-querywithtoken-1b541dd4d09f|QueryWithToken(AuthToken)]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-setauthtoken-b6bb446a8643|SetAuthToken(AuthToken)]] | Method |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-tokens-2b6b2fd7f123|Tokens]] | Field |  |
| [[page:reference/dotnet/bim-works-sdk/bimworksclient-38b8aecc#member-upload-7f0691c02c63|Upload]] | Field |  |

## `BimWorksClient(Uri)` {#member-ctor-989b34db7ffe}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
protected BimWorksClient(Uri address)
````

Protected constructor, this object should be created by the BimWorksClientFactory

### Parameters

| Name | Type | Description |
|---|---|---|
| `address` | `System.Uri` |  |

## `BimWorksClient(Uri, ClientIdentity)` {#member-ctor-67f768d9eef1}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
protected BimWorksClient(Uri address, ClientIdentity identity)
````

Protected constructor, this object should be created by the BimWorksClientFactory

### Parameters

| Name | Type | Description |
|---|---|---|
| `address` | `System.Uri` |  |
| `identity` | [[page:reference/dotnet/bim-works-sdk/clientidentity-970af72e|ClientIdentity]] |  |

## `Actions` {#member-actions-b6c2a6ddc501}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Actions Actions
````



## `Admin` {#member-admin-526a3839a84e}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Admin Admin
````



## `Auth` {#member-auth-5ef76fbec2a6}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Auth Auth
````



## `AuthToken` {#member-authtoken-c6d0e132cad6}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public AuthToken AuthToken
````



## `Bim` {#member-bim-ee1864f07880}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Bim Bim
````



## `Checks` {#member-checks-fce07e1a3cef}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Checks Checks
````



## `Client` {#member-client-2ba62303d419}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public HttpClient Client
````



## `Close()` {#member-close-e7d9cdc06cde}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public void Close()
````

Close this client. It is important to close clients that are not used anymore to avoid resource consumption on both the client and the server

## `ConnectWebSocket()` {#member-connectwebsocket-30ad4317e551}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public void ConnectWebSocket()
````



## `CreateAsyncTask(Request)` {#member-createasynctask-cf0309296b48}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public AsyncTask CreateAsyncTask(Request request)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `request` | [[page:reference/dotnet/bim-works-sdk/request-0158d899|Request]] |  |

## `CreateException(JsonElement)` {#member-createexception-dddbfef54bd1}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public Exception CreateException(JsonElement error)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `error` | `System.Text.Json.JsonElement` |  |

## `CreateHttpException(HttpResponseMessage)` {#member-createhttpexception-4c812d7d5455}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public Exception CreateHttpException(HttpResponseMessage response)
````

The exception for an HTTP answer that is not a success: the server's error when the body carries one, else the HTTP status

### Parameters

| Name | Type | Description |
|---|---|---|
| `response` | `System.Net.Http.HttpResponseMessage` |  |

## `Dispose()` {#member-dispose-958c401b0693}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public virtual void Dispose()
````



## `Execute(AsyncTask)` {#member-execute-90a49ddcca5c}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public AsyncTask Execute(AsyncTask asyncTask)
````

Method to execute a Request. Generally end-users should not call this method directly, but should use the namespaced/typed API calls.

### Parameters

| Name | Type | Description |
|---|---|---|
| `asyncTask` | [[page:reference/dotnet/bim-works-sdk/asynctask-86c57ccc|AsyncTask]] |  |

## `Execute(Request)` {#member-execute-203ef9e56842}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public Response Execute(Request request)
````

Method to execute a Request. Generally end-users should not call this method directly, but should use the namespaced/typed API calls.

### Parameters

| Name | Type | Description |
|---|---|---|
| `request` | [[page:reference/dotnet/bim-works-sdk/request-0158d899|Request]] |  |

## `Fs` {#member-fs-975dba3a84a0}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Fs Fs
````



## `GetAddress()` {#member-getaddress-7d4df7b72639}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public Uri GetAddress()
````



## `GetAuthToken()` {#member-getauthtoken-c2a4a025ad33}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public AuthToken GetAuthToken()
````



## `GetEndPointId()` {#member-getendpointid-a24d63e51955}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public string GetEndPointId()
````



## `GetHttpClient()` {#member-gethttpclient-85b383184f03}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public HttpClient GetHttpClient()
````



## `GetTask(Guid)` {#member-gettask-bb92da9e1e47}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public AsyncTask GetTask(Guid uuid)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `uuid` | `System.Guid` |  |

## `Gis` {#member-gis-cbc282440ef7}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Gis Gis
````



## `Identity` {#member-identity-781b761cbf53}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly ClientIdentity Identity
````

What this client says it is on every request (X-BIMworks-Client, User-Agent) and on its WebSocket

## `Info` {#member-info-660fa102ad8d}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Info Info
````



## `QueryDelegated(ISet<Guid>, BimQueryV1, ISet<string>, TimeSpan)` {#member-querydelegated-014c53b292bb}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public AuthToken QueryDelegated(ISet<Guid> versionIds, BimQueryV1 bimQuery, ISet<string> features, TimeSpan timeSpan)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `versionIds` | `System.Collections.Generic.ISet{System.Guid}` |  |
| `bimQuery` | [[page:reference/dotnet/bim-works-sdk/bimqueryv1-34745544|BimQueryV1]] |  |
| `features` | `System.Collections.Generic.ISet{System.String}` |  |
| `timeSpan` | `System.TimeSpan` |  |

## `QueryWithToken(AuthToken)` {#member-querywithtoken-1b541dd4d09f}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public JsonElement QueryWithToken(AuthToken token)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `token` | [[page:reference/dotnet/bim-works-sdk/authtoken-dc72e245|AuthToken]] |  |

## `SetAuthToken(AuthToken)` {#member-setauthtoken-b6bb446a8643}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public void SetAuthToken(AuthToken authToken)
````



### Parameters

| Name | Type | Description |
|---|---|---|
| `authToken` | [[page:reference/dotnet/bim-works-sdk/authtoken-dc72e245|AuthToken]] |  |

## `Tokens` {#member-tokens-2b6b2fd7f123}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Tokens Tokens
````



## `Upload` {#member-upload-7f0691c02c63}

````csharp sdk=dotnet sdk-namespace="BIM.works_SDK"
public readonly Upload Upload
````



## Inherited members

- `System.Object.Equals(System.Object)`
- `System.Object.Equals(System.Object,System.Object)`
- `System.Object.GetHashCode`
- `System.Object.GetType`
- `System.Object.MemberwiseClone`
- `System.Object.ReferenceEquals(System.Object,System.Object)`
- `System.Object.ToString`
