---
title: FsApi
summary: .NET SDK: the Fs - FileSystem operations, 16 methods, each with its parameters, result and a complete example.
order: 17
languages: [csharp]
sdk-package: .NET SDK · BIMworks.Sdk
link-terms: true
---

# FsApi

[[page:reference/sdk/dotnet|.NET SDK]] · `BIMworks.Sdk.Api` · class · 16 methods

BIM.works repository's virtual filesystem related calls.

Construct it with the client of [[page:reference/sdk/dotnet#connect|the connect step]]: `client.GetRequiredService<IFsApi>()`. Each method is one operation of the [[page:api|API part]], where it runs on its page.

<table class="dense">
<thead><tr><th>Method</th><th>Operation</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#createnode|CreateNodeAsync]]</code></td><td>[[openapi:CreateNode]]</td><td>Create a new Node</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#deletenode|DeleteNodeAsync]]</code></td><td>[[openapi:DeleteNode]]</td><td>Delete a Node</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#deletenodeerror|DeleteNodeErrorAsync]]</code></td><td>[[openapi:DeleteNodeError]]</td><td>Clear an error of a Node</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#deleteversion|DeleteVersionAsync]]</code></td><td>[[openapi:DeleteVersion]]</td><td>Delete a Version of a Node</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#downloadaszip|DownloadAsZipAsync]]</code></td><td>[[openapi:DownloadAsZip]]</td><td>Download a folder Node and everything below it as a ZIP file</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#getnode|GetNodeAsync]]</code></td><td>[[openapi:GetNode]]</td><td>Get Node based on a given path, by its UUID or by the UUID of one of its Versions.</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#getrootnodeuuid|GetRootNodeUuidAsync]]</code></td><td>[[openapi:GetRootNodeUuid]]</td><td>Get the UUID of the current root Node.</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#getversion|GetVersionAsync]]</code></td><td>[[openapi:GetVersion]]</td><td>Get a Version by its UUID</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#listnodeerrors|ListNodeErrorsAsync]]</code></td><td>[[openapi:ListNodeErrors]]</td><td>Get the errors of the given Node</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#listnodes|ListNodesAsync]]</code></td><td>[[openapi:ListNodes]]</td><td>Get a list of Nodes that are children of the given Node</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#listnodesrecursive|ListNodesRecursiveAsync]]</code></td><td>[[openapi:ListNodesRecursive]]</td><td>Get all Nodes below the given Node, recursively</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#listversions|ListVersionsAsync]]</code></td><td>[[openapi:ListVersions]]</td><td>Get a list of all the Versions of the given Node, or the given Versions</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#movenode|MoveNodeAsync]]</code></td><td>[[openapi:MoveNode]]</td><td>Move a Node to another parent folder</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#undeletenode|UndeleteNodeAsync]]</code></td><td>[[openapi:UndeleteNode]]</td><td>Restore a previously deleted Node</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#updatenode|UpdateNodeAsync]]</code></td><td>[[openapi:UpdateNode]]</td><td>Update a Node</td></tr>
<tr><td><code>[[page:reference/sdk/dotnet/fsapi#updateversion|UpdateVersionAsync]]</code></td><td>[[openapi:UpdateVersion]]</td><td>Change a Version's disciplines or alignment</td></tr>
</tbody>
</table>

## `CreateNodeAsync` {#createnode}

```csharp
Task<ICreateNodeApiResponse> CreateNodeAsync(CreateNodeRequest createNodeRequest, CancellationToken cancellationToken = default)
```

Create a new Node.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:CreateNode]] · <code>POST /openapi/fs/CreateNode</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:write]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>createNodeRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#CreateNodeRequest|CreateNodeRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:CreateNode]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>[[page:reference/sdk/dotnet/models#Node|Node]]</code> — The new Node

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<CreateNodeRequest>("""
    {
      "name": "",
      "folder": false,
      "input_file_type": "IFC",
      "parent_node_uuid": "00000000-0000-0000-0000-000000000000",
      "allow_existing": false
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().CreateNodeAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `DeleteNodeAsync` {#deletenode}

```csharp
Task<IDeleteNodeApiResponse> DeleteNodeAsync(DeleteNodeRequest deleteNodeRequest, CancellationToken cancellationToken = default)
```

Delete a Node. Deletes the given Node, named by uuid or by path. This is a soft delete, a deleted Node can be restored with UndeleteNode. The Root Node of the current token cannot be deleted. With if_exists a Node that does not exist is no error.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:DeleteNode]] · <code>POST /openapi/fs/DeleteNode</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:write]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>deleteNodeRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#DeleteNodeRequest|DeleteNodeRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:DeleteNode]]'s request body.</td></tr>
</tbody>
</table>

### Returns

Nothing: the operation answers without a body (The Node was deleted).

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<DeleteNodeRequest>("""
    {
      "uuid": "BIM_WORKS_FIRST_MODEL"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().DeleteNodeAsync(request);

// 4. The result
// (DeleteNode answers no content: the call returns once it succeeded and throws an HttpRequestException otherwise)
if (!response.IsSuccessStatusCode) throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine("Done");
```

## `DeleteNodeErrorAsync` {#deletenodeerror}

```csharp
Task<IDeleteNodeErrorApiResponse> DeleteNodeErrorAsync(DeleteNodeErrorRequest deleteNodeErrorRequest, CancellationToken cancellationToken = default)
```

Clear an error of a Node. Removes an error record (a failed upload or checkin, see ListNodeErrors) once its cause is dealt with. Needs write rights on the Node.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:DeleteNodeError]] · <code>POST /openapi/fs/DeleteNodeError</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:write]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>deleteNodeErrorRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#DeleteNodeErrorRequest|DeleteNodeErrorRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:DeleteNodeError]]'s request body.</td></tr>
</tbody>
</table>

### Returns

Nothing: the operation answers without a body (The error is cleared).

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<DeleteNodeErrorRequest>("""
    {
      "node_uuid": "00000000-0000-0000-0000-000000000000",
      "error_uuid": "00000000-0000-0000-0000-000000000000"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().DeleteNodeErrorAsync(request);

// 4. The result
// (DeleteNodeError answers no content: the call returns once it succeeded and throws an HttpRequestException otherwise)
if (!response.IsSuccessStatusCode) throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine("Done");
```

## `DeleteVersionAsync` {#deleteversion}

```csharp
Task<IDeleteVersionApiResponse> DeleteVersionAsync(DeleteVersionRequest deleteVersionRequest, CancellationToken cancellationToken = default)
```

Delete a Version of a Node. Only the last Version of a Node can be deleted, intermediate Versions must stay available.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:DeleteVersion]] · <code>POST /openapi/fs/DeleteVersion</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:write]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>deleteVersionRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#DeleteVersionRequest|DeleteVersionRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:DeleteVersion]]'s request body.</td></tr>
</tbody>
</table>

