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.ItemTypeCardinalityDescription
1errorLevelstring1..1Error level
2frameworkobject1..1Framework object
3┗systemErrorCodestring1..1System error code
4businessobject1..1Business object
5┗businessErrorInfostring1..1Business error information
6┣responseErrorCodestring1..1Response error code
7┗embeddedStringstring array1..1Error message

Example:

{
  "errorLevel": "888",
  "framework": {
    "systemErrorCode": ""
  },
  "business": {
    "businessErrorInfo": "BECSA000113",
    "responseErrorCode": "RCS100001",
    "embeddedString": [
      "Internal Server Error"
    ]
  }
}

List of response errors

No.HTTP statusError InformationError messageError reason
1400Request 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: XXXInput parameter check error (digit number fault)
The format of parameter is invalid. Specified parameter: XXXInput parameter format error (other than digit number)
2400Delete contractor errorCould not delete user because the target user is a contractor.Try to delete a contractor
3400Password check errorPassword 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
4400Invalid user statusCannot change user information because user status of the target user is invalid.Try to change information of user whose status is invalid
5401Invalid tokenThe specified access token is not valid.Access token is not valid
6403Authorization errorAuthorization Error.Action not authorized
7403Change contractor status errorUnauthorized to change information of the specified user.Try to change user status of a contractor
8404Not foundThe target information does not exist.Target information not found
9409Exclusive errorOperation conflicts with another one.Target information has already been changed by another process
10500Internal Server ErrorInternal Server Error.Consistency error, or other server errors

3.3 API Specification#

3.3.1 Create new user#

  1. Request
    Parameter definition

No.ItemRequiredCardinalityMin. lengthMax. lengthRestrictionsDescription
1login_idYes1..14246See Note ()User name of the user to be created
2user_descriptionNo0..11255See Note ()User description of the user to be created
3mailaddressYes1..11256Proper email address format ()Email address of the user to be created
4user_statusYes1..111Invalid (0) / Valid (1)User status of the user to be created
5passwordYes1..11664See Note ()Password of the user to be created
6language_codeYes1..122Japanese (ja) / English (en)Language code of the user to be created
7role_codeYes1..122Administrator (00),Developer (01)Role code of the user to be created
8user_last_nameYes1..1164See Note ()Last name of the user to be created
9user_first_nameYes1..1164See 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.ItemCardinalityDescription
1login_id1..1User name of the newly created user
2user_description1..1User description of the newly created user
3mailaddress1..1Email address of the newly created user
4user_status1..1User status of the newly created user Invalid (0) / Valid (1)
5language_code1..1Language code of the newly created user Japanese (ja) / English (en)
6authentication_method1..1Authentication method  * This API returns fixed value: Password authentication (0)
7user_last_name1..1Last name of the newly created user
8user_first_name1..1First 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#

  1. Request
    Parameter definition
No.ItemRequiredCardinalityMin. lengthMax. lengthRestrictionsDescription
1login_idYes1..14246See Note (**)User name of the target user
2mailaddressNo (*)0..11256Proper email address format (***)New email address
3user_descriptionNo (*)0..11255See Note (**)New user description
4language_codeNo (*)0..122Japanese (ja) / English (en)New language code
5user_statusNo (*)0..111Invalid (0) / Valid (1)   * Trying to change user status of a contractor will result in errorNew user status
6passwordNo (*)0..11664See Note(**)New password
7user_last_nameNo (*)0..1164See Note(**)New user Last name
8user_first_nameNo (*)0..1164See 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.ItemCardinalityDescription
1login_id1..1User name of the target user
2language_code1..1New language code
3user_status1..1New user status
4mailaddress1..1New email address
5user_description1..1New user description
6user_last_name1..1New user Last name
7user_first_name1..1New user First name
8accesstoken_destruction_information_list1..1User information whose token was cancelled.
9┣customer_group_id1..1Group ID to which the user belongs to.
10┗login_id1..1Login 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#

  1. Request
    Parameter definition
No.ItemRequiredCardinalityMin. lengthMax. lengthRestrictionsDescription
1login_idYes1..14246See Note (*)User name of the target user
2after_passwordYes1..11664See Note (*)New password
3before_passwordYes1..11664See 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.ItemRequiredCardinalityMin. lengthMax. lengthRestrictionsDescription
1login_idYes1..14246See Note (*)User name of the target user
2after_passwordYes1..11664See Note (*)New password
3before_passwordYes1..11664See 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#

  1. 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.ItemCardinalityDescription
1accesstoken_destruction_information_list1..1User information whose token was cancelled.
2┣customer_group_id1..1Group ID to which the user belongs to.
3┗login_id1..1Login 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#

  1. Request
    Parameter definition
No.ItemRequiredCardinalityMin. lengthMax. lengthRestrictionsDescription
1login_idYes1..14246See Note (*)User name of the target user
2authentication_methodYes1..111See 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.ItemCardinalityDescription
1authentication_method1..1Authentication method for the user. 0: Authentication by a password 1: Authentication by a certificate & password 2:Authentication by a One Time Password & Password
2accesstoken_destruction_information_list1..1User information whose token is to be canceled.
3┣customer_group_id1..1Contract number of the user whose token is to be canceled.
4┗login_id1..1Login 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>"
		}
	]
}