> 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.

# Endpoint connectivity status

GET https://iot.telia.lt/api/v1/endpoint/{endpoint_id}/connectivity

Retrieve details about current connectivity status of endpoint.
The following is a list of possible statuses:

* `ATTACHED`:
The Endpoint has succesfully attached to the Home Core network in the past.
The device will be shown as `ATTACHED` until the visited network has signaled that the device is inactive/offline.
Usually the visited network informs the Core Network within 1-2 days after a device went offline.

* `ONLINE`:
The Endpoint has an active data connection

* `OFFLINE`:
The Endpoint has not attached to the core network yet or the device was previously attached but the visited network signaled that the device had no activity for the last 1-2 days.
Note: The device is not reachable for external services (e.g. SMS, MSRN lookup).

* `BLOCKED`:
The device is not granted service. Endpoints are assigned this status when they have exceeded traffic limits.


Reference: https://docs.iot.telia.lt/developers/api/endpoint/endpoint-connectivity-by-id-get

## 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).

## Request

### Path parameters

- `endpoint_id` (integer, required) — Numeric ID of an endpoint

## Response

### 200

Success

- `status` (ApiV1EndpointEndpointIdConnectivityGetResponsesContentApplicationJsonSchemaStatus, optional)
- `location` (ApiV1EndpointEndpointIdConnectivityGetResponsesContentApplicationJsonSchemaLocation, optional)
- `pdp_context` (ApiV1EndpointEndpointIdConnectivityGetResponsesContentApplicationJsonSchemaPdpContext, optional)
- `services` (list of string, optional)

## Errors

### 403 Forbidden Error

Your role doesn't include the permission this endpoint requires. Most endpoints return `error_code`, `error_token`, and `message`. Some return only `status_code` and `message`.

- `error_code` (integer, optional)
- `error_token` (string, optional)
- `status_code` (integer, optional)
- `message` (string, optional)

## Types

### ApiV1EndpointEndpointIdConnectivityGetResponsesContentApplicationJsonSchemaStatus

### ApiV1EndpointEndpointIdConnectivityGetResponsesContentApplicationJsonSchemaLocation

### ApiV1EndpointEndpointIdConnectivityGetResponsesContentApplicationJsonSchemaPdpContext

## Examples

**Response**

```json
{
  "status": {
    "description": "ONLINE"
  },
  "location": {
    "country": {
      "country_code": 49,
      "country_id": 74,
      "iso_code": "de",
      "mcc": 262,
      "name": "Germany"
    },
    "iccid": 8988303010000000000,
    "imsi": 901439999999999,
    "last_updated": "2019-12-03T07:06:04.000Z",
    "last_updated_gprs": "2019-12-30T14:55:35.000Z",
    "msc": 491770940000,
    "operator": {
      "country": {
        "id": 74,
        "name": "Germany"
      },
      "id": 4,
      "name": "EPlus"
    },
    "sgsn_ip_address": "212.23.107.88",
    "sgsn_number": 491770695700,
    "vlr_number": 491770940000
  },
  "pdp_context": {
    "ci": null,
    "created": "2019-12-04T08:12:02.000Z",
    "duration": "00:00:04",
    "endpoint_id": 166,
    "ggsn_control_plane_ip_address": "185.57.216.35",
    "ggsn_data_plane_ip_address": "185.57.216.35",
    "gtp_version": 1,
    "imeisv": 3526510721968301,
    "imsi": 901439999999999,
    "imsi_id": 627,
    "lac": 40217,
    "mcc": 262,
    "mnc": 3,
    "nsapi": 5,
    "operator_id": 4,
    "organisation_id": 2,
    "pdp_context_id": 92415,
    "rac": null,
    "rat_type": {
      "description": "3G",
      "rat_type_id": 1
    },
    "ratezone_id": 70,
    "sac": 42937,
    "sgsn_control_plane_ip_address": "212.23.107.89",
    "sgsn_data_plane_ip_address": "212.23.107.89",
    "sim_id": "625",
    "tariff_id": 54,
    "tariff_profile_id": 35,
    "teid_control_plane": 7116,
    "teid_data_plane": 7116,
    "ue_ip_address": "10.199.5.223"
  },
  "services": [
    "GPRS"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://iot.telia.lt/api/v1/endpoint/1/connectivity"

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

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

print(response.json())
```

```javascript
const url = 'https://iot.telia.lt/api/v1/endpoint/1/connectivity';
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
package main

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

func main() {

	url := "https://iot.telia.lt/api/v1/endpoint/1/connectivity"

	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
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/endpoint/1/connectivity")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://iot.telia.lt/api/v1/endpoint/1/connectivity")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/endpoint/1/connectivity")! 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()
```