POST api/Common

Executes the login and returns the authentication token

Request Information

Parameters

NameDescriptionAdditional information
loginData
Contains your login information (server, database, user, password)

Define this parameter in the request body.

Request body formats

application/json, text/json

Sample:
{
  "Server": "address to server (http://yourserver.com/xmlrpc)",
  "Database": "name of the database",
  "UserName": "your username",
  "Password": "your password",
  "Caller": null
}

application/xml, text/xml

Sample:
<LoginRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/openErpRestApi.Models">
  <Caller i:nil="true" />
  <Database>name of the database</Database>
  <Password>your password</Password>
  <Server>address to server (http://yourserver.com/xmlrpc)</Server>
  <UserName>your username</UserName>
</LoginRequest>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Response body formats

application/json, text/json

Sample:
{
  "UserID": 1,
  "AuthToken": "your authentication token"
}

application/xml, text/xml

Sample:
<LoginResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/EQ_OpenERP_XML_RPC.Classes">
  <AuthToken>your authentication token</AuthToken>
  <UserID>1</UserID>
</LoginResult>