login

Purpose

Performs a user log in and initiates an API session. This method must be called prior to any other API call. The REST login creates a server-side session that may expire according to the security level selected for a Customer (see Security and Access Control for more info). The API client should log in again if the session expires. Infinite Blue recommends that an API client logs out after performing a group of operations rather than keeping the session open for a long time. When an API client logs in, any previous sessions existing for the same user credentials are terminated.

Master Server users with login permissions can use the login API with their credentials to access the REST API for a specified Customer.

HTTP method

POST or GET

URL

https://app.infiniteblue.com/rest/api/login

HTTP header parameters

loginName

Login name for an active Platform user account.

password

User password.

custId

ID of the Customer to log in. Optional parameter: if not present, the Customer is determined by login name.

URL parameters

loginName

Login name for an active Platform user account. This parameter is deprecated. Please change any existing code to use the HTTP header parameter described above.

password

User password. This parameter is deprecated. Please change any existing code to use the HTTP header parameter described above.

custId

ID of the Customer to log in. Optional parameter: if not present, the Customer is determined by login name. This parameter is deprecated. Please change any existing code to use the HTTP header parameter described above.

output

Optional parameter specifying the output format, one of: xml (default) or json.

adminFallback

When true, enables the to fallback to the default password authentication if the tenant uses a different authentication method. Defaults to false. This parameter can also be specified in the HTTP header.

Response

Session ID that must be used in all subsequent API calls during this session

Example

Sample XML response:

<?xml version="1.0" encoding="utf-8" ?>
<resp status="ok">
<sessionId> ecc701d2442e4f6b9fe2a7cc7b52078a@5857</sessionId>
</resp>

Sample JSON response:

{"status":"ok", "sessionId":"ecc701d2442e4f6b9fe2a7cc7b52078a@5857" }