# Get Function

`GET /functions/{name}` · Core · Compute & Automation

Retrieves the full registry entry for a single named function in the specified project, including `status`, `tier`, `runtime`, `version`, `source`, `deployed_at`, and `error_detail`. When `status` is `error`, `error_detail` contains a human-readable description of the deployment failure. Requires `PROJECT_ADMIN` minimum.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `name` | path | yes | The function's name. A module's operation is named `<module>:<operation>`. Example: `"greet"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | object | yes | A deployed function: its runtime, tier, version and status. |
| `data.id` | string (uuid) | yes | The function's id, a UUID. It stays the same across redeploys. |
| `data.name` | string | yes | The function's name. A module's operations are named `<module>:<operation>`. |
| `data.runtime` | enum ("bun", "rust", "go", "tinygo", "zig", "assemblyscript", "c", "cpp") | yes | The language runtime: `bun`, `rust`, `go`, `tinygo`, `zig`, `assemblyscript`, `c` or `cpp`. |
| `data.tier` | enum ("gateway", "sandbox") | yes | Where the function runs: `gateway` or `sandbox`. |
| `data.entryPoint` | string | yes | The artifact key of the deployed code. |
| `data.version` | string | yes | The version label of the deploy. |
| `data.status` | enum ("deploying", "active", "error", "retired") | yes | `deploying` while the code is prepared, `active` once it can be invoked, `error` when preparing it failed (see `errorDetail`), `retired` after it was deleted. |
| `data.source` | string | yes | Who manages the function: `developer` for one you deployed, `extension:<slug>` for one an installed extension owns. |
| `data.description` | object | yes | What the function does. Null when none was given. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.createdAt` | string (date-time) | yes | When the function was first deployed. |
| `data.deployedAt` | object | yes | When the current deploy became active. Null while it is deploying. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.retiredAt` | object | yes | When the function was retired. Null unless `status` is `retired`. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.errorDetail` | object | yes | Why the deploy failed. Null unless `status` is `error`. |
| _one of_ | | |  |
| _or_ | | |  |
| `meta` | object | yes |  |


## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_INVALID_CREDENTIALS` | The request credentials are missing or invalid. |
| 401 | `K9O_SESSION_EXPIRED` | Your session has expired; sign in again to continue. |
| 403 | `K9O_ACCESS_DENIED` | Your role does not grant access to read function details for this project. |
| 404 | `K9O_FUNCTION_NOT_FOUND` | No function with that name exists in this project, or it has been retired. |

## Code samples

### cURL

```bash
curl -X GET 'https://<org>.api-<region>.k9o.io/@storefront/functions/<name>' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/functions/<name>', {
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### k9o CLI

```bash
k9o function get <name>
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.functions.get('greet')
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.functions.get("greet")
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Functions.Get(ctx, "greet")
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.functions.get("greet").await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.functions().get("greet")
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Functions.GetAsync("greet")
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.functions.get("greet")
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->functions->get('greet')
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/get-function
