> For the complete documentation index, see [llms.txt](https://docs.xibosignage.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.xibosignage.com/developer/integrate/openapi/session.md).

# Session

session

## Session Search

> Search Sessions this user has access to

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"session","description":"session"}],"servers":[{"url":"/api"}],"paths":{"/sessions":{"get":{"tags":["session"],"summary":"Session Search","description":"Search Sessions this user has access to","operationId":"sessionSearch","parameters":[{"name":"type","in":"query","description":"Filter by type","required":false,"schema":{"type":"string","enum":["all","active","guest","expired"]}},{"name":"lastAccessedDateFrom","in":"query","description":"Start date for filtering sessions by last accessed date","required":false,"schema":{"type":"string","format":"date"}},{"name":"lastAccessedDateTo","in":"query","description":"End date for filtering sessions by last accessed date","required":false,"schema":{"type":"string","format":"date"}},{"name":"sortBy","in":"query","description":"Specifies which field the results are sorted by. Used together with sortDir","required":false,"schema":{"type":"string","enum":["lastAccessed","isExpired","userName","remoteAddress","userAgent","expiresAt"]}},{"name":"sortDir","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"successful operation","headers":{"X-Total-Count":{"description":"The total number of records","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Session"}}}}}}}}},"components":{"schemas":{"Session":{"properties":{"userId":{"description":"Class Sessions","type":"integer"},"userName":{"type":"string"},"isExpired":{"type":"integer"},"lastAccessed":{"type":"string","format":"date-time"},"remoteAddress":{"type":"string"},"userAgent":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"},"userPermissions":{"type":"object"}},"type":"object"}}}}
```

## Session Logout

> Logs out sessions for the given user. If the caller is acting on their own account, every session other than the one making this request is ended; otherwise every session belonging to the given user is ended.

```json
{"openapi":"3.0.0","info":{"title":"Xibo API","version":"4.5"},"tags":[{"name":"session","description":"session"}],"servers":[{"url":"/api"}],"paths":{"/sessions/logout/{id}":{"delete":{"tags":["session"],"summary":"Session Logout","description":"Logs out sessions for the given user. If the caller is acting on their own account, every session other than the one making this request is ended; otherwise every session belonging to the given user is ended.","operationId":"sessionLogout","parameters":[{"name":"id","in":"path","description":"The User ID to log out","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"successful operation","content":{"application/json":{"schema":{"properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"type":"object"}}}}}}}}}
```


---

# 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.xibosignage.com/developer/integrate/openapi/session.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.
