2. Authentication API#
2.1 Request Headers#
Request headers for authentication API
No. | Header Name | Required | Header value |
---|---|---|---|
1 | Content-Type | Yes | application/json |
2 | X-FCX-Client-Cert | *See note | Client certificate mapped to the user |
*Note: Required, in cases where ‘Certificate and Password’ authentication is used.
2.2 API Execution Errors#
API execution error information is returned in HTTP response body under json format.
No. | Item | Type | Cardinality | Description |
---|---|---|---|---|
1 | errorLevel | string | 1..1 | Error level |
2 | framework | object | 1..1 | Framework object |
3 | ┗systemErrorCode | string | 1..1 | System error code |
4 | business | object | 1..1 | Business object |
5 | ┗businessErrorInfo | string | 1..1 | Error message |
6 | ┣responseErrorCode | string | 1..1 | Response error code |
7 | ┗embeddedString | string array | 1..1 | Additional information |
Example:
{ "errorLevel": "888", "framework": { "systemErrorCode": "" }, "business": { "businessErrorInfo": "Cannot create token from the specified user information.", "responseErrorCode": "RCM301802", "embeddedString": [ ] } }
List of response errors
No. | HTTP status | Error Information | Error message | Error reason |
---|---|---|---|---|
1 | 400 | Request parameter error | Parameter is invalid. Specified parameter: XXX * XXX is the parameter name. | Request parameter error (empty parameter, invalid length, invalid format…) |
2 | 401 | Cannot create token | Cannot create token from the specified user information. | User information specified in the request is invalid |
3 | 500 | Server error | Failed to create token (Internal Error). | Internal server error |
2.3 API Specification#
2.3.1 Get access token#
- Request
Parameter definition
No. | Item | Required | Cardinality | Min. length | Max. length | Restrictions | Description |
---|---|---|---|---|---|---|---|
1 | auth | Yes | 1..1 | - | - | Object | Authentication object |
2 | ┗identity | Yes | 1..1 | - | - | Object | Identity object |
3 | ┗password | Yes | 1..1 | - | - | Object | Password object |
4 | ┗user | Yes | 1..1 | - | - | Object | User object |
5 | ┣contract_number | Yes | 1..1 | 8 | 8 | See Note(*) | Contract number of authentication user |
6 | ┣name | Yes | 1..1 | 4 | 246 | See Note(*) | User name of authentication user |
7 | ┗password | Yes | 1..1 | 16 | 64 | See Note(*) | Password of authentication user |
8 | timezone | No | - | - | See Note(*) | Timezone *case-insensitive If no timezone, a timezone other than 'UTC', or an invalid timezone is specified, 'JST' is automatically set. |
(*): Upper/Lower case alphanumeric characters. For more details please refer to FJCS Portal User Guide (1.1.2 Essential Information for the use of the FJCS Portal) input restrictions.
Example:
{ "auth":{ "identity":{ "password":{ "user":{ "contract_number":"xxxxxxxx", "name":"user-name", "password":"user-password" } } } }, "timezone":"UTC" }
HTTP STATUS:201
Response body:
No. | Item | Cardinality | Description |
---|---|---|---|
1 | token | 1..1 | Token object |
2 | ┣expires_at | 1..1 | Expiration of an access token. The expiration from the time of an initial issuance is 30 minutes later. Timezone : 'UTC' if 'UTC' is specified in 'timezone' of 1. Request. 'JST' if other than 'UTC'. Format : YYYY-mm-ddTHH:MM:SS.SSSZ (if 'UTC') YYYY-mm-ddTHH:MM:SS (if 'JST') |
3 | ┣scope | 1..1 | Token scope |
4 | ┗user | 1..1 | User object |
5 | ┣contract_number | 1..1 | Contract number of authentication user |
6 | ┗name | 1..1 | User name of authentication user |
Example:
{ "token":{ "expires_at":"2016-05-16T03:20:42", "scope":"paas", "user":{ "contract_number":"xxxxxxxx", "name":"user-name" } } }