> 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
