# Logon

## Log on

> Authenticate the user. When successful, an authorization token will be generated.

```json
{"openapi":"3.0.1","info":{"title":"Parallels RAS - REST API v1.0","version":"1.0"},"paths":{"/api/Session/logon":{"post":{"tags":["1-Farm settings//Administrator Sessions"],"summary":"Log on","description":"Authenticate the user. When successful, an authorization token will be generated.","operationId":"44bb82b9-c20b-4c2c-bd7d-1afc1b48691a","parameters":[{"name":"localAuth","in":"query","description":"Authenticate with local machine to configure local Web Admin Settings. NOTE: Only localhost connections are allowed.","schema":{"type":"boolean"}}],"requestBody":{"description":"Contains the information about the session.","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/NewAPISession"}}}},"responses":{"200":{"description":"Success","content":{"application/json; api-version=1.0":{"schema":{"$ref":"#/components/schemas/Session"}}}}}}}},"components":{"schemas":{"NewAPISession":{"required":["password","username"],"type":"object","properties":{"username":{"maxLength":255,"minLength":1,"type":"string","description":"<para type=\"description\">Parallels RAS administrator username.</para>","nullable":true},"password":{"type":"string","description":"<para type=\"description\">Parallels RAS administrator password.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Create a new administrator session</para>\r\n<para type=\"description\"></para>"},"Session":{"type":"object","properties":{"authToken":{"type":"string","description":"<para type=\"description\">The Authentication Token of the current session.</para>","nullable":true},"localAuth":{"type":"boolean","description":"<para type=\"description\">Specifies if the user is Locally Authenticated or with RAS Connection Broker.</para>"},"userId":{"type":"integer","description":"<para type=\"description\">The User ID connected to the current session.</para>","format":"int32"},"applySettingsEnabled":{"type":"boolean","description":"<para type=\"description\">Specifies if Settings need to be applied or not.</para>"},"connectedSiteId":{"type":"integer","description":"<para type=\"description\">The Site ID to which the current session is connected to.</para>","format":"int32"},"settingsId":{"type":"integer","description":"<para type=\"description\">The current Settings ID.</para>","format":"int32"},"sessionId":{"type":"integer","description":"<para type=\"description\">The ID of the current session.</para>","format":"int32"},"connectedServer":{"type":"string","description":"<para type=\"description\">The Server that the current session is connected to.</para>","nullable":true},"licensingServer":{"type":"string","description":"<para type=\"description\">The Licensing Server.</para>","nullable":true},"primaryBrokerConnection":{"type":"boolean","description":"<para type=\"description\">Specifies if the session is connected with the Primary Connection Broker of a Site.</para>"},"licensingServerConnection":{"type":"boolean","description":"<para type=\"description\">Specifies if the session is connected is with the Licensing Server.</para>"},"domain":{"type":"string","description":"<para type=\"description\">Specifies the Domain where the Connection Broker is installed.</para>","nullable":true},"farmName":{"type":"string","description":"<para type=\"description\">Specifies the Farm Name.</para>","nullable":true},"farmGUID":{"type":"string","description":"<para type=\"description\">Specifies the Farm GUID.</para>","nullable":true}},"additionalProperties":false,"description":"<para type=\"synopsis\">Session</para>\r\n<para type=\"description\"></para>"}}}}
```


---

# Agent Instructions: 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:

```
GET https://docs.parallels.com/landing/ras-rest-api-guide/api-reference/farm-settings/administrator-sessions/logon.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
