> 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/public/get-public-file.md).

# Get Public File

Get Public File.

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 returns a single public file by id.

This method is on the runtime **API** surface (`norbix.api.files`) — call it from your app.

{% 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 %}

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

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

const result = await norbix.api.files.getPublicFile({
  publicId: 'public_4kX9mQvR2tYw7ZbC1dFgHj',
  name: 'orders-summary',
});
```

{% endtab %}

{% tab title=".NET" %}

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

using var client = new NorbixClient();

var result = await client.Files.GetPublicFileAsync(new GetPublicFileRequest
{
    PublicId = "public_4kX9mQvR2tYw7ZbC1dFgHj",
    Name = "orders-summary",
});
```

{% endtab %}

{% tab title="Python" %}

```python
from norbix_python import NorbixApi

norbix = NorbixApi()

result = norbix.files.get_public_file(
    publicId="public_4kX9mQvR2tYw7ZbC1dFgHj",
    name="orders-summary",
)
```

{% endtab %}

{% tab title="Go" %}

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

var result map[string]any
err := c.API.Files.GetPublicFile(ctx, "public_4kX9mQvR2tYw7ZbC1dFgHj", map[string]any{
	"name": "orders-summary",
}, &result)
```

{% endtab %}

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

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

final api = NorbixApi();

final result = await api.files.getPublicFile(publicId: 'public_4kX9mQvR2tYw7ZbC1dFgHj', body: {
  'name': 'orders-summary',
});
```

{% endtab %}

{% tab title="Swift" %}

```swift
import NorbixApi

let client = try NorbixApiClient()

let result = try await client.files.getPublicFile([
    "publicId": "public_4kX9mQvR2tYw7ZbC1dFgHj",
    "name": "orders-summary",
])
```

{% endtab %}

{% tab title="Kotlin" %}

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

val api = NorbixApi()

val result = api.files.getPublicFile(mapOf(
    "publicId" to "public_4kX9mQvR2tYw7ZbC1dFgHj",
    "name" to "orders-summary",
))
```

{% endtab %}

{% tab title="CLI" %}

```sh
norbix api fs public file get --publicId public_4kX9mQvR2tYw7ZbC1dFgHj --name orders-summary
```

{% endtab %}
{% endtabs %}

## In Cloud

Manage this visually in Cloud — see [Files → Public](/codemash/cloud/files.md).

## API reference

Full request and response for this endpoint: [Get Public File](/codemash/api-reference/files/public/get-public-file.md).