### Returns

Nothing: the operation answers without a body (The Version was deleted).

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<DeleteVersionRequest>("""
    {
      "node_uuid": "00000000-0000-0000-0000-000000000000",
      "version_uuid": "BIM_WORKS_FIRST_MODEL"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().DeleteVersionAsync(request);

// 4. The result
// (DeleteVersion answers no content: the call returns once it succeeded and throws an HttpRequestException otherwise)
if (!response.IsSuccessStatusCode) throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine("Done");
```

## `DownloadAsZipAsync` {#downloadaszip}

```csharp
Task<IDownloadAsZipApiResponse> DownloadAsZipAsync(DownloadAsZipRequest downloadAsZipRequest, CancellationToken cancellationToken = default)
```

Download a folder Node and everything below it as a ZIP file. The ZIP file contains the original model files of the last Version of every Node below the given folder Node, with their tree paths as ZIP entry paths. With `format` `ZIP_ZST` the same ZIP comes compressed as a whole with zstd, a `.zip.zst` file.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:DownloadAsZip]] · <code>POST /openapi/fs/DownloadAsZip</code></td></tr>
<tr><th>Scope</th><td>[[scope:model:read]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>downloadAsZipRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#DownloadAsZipRequest|DownloadAsZipRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:DownloadAsZip]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>Stream</code> — The ZIP file, or with <code>format</code> <code>ZIP_ZST</code> the zstd-compressed ZIP file

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<DownloadAsZipRequest>("""
    {
      "uuid": "BIM_WORKS_FIRST_MODEL",
      "include_deleted": false,
      "format": "ZIP"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().DownloadAsZipAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
using var output = File.Create("download-as-zip.zip");
await result.CopyToAsync(output);
```

## `GetNodeAsync` {#getnode}

```csharp
Task<IGetNodeApiResponse> GetNodeAsync(GetNodeRequest getNodeRequest, CancellationToken cancellationToken = default)
```

Get Node based on a given path, by its UUID or by the UUID of one of its Versions. A path is always relative to the Root Node of the used Token.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:GetNode]] · <code>POST /openapi/fs/GetNode</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:read]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>getNodeRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#GetNodeRequest|GetNodeRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:GetNode]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>[[page:reference/sdk/dotnet/models#Node|Node]]</code> — All information of the Node on this path

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<GetNodeRequest>("""
    {
      "path": "",
      "uuid": "BIM_WORKS_FIRST_MODEL",
      "version_uuid": "BIM_WORKS_FIRST_MODEL"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().GetNodeAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `GetRootNodeUuidAsync` {#getrootnodeuuid}

```csharp
Task<IGetRootNodeUuidApiResponse> GetRootNodeUuidAsync(CancellationToken cancellationToken = default)
```

Get the UUID of the current root Node. This depends on the API Token/Auth Token that is being used.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:GetRootNodeUuid]] · <code>GET /openapi/fs/GetRootNodeUuid</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:read]]</td></tr>
</tbody>
</table>

### Parameters

None: the operation takes no request.

### Returns

<code>Guid</code> — The UUID of the Root Node

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
// (GetRootNodeUuid takes no request)

// 3. The call
var response = await client.GetRequiredService<IFsApi>().GetRootNodeUuidAsync();

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `GetVersionAsync` {#getversion}

```csharp
Task<IGetVersionApiResponse> GetVersionAsync(GetVersionRequest getVersionRequest, CancellationToken cancellationToken = default)
```

Get a Version by its UUID.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:GetVersion]] · <code>POST /openapi/fs/GetVersion</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:read]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>getVersionRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#GetVersionRequest|GetVersionRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:GetVersion]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>[[page:reference/sdk/dotnet/models#ModelVersion|ModelVersion]]</code> — Version information

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<GetVersionRequest>("""
    {
      "uuid": "BIM_WORKS_FIRST_MODEL"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().GetVersionAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `ListNodeErrorsAsync` {#listnodeerrors}

```csharp
Task<IListNodeErrorsApiResponse> ListNodeErrorsAsync(ListNodeErrorsRequest listNodeErrorsRequest, CancellationToken cancellationToken = default)
```

Get the errors of the given Node. Model uploads are processed asynchronously. When processing fails, the resulting errors can be retrieved with this call. Errors are sorted oldest first.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:ListNodeErrors]] · <code>POST /openapi/fs/ListNodeErrors</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:read]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>listNodeErrorsRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#ListNodeErrorsRequest|ListNodeErrorsRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:ListNodeErrors]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>List&lt;[[page:reference/sdk/dotnet/models#ModelError|ModelError]]&gt;</code> — The errors of the given Node

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<ListNodeErrorsRequest>("""
    {
      "uuid": "BIM_WORKS_FIRST_MODEL"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().ListNodeErrorsAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `ListNodesAsync` {#listnodes}

```csharp
Task<IListNodesApiResponse> ListNodesAsync(ListNodesRequest listNodesRequest, CancellationToken cancellationToken = default)
```

Get a list of Nodes that are children of the given Node.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:ListNodes]] · <code>POST /openapi/fs/ListNodes</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:read]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>listNodesRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#ListNodesRequest|ListNodesRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:ListNodes]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>List&lt;[[page:reference/sdk/dotnet/models#Node|Node]]&gt;</code> — All information of the sub Nodes of the provided Node

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<ListNodesRequest>("""
    {
      "path": "",
      "uuid": "BIM_WORKS_FIRST_MODEL",
      "version_uuid": "BIM_WORKS_FIRST_MODEL",
      "show_deleted_nodes": false
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().ListNodesAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `ListNodesRecursiveAsync` {#listnodesrecursive}

```csharp
Task<IListNodesRecursiveApiResponse> ListNodesRecursiveAsync(ListNodesRecursiveRequest listNodesRecursiveRequest, CancellationToken cancellationToken = default)
```

Get all Nodes below the given Node, recursively. Returns the given Node and all Nodes below it. Use caution on large trees, there is no pagination.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:ListNodesRecursive]] · <code>POST /openapi/fs/ListNodesRecursive</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:read]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>listNodesRecursiveRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#ListNodesRecursiveRequest|ListNodesRecursiveRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:ListNodesRecursive]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>List&lt;[[page:reference/sdk/dotnet/models#Node|Node]]&gt;</code> — The Node and all Nodes below it

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<ListNodesRecursiveRequest>("""
    {
      "uuid": "BIM_WORKS_FIRST_MODEL"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().ListNodesRecursiveAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `ListVersionsAsync` {#listversions}

```csharp
Task<IListVersionsApiResponse> ListVersionsAsync(ListVersionsRequest listVersionsRequest, CancellationToken cancellationToken = default)
```

Get a list of all the Versions of the given Node, or the given Versions. Name the Node with one of path, uuid and version_uuid (a Version of the Node), or pass version_uuids to get those Versions, which may belong to different Nodes. Each Version needs read rights.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:ListVersions]] · <code>POST /openapi/fs/ListVersions</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:read]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>listVersionsRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#ListVersionsRequest|ListVersionsRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:ListVersions]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>List&lt;[[page:reference/sdk/dotnet/models#ModelVersion|ModelVersion]]&gt;</code> — All information of the Versions of the given Node, or of the given Versions

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<ListVersionsRequest>("""
    {
      "uuid": "BIM_WORKS_FIRST_MODEL"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().ListVersionsAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `MoveNodeAsync` {#movenode}

```csharp
Task<IMoveNodeApiResponse> MoveNodeAsync(MoveNodeRequest moveNodeRequest, CancellationToken cancellationToken = default)
```

Move a Node to another parent folder. Moves the given Node under a new parent Node. The target Node must be a folder. Renaming is done with UpdateNode.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:MoveNode]] · <code>POST /openapi/fs/MoveNode</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:write]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>moveNodeRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#MoveNodeRequest|MoveNodeRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:MoveNode]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>[[page:reference/sdk/dotnet/models#Node|Node]]</code> — The moved Node

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<MoveNodeRequest>("""
    {
      "uuid": "BIM_WORKS_FIRST_MODEL",
      "target_parent_uuid": "00000000-0000-0000-0000-000000000000"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().MoveNodeAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `UndeleteNodeAsync` {#undeletenode}

```csharp
Task<IUndeleteNodeApiResponse> UndeleteNodeAsync(UndeleteNodeRequest undeleteNodeRequest, CancellationToken cancellationToken = default)
```

Restore a previously deleted Node.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:UndeleteNode]] · <code>POST /openapi/fs/UndeleteNode</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:write]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>undeleteNodeRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#UndeleteNodeRequest|UndeleteNodeRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:UndeleteNode]]'s request body.</td></tr>
</tbody>
</table>

### Returns

Nothing: the operation answers without a body (The Node was restored).

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<UndeleteNodeRequest>("""
    {
      "uuid": "BIM_WORKS_FIRST_MODEL"
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().UndeleteNodeAsync(request);

// 4. The result
// (UndeleteNode answers no content: the call returns once it succeeded and throws an HttpRequestException otherwise)
if (!response.IsSuccessStatusCode) throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine("Done");
```

## `UpdateNodeAsync` {#updatenode}

```csharp
Task<IUpdateNodeApiResponse> UpdateNodeAsync(UpdateNodeRequest updateNodeRequest, CancellationToken cancellationToken = default)
```

Update a Node.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:UpdateNode]] · <code>POST /openapi/fs/UpdateNode</code></td></tr>
<tr><th>Scope</th><td>[[scope:fs:write]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>updateNodeRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#UpdateNodeRequest|UpdateNodeRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:UpdateNode]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>[[page:reference/sdk/dotnet/models#Node|Node]]</code> — The updated Node

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<UpdateNodeRequest>("""
    {
      "path": "",
      "uuid": "BIM_WORKS_FIRST_MODEL",
      "version_uuid": "BIM_WORKS_FIRST_MODEL",
      "name": "",
      "user_data": {}
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().UpdateNodeAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```

## `UpdateVersionAsync` {#updateversion}

```csharp
Task<IUpdateVersionApiResponse> UpdateVersionAsync(UpdateVersionRequest updateVersionRequest, CancellationToken cancellationToken = default)
```

Change a Version's disciplines or alignment. Changes the fields that are passed in one transaction; the others stay as they are. `disciplines: []` clears the disciplines, `clear: [alignment]` the alignment. Needs write rights on the Version.

<table class="dense">
<tbody>
<tr><th>Operation</th><td>[[openapi:UpdateVersion]] · <code>POST /openapi/fs/UpdateVersion</code></td></tr>
<tr><th>Scope</th><td>[[scope:model:write]]</td></tr>
</tbody>
</table>

### Parameters

<table class="dense">
<thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead>
<tbody>
<tr><td><code>updateVersionRequest</code></td><td><code>[[page:reference/sdk/dotnet/models#UpdateVersionRequest|UpdateVersionRequest]]</code><span class="req">required</span></td><td>The request: its properties are those of the model, its JSON that of [[openapi:UpdateVersion]]'s request body.</td></tr>
</tbody>
</table>

### Returns

<code>[[page:reference/sdk/dotnet/models#ModelVersion|ModelVersion]]</code> — The Version as it is now

### Example

```csharp
using System.Text.Json;
using BIMworks.Sdk.Api;
using BIMworks.Sdk.Client;
using BIMworks.Sdk.Extensions;
using BIMworks.Sdk.Model;
using Microsoft.Extensions.DependencyInjection;

// 1. Connect to BIM.works and log in with your API token
IServiceProvider Connect(string bearer)
{
    var services = new ServiceCollection();
    services.AddApi(options =>
    {
        options.AddTokens(new BearerToken(bearer));
        options.AddApiHttpClients(http =>
        {
            http.BaseAddress = new Uri("BIM_WORKS_ADDRESS" + "/openapi");
            http.Timeout = Timeout.InfiniteTimeSpan;
        });
    });
    return services.BuildServiceProvider();
}
var login = await Connect("").GetRequiredService<IAuthApi>().LoginWithApiTokenAsync(new LoginWithApiTokenRequest("BIM_WORKS_API_TOKEN"));
var auth = login.Ok()?.Auth ?? throw new HttpRequestException(login.RawContent, null, login.StatusCode);
var client = Connect(auth.Base64);
var json = client.GetRequiredService<JsonSerializerOptionsProvider>().Options;

// 2. The request
var request = JsonSerializer.Deserialize<UpdateVersionRequest>("""
    {
      "version_uuid": "BIM_WORKS_FIRST_MODEL",
      "disciplines": [
        "STRUCTURAL",
        "ARCHITECTURAL"
      ]
    }
    """, json);

// 3. The call
var response = await client.GetRequiredService<IFsApi>().UpdateVersionAsync(request);

// 4. The result
var result = response.Ok() ?? throw new HttpRequestException(response.RawContent, null, response.StatusCode);
Console.WriteLine(JsonSerializer.Serialize(result, json));
```
