---
id: stats
title: "Get Stats"
description: "Retrieve statistics about the server and user sessions."
sidebar_label: "Get Stats"
hide_title: true
hide_table_of_contents: true
api:  
sidebar_class_name: "get api-method"
info_path: docs/api/neko-api
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Get Stats"}
>
</Heading>

<MethodEndpoint
  method={"get"}
  path={"/api/stats"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Retrieve statistics about the server and user sessions.

<ParamsDetails
  parameters={undefined}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"Statistics retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"has_host":{"type":"boolean","description":"Indicates if there is a host currently."},"host_id":{"type":"string","description":"The ID of the current host, if any."},"server_started_at":{"type":"string","format":"date-time","description":"The timestamp when the server started."},"total_users":{"type":"integer","description":"The total number of users connected."},"last_user_left_at":{"type":"string","format":"date-time","description":"The timestamp when the last user left, if any."},"total_admins":{"type":"integer","description":"The total number of admins connected."},"last_admin_left_at":{"type":"string","format":"date-time","description":"The timestamp when the last admin left, if any."}},"title":"Stats"}}}},"401":{"description":"The request requires user authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}},"403":{"description":"The server understood the request, but refuses to authorize it.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}}}}
>
  
</StatusCodes>


      