> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/sdks/files/test/test-files-integration.md).

# Test Files Integration

Test Files Integration.

The Files module provides cloud storage and file management — upload, download, access control, metadata, and CDN-backed delivery. Files can be referenced from Database records and follow the same identity and permission rules as the rest of the project. This method checks that a saved files integration really works: it uploads a small file, reads it back, lists the folder and deletes the file again, and answers one result per step.

This method is on the runtime **API** surface (`norbix.api.files`) — call it from your app, a deploy script or a health check. The Hub client has a method with the same name for Cloud; this one takes the integration id in the address.

{% hint style="info" %}
These examples assume the SDK is installed and your credentials are set as environment variables — each client reads them automatically, so the constructors below take no arguments. See [Install a Norbix SDK](/codemash/sdks/install.md).
{% endhint %}

{% hint style="warning" %}
The test writes a real file to your storage (and deletes it again), so the key needs `files:create` on the integration — `files:read` is not enough.
{% endhint %}

{% tabs %}
{% tab title="JavaScript / TypeScript" %}

```ts
import { Norbix } from '@norbix.ai/ts';
const norbix = new Norbix();

const result = await norbix.api.files.testFilesIntegration({
  filesIntegrationId: 'int_4kX9mQvR2tYw7ZbC1dFgHj',
});
for (const step of result.items ?? []) console.log(step.operation, step.result);
```

{% endtab %}

{% tab title=".NET" %}

```csharp
using Norbix.Sdk;
using Norbix.Sdk.Types.Api;

using var client = new NorbixClient();

var result = await client.Files.TestFilesIntegrationAsync(new TestFilesIntegrationRequest
{
    FilesIntegrationId = "int_4kX9mQvR2tYw7ZbC1dFgHj",
});
```

{% endtab %}

{% tab title="Python" %}

```python
from norbix_python import NorbixApi

norbix = NorbixApi()

result = norbix.files.test_files_integration("int_4kX9mQvR2tYw7ZbC1dFgHj")
```

{% endtab %}

{% tab title="Go" %}

```go
c, _ := norbix.New(norbix.Options{})
ctx := context.Background()

var result map[string]any
err := c.API.Files.TestFilesIntegration(ctx, "int_4kX9mQvR2tYw7ZbC1dFgHj", map[string]any{}, &result)
```

{% endtab %}

{% tab title="Dart / Flutter" %}

```dart
import 'package:norbix/norbix_api.dart';

final api = NorbixApi();

final result = await api.files.testFilesIntegration(filesIntegrationId: 'int_4kX9mQvR2tYw7ZbC1dFgHj');
```

{% endtab %}

{% tab title="Swift" %}

```swift
import NorbixApi

let client = try NorbixApiClient()

let result = try await client.files.testFilesIntegration(integrationId: "int_4kX9mQvR2tYw7ZbC1dFgHj")
```

{% endtab %}

{% tab title="Kotlin" %}

```kotlin
import ai.norbix.sdk.api.NorbixApi

val api = NorbixApi()

val result = api.files.testFilesIntegration(mapOf(
    "filesIntegrationId" to "int_4kX9mQvR2tYw7ZbC1dFgHj",
))
```

{% endtab %}

{% tab title="CLI" %}

```sh
norbix files integrations test int_4kX9mQvR2tYw7ZbC1dFgHj
```

{% endtab %}
{% endtabs %}

## What comes back

One item per step, in this order: `UploadFile`, `GetFile`, `GetAllFiles`, `DeleteFile`. Each has `operation`, `result` — `OK`, `FAILED`, or `NOT_TESTED` (skipped because an earlier step failed) — and, for a failed step, `errors` with the provider's messages. The outcome is also saved on the integration, the same as Cloud's **Test** button.

## In Cloud

The **Test** button on [Files → Integrations](/codemash/cloud/files/integrations.md) runs the same check.

## API reference

Full request and response for this endpoint: [Test Files Integration](/codemash/api-reference/files/test/test-files-integration.md).
