3. User management API#
3.1 Request Headers#
API execution error information is returned in HTTP response body under json format.
No. | Header Name | Required | Header value |
---|---|---|---|
1 | Token | Yes | Access token acquired by executing “Get access token API” |
2 | Content-Type | Yes | application/json |
3.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 | Business error information |
6 | ┣responseErrorCode | string | 1..1 | Response error code |
7 | ┗embeddedString | string array | 1..1 | Error message |
Example:
{ "errorLevel": "888", "framework": { "systemErrorCode": "" }, "business": { "businessErrorInfo": "BECSA000113", "responseErrorCode": "RCS100001", "embeddedString": [ "Internal Server Error" ] } }
List of response errors
No. | HTTP status | Error Information | Error message | Error reason |
---|---|---|---|---|
1 | 400 | Request parameter error * XXX is the parameter name. | - Parameter is insufficient. Required parameter: XXX - Parameter is required. | Insufficient parameters |
Character count of parameter is invalid. Specified parameter: XXX | Input parameter check error (digit number fault) | |||
The format of parameter is invalid. Specified parameter: XXX | Input parameter format error (other than digit number) | |||
2 | 400 | Delete contractor error | Could not delete user because the target user is a contractor. | Try to delete a contractor |
3 | 400 | Password check error | Password is of invalid format or does not satisfy password policy. Please try again. | Violate password policy |
Password cannot be changed again within 24 hours since the last change. Please try again after 24 hours. | Try to change password again within 24 hours | |||
Failed to change password. The old password was invalid. | Previous password error | |||
4 | 400 | Invalid user status | Cannot change user information because user status of the target user is invalid. | Try to change information of user whose status is invalid |
5 | 401 | Invalid token | The specified access token is not valid. | Access token is not valid |
6 | 403 | Authorization error | Authorization Error. | Action not authorized |
7 | 403 | Change contractor status error | Unauthorized to change information of the specified user. | Try to change user status of a contractor |
8 | 404 | Not found | The target information does not exist. | Target information not found |
9 | 409 | Exclusive error | Operation conflicts with another one. | Target information has already been changed by another process |
10 | 500 | Internal Server Error | Internal Server Error. | Consistency error, or other server errors |
3.3 API Specification#
3.3.1 Create new user#
- Request
Parameter definition
No. | Item | Required | Cardinality | Min. length | Max. length | Restrictions | Description |
---|---|---|---|---|---|---|---|
1 | login_id | Yes | 1..1 | 4 | 246 | See Note () | User name of the user to be created |
2 | user_description | No | 0..1 | 1 | 255 | See Note () | User description of the user to be created |
3 | mailaddress | Yes | 1..1 | 1 | 256 | Proper email address format () | Email address of the user to be created |
4 | user_status | Yes | 1..1 | 1 | 1 | Invalid (0) / Valid (1) | User status of the user to be created |
5 | password | Yes | 1..1 | 16 | 64 | See Note () | Password of the user to be created |
6 | language_code | Yes | 1..1 | 2 | 2 | Japanese (ja) / English (en) | Language code of the user to be created |
7 | role_code | Yes | 1..1 | 2 | 2 | Administrator (00),Developer (01) | Role code of the user to be created |
8 | user_last_name | Yes | 1..1 | 1 | 64 | See Note () | Last name of the user to be created |
9 | user_first_name | Yes | 1..1 | 1 | 64 | See Note (*) | First name of the user to be created |
(*): For the detail of email address format, please refer to FJCS Portal User Guide (1.1.2 Essential Information for the use of the FJCS Portal) input restrictions.
(**):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:
{ "login_id": "fujitsu123", "user_description": "User description", "mailaddress": "abc@xyz.com", "user_status": "1", "password": "Abcdefgh12345678", "language_code": "ja", "role_code": "00", "user_last_name": "Smith", "user_first_name": "John" }
$ LOGIN_ID=<User name (Required)> $ USER_DESCRIPTION=<User description (Optional)> $ MAILADDRESS=<Email address (Required)> $ USER_STATUS=<User status (Required)> $ PASSWORD=<Password (Required)> $ LANGUAGE_CODE=<Language code (Required)> $ ROLE_CODE=<Role code (Required)> $ USER_LAST_NAME=<Last name (Required)> $ USER_FIRST_NAME=<First name (Required)> $ curl -si -X POST https://k5-apiportal.paas.cloud.global.fujitsu.com/API/v1/api/users -H "Content-Type:application/json" -H "Token:<Token value>" -d '{ "login_id": "'$LOGIN_ID'", "user_description": "'$USER_DESCRIPTION'", "mailaddress": "'$MAILADDRESS'", "user_status": "'$USER_STATUS'", "password": "'$PASSWORD'", "language_code": "'$LANGUAGE_CODE'", "role_code": "'$ROLE_CODE'", "user_last_name": "'$USER_LAST_NAME'", "user_first_name": "'$USER_FIRST_NAME'"}'
2. Response
HTTP STATUS:200
Response body:
No. | Item | Cardinality | Description |
---|---|---|---|
1 | login_id | 1..1 | User name of the newly created user |
2 | user_description | 1..1 | User description of the newly created user |
3 | mailaddress | 1..1 | Email address of the newly created user |
4 | user_status | 1..1 | User status of the newly created user Invalid (0) / Valid (1) |
5 | language_code | 1..1 | Language code of the newly created user Japanese (ja) / English (en) |
6 | authentication_method | 1..1 | Authentication method * This API returns fixed value: Password authentication (0) |
7 | user_last_name | 1..1 | Last name of the newly created user |
8 | user_first_name | 1..1 | First name of the newly created user |
Example:
{ "login_id": "fujitsu123", "user_description": "User description.", "mailaddress": "abc@xyz.com", "user_status": "1", "language_code": "ja", "authentication_method ": "0", "user_last_name": "Smith", "user_first_name": "John" }
{ "login_id": <Username>, "user_description": <Userdescription>, "mailaddress": <Emailaddress>, "user_status": <Userstatus>, "language_code": <Languagecode>, "authentication_method ": <Authenticationmethod>, "user_last_name": <Lastname>, "user_first_name": <Firstname> }
3.3.2 Change user information#
- Request
Parameter definition
No. | Item | Required | Cardinality | Min. length | Max. length | Restrictions | Description |
---|---|---|---|---|---|---|---|
1 | login_id | Yes | 1..1 | 4 | 246 | See Note (**) | User name of the target user |
2 | mailaddress | No (*) | 0..1 | 1 | 256 | Proper email address format (***) | New email address |
3 | user_description | No (*) | 0..1 | 1 | 255 | See Note (**) | New user description |
4 | language_code | No (*) | 0..1 | 2 | 2 | Japanese (ja) / English (en) | New language code |
5 | user_status | No (*) | 0..1 | 1 | 1 | Invalid (0) / Valid (1) * Trying to change user status of a contractor will result in error | New user status |
6 | password | No (*) | 0..1 | 16 | 64 | See Note(**) | New password |
7 | user_last_name | No (*) | 0..1 | 1 | 64 | See Note(**) | New user Last name |
8 | user_first_name | No (*) | 0..1 | 1 | 64 | See Note (**) | New user First name |
(*): At least one parameter must be set. Upper / Lower case alphanumeric characters.
(**): 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.
(***): For the detail of email address format, please refer to FJCS Portal User Guide
(1.1.2 Essential Information for the use of the FJCS Portal) input restrictions.
Example:
{ "login_id": "fujitsu123", "mailaddress": "abc@xyz.com", "user_description": "User description.", "language_code": "ja", "user_status": "1", "password":"Abcdefgh12345678", "user_last_name": "Smith", "user_first_name": "John" }
$ LOGIN_ID=<User name (Required)> $ MAILADDRESS=<Email address (Optional *)> $ USER_DESCRIPTION=<User description (Optional *)> $ LANGUAGE_CODE=<Language code (Optional *)> $ USER_STATUS=<User status (Optional *)> $ PASSWORD=<Password (Optional *)> $ USER_LAST_NAME=<Last name (Optional *)> $ USER_FIRST_NAME=< First name (Optional *)> # *: At least one parameter must be set. $ curl -si -X PUT https://k5-apiportal.paas.cloud.global.fujitsu.com/API/v1/api/users -H "Content-Type:application/json" -H "Token:<Token value>" -d '{ "login_id": "'$LOGIN_ID'", "mailaddress": "'$MAILADDRESS'", "user_description": "'$USER_DESCRIPTION'", "language_code": "'$LANGUAGE_CODE'", "user_status": "'$USER_STATUS'", "password": "'$PASSWORD'", "user_last_name": "'$USER_LAST_NAME'", "user_first_name": "'$USER_FIRST_NAME'"}'
2. Response
HTTP STATUS:200
Response body:
No. | Item | Cardinality | Description |
---|---|---|---|
1 | login_id | 1..1 | User name of the target user |
2 | language_code | 1..1 | New language code |
3 | user_status | 1..1 | New user status |
4 | mailaddress | 1..1 | New email address |
5 | user_description | 1..1 | New user description |
6 | user_last_name | 1..1 | New user Last name |
7 | user_first_name | 1..1 | New user First name |
8 | accesstoken_destruction_information_list | 1..1 | User information whose token was cancelled. |
9 | ┣customer_group_id | 1..1 | Group ID to which the user belongs to. |
10 | ┗login_id | 1..1 | Login ID of the user. |
Example:
{ "login_id": "fujitsu123", "language_code": "ja", "user_status": "1", "mailaddress": "abc@xyz.com", "user_description": "User description.", "user_last_name": "Smith", "user_first_name": "John", "accesstoken_destruction_information_list":[ { "customer_group_id":"HvlgXxym", "login_id":" fujitsu123"} ] }
{ "login_id": <Username>, "language_code": <Languagecode>, "user_status": <Userstatus>, "mailaddress": <Emailaddress>, "user_description": <Userdescription>, "user_last_name": <Lastname>, "user_first_name": [ { "customer_group_id": <FJCSContractnumber>, "login_id": <Username> } ] }
3.3.3 Change user password#
- Request
Parameter definition
No. | Item | Required | Cardinality | Min. length | Max. length | Restrictions | Description |
---|---|---|---|---|---|---|---|
1 | login_id | Yes | 1..1 | 4 | 246 | See Note (*) | User name of the target user |
2 | after_password | Yes | 1..1 | 16 | 64 | See Note (*) | New password |
3 | before_password | Yes | 1..1 | 16 | 64 | See Note (*) | Old password |
(*): 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:
{ "login_id": "fujitsu123", "after_password":"Newpassword12345678", "before_password":"Abcdefgh12345678" }
$ LOGIN_ID=<User name (Required)> $ AFTER_PASSWORD=<New Password (Required)> $ BEFORE_PASSWORD=<Old Password (Required)> $ curl -si -X PUT https://k5-apiportal.paas.cloud.global.fujitsu.com/API/v1/api/userspassword -H "Content-Type:application/json" -H "Token:<Token value>" -d '{ "login_id": "'$LOGIN_ID'", "after_password": "'$AFTER_PASSWORD'", "before_password": "'$BEFORE_PASSWORD'"}'
2. Response
HTTP STATUS:200
Response body:
No. | Item | Required | Cardinality | Min. length | Max. length | Restrictions | Description |
---|---|---|---|---|---|---|---|
1 | login_id | Yes | 1..1 | 4 | 246 | See Note (*) | User name of the target user |
2 | after_password | Yes | 1..1 | 16 | 64 | See Note (*) | New password |
3 | before_password | Yes | 1..1 | 16 | 64 | See Note (*) | Old password |
Example:
{ "accesstoken_destruction_information_list":[ { "customer_group_id":"HvlgXxym", "login_id":" fujitsu123"} ] }
{ "accesstoken_destruction_information_list": [ { "customer_group_id": <FJCSContractnumber>, "login_id": <Username> } ] }
3.3.4 Delete user#
- Request
Parameter definition
No. | Item | Required | Cardinality | Min. length | Max. length | Restrictions | Description |
---|---|---|---|---|---|---|---|
1 | login_id | Yes | 1..1 | 4 | 246 | See Note (*) | User name of the user to be deleted |
(*): 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:
/API/v1/api/users/?login_id= fujitsu123
$ LOGIN_ID=<User name (Required)> $ curl -si -X DELETE https://k5-apiportal.paas.cloud.global.fujitsu.com/API/v1/api/users/?login_id=$LOGIN_ID -H "Content-Type:application/json" -H "Token:<Token value>"
2. Response
HTTP STATUS:200
Response body:
No. | Item | Cardinality | Description |
---|---|---|---|
1 | accesstoken_destruction_information_list | 1..1 | User information whose token was cancelled. |
2 | ┣customer_group_id | 1..1 | Group ID to which the user belongs to. |
3 | ┗login_id | 1..1 | Login ID of the user. |
Example:
{ "accesstoken_destruction_information_list":[ { "customer_group_id":"HvlgXxym", "login_id":" fujitsu123"} ] }
{ "accesstoken_destruction_information_list": [ { "customer_group_id": <FJCSContractnumber>, "login_id": <Username> } ] }
3.3.5 Update user authentication information#
- Request
Parameter definition
No. | Item | Required | Cardinality | Min. length | Max. length | Restrictions | Description |
---|---|---|---|---|---|---|---|
1 | login_id | Yes | 1..1 | 4 | 246 | See Note (*) | User name of the target user |
2 | authentication_method | Yes | 1..1 | 1 | 1 | See Note (*) | Authentication method for the user. 0: Authentication by a password 1: Authentication by a certificate & password 2:Authentication by a One Time Password & Password |
(*): Upper / Lower case alphanumeric characters. For more details, please refer to FJCS Portal User Guide
Example:
{ "login_id": "fujitsu123", "authentication_method ":"1", }
$ LOGIN_ID=<User name (Required)> $ AUTHENTICATION_METHOD=<Authentication method (Required)> $ curl -si -X PUT https://k5-apiportal.paas.cloud.global.fujitsu.com/API/v1/api/usersauthenticationmethod -H "Content-Type:application/json" -H "Token: <Token value>" -d '{ "login_id": "'$LOGIN_ID'", " authentication_method ": "'$ AUTHENTICATION_METHOD '"}'
2. Response
HTTP STATUS:200
Response body:
No. | Item | Cardinality | Description |
---|---|---|---|
1 | authentication_method | 1..1 | Authentication method for the user. 0: Authentication by a password 1: Authentication by a certificate & password 2:Authentication by a One Time Password & Password |
2 | accesstoken_destruction_information_list | 1..1 | User information whose token is to be canceled. |
3 | ┣customer_group_id | 1..1 | Contract number of the user whose token is to be canceled. |
4 | ┗login_id | 1..1 | Login ID of the user whose token is to be canceled. |
Example:
{ "authentication_method": "1", "accesstoken_destruction_information_list": [ { "customer_group_id": "HvlgXxym", "login_id": "fujitsu123" } ] }
{ "authentication_method": "<Authentication Method>", "accesstoken_destruction_information_list": [ { "customer_group_id": "<Customer Group Id>", "login_id": "<Login Id>" } ] }