Update User
Overview¶
You can update records using the API.
Supported Versions¶
Function to update email address via API¶
- Pleasanter 1.3.22.0 or later
Preparations¶
Please Create an API Key before performing API operations.
Also, this function can only be performed by the tenant manager, so please set up the tenant manager from user management.
Request¶
Send json data in the following request format:
| Setting column | Value |
|---|---|
| HTTP Method | POST |
| Content-Type | application/json |
| Character Code | UTF-8 |
| URL | http://{server name}/api/users/{user ID}/update (*1) |
| Body | Refer to the json data below |
(*1) Please edit the {server name} and {user ID} parts to suit your environment as appropriate.
For Pleasanter.net, the format is as follows:
https://pleasanter.net/fs/api/users/{user ID}/update
JSON¶
{
"ApiVersion": 1.1,
"ApiKey": "8s63Aiigd98h51Dfda7951...",
"Name": "[Updated User Name]",
"MailAddresses": [
"webmaster@example.com",
"info@example.com"
]
}
*To update email addresses, list them in the MailAddresses (optional). Setting one or multiple email addresses for a single user is possible. The update is done using a replacement method (delete the old email address information and add the new one).
Response¶
The json data in the following format will be returned.
JSON¶
About MailAddresses Settings¶
The email addresses will be deleted if the MailAddresses parameter is specified as follows and the list is empty.
JSON¶
{
"ApiVersion": 1.1,
"ApiKey": "8s63Aiigd98h51Dfda7951...",
"Name": "[Updated User Name]",
"MailAddresses": [
]
}
The email address will not be updated (deleted) if the MailAddresses parameter is not specified as follows.
JSON¶
Confirmation Column in Case of Error¶
・Precautions when using the API and things to check if an error occurs
・FAQ: What to check if modified configuration files or API requests (JSON format) are not recognized correctly
Specification Changes¶
*API specifications have been partially changed since November 2018.**
- The URL format has been changed from '/pleasanter/api_items/xxxx' to '/pleasanter/api/items/xxxx'.
- The Content-Type specification has been changed from 'application/x-www-form-urlencoded' to 'application/json'.