> 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 all sessions for the given user

```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 all sessions for the given user","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 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.xibosignage.com/developer/integrate/openapi/session.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.
