# Get Stream

`GET /data-streams/user/{streamSlug}` · Core · Realtime Feeds & Streams

Returns one active user stream by its slug. A deleted stream answers 404, the same as one that never existed. Needs PROJECT_ADMIN or PROJECT_AUDITOR.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `streamSlug` | path | yes | The Pulse Stream's slug. Example: `"order-events"`. |
| `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 user stream: an append-only message log in the project. |
| `data.id` | string | yes | The stream's internal id (`pstr_...`). Address the stream by `slug`. |
| `data.slug` | string | yes | The stream's address in the project, derived from `displayName`. |
| `data.projectId` | string | yes | The project the stream belongs to (`proj_...`). |
| `data.displayName` | string | yes | The name given at creation. |
| `data.subjectPrefix` | string | yes | The message subject namespace the platform assigned to the stream: `k9o.<region>.<org>.<project>.user.<id>`. Published messages carry subjects under it. |
| `data.region` | string | yes | The region the stream's data lives in. |
| `data.retentionSeconds` | integer | yes | How long each message is kept, in seconds: 900 or a whole number of hours. |
| `data.retentionClass` | enum ("hot", "warm", "cold") | yes | The retention class `retentionSeconds` falls in, which sets the storage rate: `hot` is 15 minutes, `warm` is 1 to 24 hours, `cold` is above 24 hours. |
| `data.maxBytes` | object | yes | The storage the stream reserves, in bytes. Null only on a stream created before a size was required. |
| _one of_ | | |  |
| _or_ | | |  |
| `data.status` | enum ("active") | yes | Always `active`: a deleted stream is not returned. |
| `data.createdAt` | string (date-time) | yes | When the stream was created. |
| `data.createdBy` | object | yes | The id of the caller that created the stream; null if not recorded. |
| _one of_ | | |  |
| _or_ | | |  |
| `meta` | object | yes |  |


## Code samples

### cURL

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

### fetch

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

### k9o CLI

```bash
k9o stream get <slug>
```

### @k9o/core

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

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.streams.get("<streamSlug>")
```

### sdk-go

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

### k9o

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

### dev.k9o:core

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

### K9o.Core

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

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.streams.get("<streamSlug>")
```

### k9o/sdk

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

### K9o

```swift
// let k9o = try K9o.createClient(orgSlug: "playground", projectSlug: "storefront", apiKey: "k9o_…")
let result = try await k9o.streams.get("<streamSlug>")
```

### core-kotlin

```kotlin
// val k9o = createClient { orgSlug = "playground"; projectSlug = "storefront"; apiKey = "k9o_…" }
val result = k9o.streams.get("<streamSlug>")
```

### k9o (Flutter)

```dart
// final k9o = K9o.createClient(orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…');
final result = await k9o.streams.get('<streamSlug>')
```

### @k9o/react-native

```javascript
// const k9o = createClient({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })  // RN, secure storage
const { data } = await k9o.streams.get('<streamSlug>')
```


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