---
title: "Set current session"
method: PUT
path: "/api/sessions/current"
tags: ["Sessions"]
---

# Set current session

`PUT /api/sessions/current`

## Request

- Base URL: `/api/plugins/consensys-asko11y-app/resources` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/plugins/consensys-asko11y-app/resources/api/sessions/current`
- Auth: one of:
  - API key in cookie `grafana_session`
  - HTTP bearer

Sets the specified session as the current active session for the user/org. Pass empty string to clear the current session.

## Headers

- `X-Grafana-Org-Id` string

## Request body

- object
  - `sessionId` string, required: Session ID to set as current (empty string to clear)

## Response `200`

Current session updated

- object
  - `success` boolean

## Other responses

- `400`: Bad request (invalid parameters or malformed request body)
- `401`: Unauthorized (missing or invalid authentication)
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api.md) - [All operations](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/llms.txt) - [OpenAPI document](https://skmtc.dev/consensys/apis/ask-o11y-ai-powered-observability-assistant-api/revisions/ee3ccd0f186d?raw)
