# 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>"}}}}
```
