Skip to content
Developer From Jokela edited this page Aug 15, 2020 · 6 revisions

Login is fairly easy.

First, do a GET request to https://<wilmaserver>/index_json to get SessionId:

{
    "LoginResult": "Failed",
    "SessionID": "<SESSIONID>",
    "ApiVersion": 11,
    "Workers": [],
    "oidc_test_mode": false,
    "oidc_providers": []
}

POST request to https://<wilmaserver>/index_json.

Data:

  • Login: Username
  • SESSIONID: SessionId you got earlier
  • CompleteJson: This key will force Wilma to give everything which is available in JSON format
  • Password: Password
  • format: Format for i.e. errors

Note that there aren't any results, so you'll have to follow redirects. You have to tell your HTTP client to disable following redirects.

If login fails (invalid password or username), you'll be redirected to: https://<wilmaserver>/?loginfailed.

If it succeeds, you'll be redirected to: https://<wilmaserver>/?checkcookie.

And you'll get cookie Wilma2SID, your session.

Error response:

{
  "error": {
    "id": "example-1",
    "message": "Some weird error",
    "description": "Don't worry, this is an example ;-)",
    "whatnext": "",
    "statuscode": 403
  }
}
Clone this wiki locally