> For the complete documentation index, see [llms.txt](https://docs.skyone.cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.skyone.cloud/english/api-skyone-autosky/sessions-api.md).

# Sessions API

API calls for user session operations.

**Base path:** `/sessions/`

This API can be used to control user sessions. You can list active sessions, disconnect users, and send messages that will be displayed to users.

## List Sessions

```http
GET /sessions/
```

Queries the active sessions on the Autosky platform.

**Status:** `200 OK`

### Query Parameters (optional)

| Parameter  | Type   | Description               |
| ---------- | ------ | ------------------------- |
| `cli_uuid` | string | Client UUID for filtering |

### Response

**Status:** `200 OK`

```json
[
  {
    "ssid": "9cfb4863",
    "client": {},
    "user": {},
    "instance": {},
    "creation_date": "2017-10-02T18:35:14.470434Z",
    "termination_date": null,
    "termination_reason": "",
    "status": "active",
    "my_ip": "99.99.99.99"
  }
]
```

### Session Object Fields

| Field                | Type        | Description                           |
| -------------------- | ----------- | ------------------------------------- |
| `ssid`               | string      | Unique session identifier             |
| `client`             | object      | Associated client data                |
| `user`               | object      | Associated user data                  |
| `instance`           | object      | Instance data                         |
| `creation_date`      | string      | Session creation date/time (ISO 8601) |
| `termination_date`   | string/null | Session termination date/time         |
| `termination_reason` | string      | Reason for termination                |
| `status`             | string      | Session status (e.g., active)         |
| `my_ip`              | string      | User IP                               |

## Get Session Data

```
GET /sessions/{ssid}
```

Gets data for a session specified by its identifier.

**Status:** `200 OK`

### Path Parameters

| Parameter | Required | Description       |
| --------- | -------- | ----------------- |
| `ssid`    | Yes      | Unique session ID |

### Response

**Status:** `200 OK`

Returns the session object with the same structure as the listing.

## Remove Session

`DELETE /sessions/{ssid}`

Procedure for removing or disconnecting a user.

When used, sends a disconnection message to the user with a shutdown timer. If the user does not close the session spontaneously, the session is terminated within the defined timer, in minutes.

```
DELETE /sessions/{ssid}
```

### Path Parameters

| Parameter | Required | Description       |
| --------- | -------- | ----------------- |
| `ssid`    | Yes      | Unique session ID |

### Request Body

| Field     | Type   | Required | Description                             |
| --------- | ------ | -------- | --------------------------------------- |
| `time`    | number | Yes      | Time in minutes for session termination |
| `message` | string | No       | Disconnection warning message           |

### Request Example

```json
{
  "time": 10,
  "message": "Preventive maintenance in 10 minutes"
}
```

### Response

**Status:** `200 OK`

```json
{
  "status": "success"
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.skyone.cloud/english/api-skyone-autosky/sessions-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
