PALO documentation

home > API > Example >

Example server login

Login request to the palo server:
Request header GET /server/login?user=admin&extern_password=admin HTTP/1.1
Host: localhost
 
Note: Plain password.
The response of the server login (username and password is valid):
Response header HTTP/1.1 200 OK
Server: Palo
Content-Type: text/plain;charset=utf-8
Content-Length: 16
 
Respose body f92i;1159364625;
Note: "f92i" is the session identifier of the connection.
The response of the server login (username or password is not valid):
Response header HTTP/1.1 400 Bad Request
Server: Palo
Content-Type: text/plain;charset=utf-8
Content-Length: 46
 
Respose body 1003;"illegal parameter value";"login error";

Example 1

Request for the list of OLAP databases:
Request header GET /server/databases?sid=f92i HTTP/1.1
Host: localhost
 
The response of a server with two databases:
Response header HTTP/1.1 200 OK
Server: Palo
X-PALO-SV: 846931642
Content-Type: text/plain;charset=utf-8
Content-Length: 55
 
Respose body 0;"Sample Database 1";5;1;1;
1;"a new database";0;0;2;
Note: "846931642" is the server token.
The response of an empty server:
Response header HTTP/1.1 200 OK
Server: Palo
Content-Type: text/plain;charset=utf-8
Content-Length: 0
 
Request for the list of OLAP databases using a server token:
Request header GET /server/databases?sid=f92i HTTP/1.1
Host: localhost
X-PALO-SV: 846931642
 
If the token is outdated:
Response header HTTP/1.1 400 Bad Request
Server: Palo
Content-Type: text/plain;charset=utf-8
Content-Length: 54
 
Respose body 5001;"server token outdated";"server token outdated";

Example 2

Request for the list of dimension of a not existing database:
Request header GET /database/dimensions?database=2&sid=f92i HTTP/1.1
Host: localhost
 
The response:
Response header HTTP/1.1 400 Bad Request
Server: Palo
Content-Type: text/plain;charset=utf-8
Content-Length: 48
 
Respose body 1004;"database not found";"database not found";