Security

The API is included in IBM® Content Navigator and is protected by the same security as for IBM Content Navigator.

Authentication

Cookie and bearer token authentications are supported. Cookie authentication can be used when a bearer authentication is not configured.

Cookie authentication
Example of a login request:
curl -v 'https://your-domain:9443/navigator/admin/v1/login' \
  -H 'Content-Type: application/json' \
  -H 'accept: application/json' \
  -d $'{"username":"username","password": "password"}'
Example of a login response:
Set-Cookie: JSESSIONID=jsessionid; Path=/; HttpOnly
Set-Cookie: LtpaToken2=ltpatoken; Path=/; HttpOnly
{"sessionData":{"username":"username","userDisplayName":"User Display Name","csrfToken":"csrftoken"}}
Example of a list desktops request:
curl -v 'https://your-domain:9443/navigator/admin/v1/desktops' \
  -H 'Accept: application/json' \
  -H 'Cookie: JSESSIONID=jsessionid; LtpaToken2=ltpatoken' \
  -H 'Navigator-API-CSRF-Token: csrftoken'
Note: Clients must pass the CSRF token that they received during the initial login call to IBM Content Navigator Administration API.
Example of a logout request:
curl -v -X POST 'https://your-domain:9443/navigator/admin/v1/logout'
Note: Login and logout requests can be used only on non-SSO deployments.
Bearer token authentication
Example of a list desktops request:
curl -v 'https://your-domain:9443/navigator/admin/v1/desktops' \
  -H 'Accept: application/json' \
  -H 'Authorization: Bearer bearertoken'