Login

Validates the supplied credentials, and if valid returns a hash to be used on subsequent REST api requests.

HTTP Request

GET /icweb.dll/security/login
Authorization {type} {value}

URI Parameters

Name In Required Type Description
type Header Yes String Style of authorization. This can be one of either BASIC, APIKEY, TOKEN.
value Header Yes String This is the base 64 encoded authorization key, it is a string containing username:password for BASIC, apiKey for APIKEY, or the emailToken for TOKEN.

Responses

Name Type Description
200 OK SecurityHash OK
401   An attempt was made to validate an invalid token/apiKey/username and password.

SecurityHash

Contains the temporary hash that can be used with subsequent REST api calls.

Name Type Description Optional
hash String Temporary security hash, that can then be used in subsequent REST api requests, expires 60 minutes after last use. No
id Integer Key associated with the user that this hash is associated with. No
username String Username associated with the user that this hash is associated with. No
license String Type of license the user has assigned to them. Possible values are ‘write’ or ‘readonly’. No
allowPasswordChange Boolean True if this user’s accounts password can be changed by the end user. No
name Boolean Full name of the user from the Personnel table. If it is blank it won’t be returned. Yes

Example

Request authentication via a users username and password.

Request

GET /icweb.dll/security/login
Authorization BASIC YWRtaW46cGFzc3dvcmQ=

Note ‘YWRtaW46cGFzc3dvcmQ=’ is the BASE64 encoded equivalent to the string ‘admin:password’

Response

{
        "hash": "E05DEB57605BA82CD1A0C130B38C7BC1415BA094B28D73B03577B7CAB438834E6B680B437C85A65CA796AB6E7DC8545555CC",
        "id": 4,
        "username": "admin",
        "license": "write",
        "allowPasswordChange": false
}

Example

Request authentication via an API Key.

Request

GET /icweb.dll/security/login
Authorization APIKEY RTA1REVCNTc2MDVCQTgyQ0QxQTBDMTMwQjM4QzdCQzE0MTVCQTA5NEIyOEQ3M0IwMw==

Note: the APIKey is shown BASE64 encoded.

Response

{
        "hash": "E05DEB57605BA82CD1A0C130B38C7BC1415BA094B28D73B03577B7CAB438834E6B680B437C85A65CA796AB6E7DC8545555CC",
        "id": 4,
        "username": "admin",
        "license": "write",
        "allowPasswordChange": true
}

Example

Request authentication via an email token.

Request

GET /icweb.dll/security/login
Authorization TOKEN RTA1REVCNTc2MDVCQTgyQ0QxQTBDMTMwQjM4QzdCQzE0MTVCQTA5NEIyOEQ3M0IwMw==

Note: the APIKey is shown BASE64 encoded.

Response

{
        "hash": "E05DEB57605BA82CD1A0C130B38C7BC1415BA094B28D73B03577B7CAB438834E6B680B437C85A65CA796AB6E7DC8545555CC",
        "id": 4,
        "username": "admin",
        "license": "write",
        "allowPasswordChange": false
}