> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.iot.telia.lt/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.iot.telia.lt/_mcp/server.

# Get data stream statuses

GET https://iot.telia.lt/api/v2/data_stream/status

Lists possible data stream statuses.

(`1`) is the normal `Running` state meaning your data stream is active and streams data.

(`2`) indicates a `Paused` data stream. It will not send messages to your destination.
However, messages meant for this data stream are routed and will be stored up to 7 days.
You will first receive historic data once you resume a paused streamer after longer pausing.

(`3`) indicates that an `Error` has occurred. This might be problems in the configuration (e.g. missing permissions)
or your destination has been unavailable for a longer period of time and the data stream exceeded maximum retries.
You may restart the streamer in order to fix a temporary problem, misconfigured streamers will continue to fail.

(`4`) is a `Pending` state. Your data stream has not been initialized, yet.
This state may occur for a very short time.


Reference: https://docs.iot.telia.lt/developers/api/integrations/get-data-streamer-statuses

## Authentication

- `Authorization` header (bearer token, required) — An `auth_token` should be provided to authenticate a session. To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

## Response

### 200

Possible connection statuses

- `list of ApiV2DataStreamStatusGetResponsesContentApplicationJsonSchemaItems`

## Errors

### 401 Unauthorized Error

No or invalid authentication token provided

- `any`

### 403 Forbidden Error

Authentication token is valid, but user has no access permissions to the request resource

- `any`

### 404 Not Found Error

A non-existent resource is requested

- `any`

## Types

### ApiV2DataStreamStatusGetResponsesContentApplicationJsonSchemaItems

- `id` (double, optional) — Enum item identifier
- `description` (string, optional) — Enum item description

## Examples

**Response**

```json
[
  {
    "id": 1,
    "description": "Running"
  },
  {
    "id": 2,
    "description": "Paused"
  },
  {
    "id": 3,
    "description": "Error"
  },
  {
    "id": 4,
    "description": "Pending"
  }
]
```

**SDK Code**

```python Retrieved
import requests

url = "https://iot.telia.lt/api/v2/data_stream/status"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Retrieved
const url = 'https://iot.telia.lt/api/v2/data_stream/status';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Retrieved
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://iot.telia.lt/api/v2/data_stream/status"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Retrieved
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v2/data_stream/status")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Retrieved
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://iot.telia.lt/api/v2/data_stream/status")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Retrieved
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://iot.telia.lt/api/v2/data_stream/status', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Retrieved
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v2/data_stream/status");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Retrieved
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v2/data_stream/status")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```