Nuclos REST login: POST, JSON, username, password, JSESSIONID, cookie, 401, logout, DELETE, session.

globe with meridians Language: Deutsch · English

hammer and wrench 3. Login

Authenticate at the REST service – POST with JSON credentials, JSESSIONID cookie and logout via DELETE.

On this page

Log in via POST to the root URL of the REST service (http://localhost:8080/nuclos-war/rest/). User name and password are passed as JSON.

Request

{"username": "nuclos", "password": ""}

Required headers:

Accept: application/json
Content-Type: application/json

The response is a JSON object with the entry links (e.g. boMetas, menu).

Passing the session ID

All services (except a few such as login) require a valid session ID – otherwise the service responds with HTTP 401 (Unauthorized). The session ID is passed as the cookie JSESSIONID=xxx.

In Nuclos 4.4.x/4.5.x the header sessionId was an alternative – from 4.6 it is no longer supported.

Logout

Same URL as login, via DELETE – invalidates the session ID (HTTP 200 if it was valid).

Related pages

gear 4. Reading business objects (BO)


Read BOs.

Öffnen →

gear Example calls via shell


curl.

Öffnen →