> ## Documentation Index
> Fetch the complete documentation index at: https://syteca.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# List Sessions

> Syteca Data Connector REST API endpoint to retrieve a list of Client sessions with basic details — Client GUID, session ID, user ID, login/logout dates.

Returns a list of Syteca Client sessions filtered by optional start and end time parameters. Returns basic session info — Client GUID, session ID, user ID, login and logout dates. For sessions **with productivity details** (duration, idle time, productive time) and pagination support, use [`POST /sessions`](/docs/api/data-connector/endpoints/post-sessions) instead.

```http theme={"system"}
GET https://<hostname>/ekranapi/sessions
```

## Authentication

<ParamField header="ApiKey" type="string" required>
  Your Active API Key from the Management Tool. See [Manage → Get an API key](/docs/api/data-connector/manage#get-an-api-key).
</ParamField>

## Query parameters

<ParamField query="start" type="string">
  Sessions that were **started or finished after this time** are included.

  Accepted formats: `2021-04-01`, `2021-04-01T12:00`, `2021-04-01T12:00:00`. See [Time parameter conventions](/docs/api/data-connector/api-reference#time-parameter-conventions).
</ParamField>

<ParamField query="end" type="string">
  Sessions that were **started or finished before this time** are included.

  Accepted formats: `2021-04-01`, `2021-04-01T12:00`, `2021-04-01T12:00:00`.
</ParamField>

<Note>
  If both `start` and `end` are omitted, all sessions in the database are returned. Sessions that span the `start` or `end` boundary are clipped — first activity after `start` becomes the session start, last activity before `end` becomes the session end. See [Time parameter conventions](/docs/api/data-connector/api-reference#time-parameter-conventions) for full rules.
</Note>

## Response (200 OK)

<ResponseField name="clientGuid" type="string">
  The GUID of the Client where the session was recorded.
</ResponseField>

<ResponseField name="loginDate" type="date-time">
  When the session started (ISO 8601).
</ResponseField>

<ResponseField name="logoutDate" type="date-time">
  When the session ended (ISO 8601).
</ResponseField>

<ResponseField name="sessionId" type="int32">
  The ID of the session.
</ResponseField>

<ResponseField name="userId" type="int32">
  The ID of the user who was logged in during the session.
</ResponseField>

## Example

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X GET "https://<hostname>/ekranapi/sessions?start=2021-04-01&end=2021-04-30" \
    -H "ApiKey: xJ)tsCNcpj)l+]}(@_|lt!t………"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={"system"}
  [
    {
      "clientGuid": "1d4fegdr-g3ff-4114-a814-f3aeee14dgdg",
      "logoutDate": "2000-01-23T04:56:07.000+00:00",
      "loginDate": "2000-01-23T04:56:07.000+00:00",
      "sessionId": 124,
      "userId": 61
    },
    {
      "clientGuid": "dd4lwdr-xxff-4ss4-a814-f3aeee14dgdsg",
      "logoutDate": "2000-01-23T04:56:07.000+00:00",
      "loginDate": "2000-01-23T04:56:07.000+00:00",
      "sessionId": 142,
      "userId": 16
    }
  ]
  ```
</ResponseExample>

## Errors

See [Status codes](/docs/api/data-connector/api-reference#status-codes). Common errors:

* **400 Bad Request** — invalid `start` or `end` format. Use one of the three accepted ISO formats.
* **403 Forbidden** — the Data Connector is not registered. See [Deactivate](/docs/api/data-connector/manage#deactivate-the-data-connector).
* **503 Service Unavailable** — the Application Server is stopped.

## Related

<CardGroup cols={2}>
  <Card title="List sessions with productivity (POST)" icon="bar-chart-3" href="/docs/api/data-connector/endpoints/post-sessions">
    Same endpoint, POST method — returns duration, idle time, productive time, plus pagination.
  </Card>

  <Card title="List Clients" icon="server" href="/docs/api/data-connector/endpoints/get-clients">
    Look up Client GUIDs returned by this endpoint.
  </Card>

  <Card title="List users" icon="users" href="/docs/api/data-connector/endpoints/get-users">
    Look up user IDs returned by this endpoint.
  </Card>

  <Card title="API reference" icon="square-code" href="/docs/api/data-connector/api-reference">
    Base URL, authentication, status codes.
  </Card>
</CardGroup>
