Registering Information
You can register an account.
Request Interface
HTTP Request
POST /accounts/definition
Parameter
Request Parameter |
Value |
Required |
Description |
Default Value |
---|---|---|---|---|
mailAddress |
string |
true |
It must be unique within the HULFT-WebConnect service. It is also used to identify the account.(String of 256 characters in email address format.) |
- |
passwordValidityPeriod |
number |
false |
Password validity period. The unit is days. If 0 is specified, there is no expiration date.(0, or from 30 to 365) |
0 |
ipFilterGroupName |
string |
false |
IP filter group name that is used to restrict access based on source IP address.(String of 1 to 32 alphabet characters, "." (dots), and "-" (hyphens)) |
null |
memo |
string |
false |
String within 256 characters Note for the account.(String within 256 character) |
Blank |
Response Interface
If the request is processed successfully, the following response is returned in JSON format.
Also, the URI of the registered resource is stored in the response header 'Location'.
{ "id": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "mailAddress": "sample@example.com", "statusCode": 0, "isVerifiedMailAddress": true, "passwordValidityPeriod": 0, "ipFilterGroupName": null, "memo": "xxxxxxxxxxxxxxxxxxxxxx" }
Property Name |
Value |
Description |
---|---|---|
id |
string |
ID of the registered account |
mailAddress |
string |
Email address. |
statusCode |
number |
Status code of the account. (0: New, 1: In use, 2: Changing password management method, 3: Changing email address) |
isVerifiedMailAddress |
boolean |
Whether the email address is verified or not. True if it is verified. |
passwordValidityPeriod | number | Password validity period. The unit is days. |
ipFilterGroupName |
string |
IP filter group name that is used to restrict access based on source IP address. |
memo |
string |
Note for the account. |
Examples
public static void main(String[] args) { String host = "https://www.webconnect.hulft.com"; String apiKey = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; try { URL url = new URL(host + "/api/v2/accounts/definition"); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); String postData = "{\"mailAddress\": \"sample@example.com\"," + "\"passwordValidityPeriod\": 0," + "\"ipFilterGroupName\": \"ipFilterGroupName\"," + "\"memo\": \"memo\"}"; connection.setRequestMethod("POST"); connection.setDoOutput(true); connection.setDoInput(true); connection.setRequestProperty("Authorization", "Bearer " + apiKey); connection.setRequestProperty("Content-Type", "application/json"); connection.setRequestProperty("Content-Length", Integer.toString(postData.length())); try (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(connection.getOutputStream()))) { writer.write(postData); } try (BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream()))) { String line; while ((line = reader.readLine()) != null) { System.out.println(line); } } } catch (IOException ex) { // error } }
// load jquery var host = 'https://www.webconnect.hulft.com'; var apiKey = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'; $.ajax({ type: 'POST', url: host + '/api/v2/accounts/definition', headers: { Authorization: 'Bearer ' + apiKey }, contentType: 'application/json', data: JSON.stringify({ "mailAddress": "sample@example.com", "passwordValidityPeriod": 0, "ipFilterGroupName": "ipFilterGroupName", "memo": "memo" }) }).done(function(data, status, xhr) { console.log(data); }).fail(function(data, status, xhr) { console.log(data); });