使用此端点更新用户的个人资料信息。
要更改用户的角色,请使用更改用户角色端点。
curl -X PUT \
https://www.digicert.com/services/v2/user/{{user_id}} \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}' \
-d '{
"username": "john.smith@digicert.com",
"first_name": "John",
"last_name": "Smith",
"email": "john.smith@digicert.com",
"job_title": "Senior Admin",
"telephone": "1-555-555-5555"
}'
import requests
url = "https://www.digicert.com/services/v2/user/{{user_id}}"
payload = "{\n \"username\": \"john.smith@digicert.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"email\": \"john.smith@digicert.com\",\n \"job_title\": \"Senior Admin\",\n \"telephone\": \"1-555-555-5555\"\n}"
headers = {
'X-DC-DEVKEY': "{{api_key}}",
'Content-Type': "application/json"
}
response = requests.request("PUT", url, data=payload, headers=headers)
print(response.text)
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v2/user/{{user_id}}"
payload := strings.NewReader("{\n \"username\": \"john.smith@digicert.com\",\n \"first_name\": \"John\",\n \"last_name\": \"Smith\",\n \"email\": \"john.smith@digicert.com\",\n \"job_title\": \"Senior Admin\",\n \"telephone\": \"1-555-555-5555\"\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
var request = require("request");
var options = { method: 'PUT',
url: 'https://www.digicert.com/services/v2/user/{{user_id}}',
headers:
{ 'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}' },
body:
{ username: 'john.smith@digicert.com',
first_name: 'John',
last_name: 'Smith',
email: 'john.smith@digicert.com',
job_title: 'Senior Admin',
telephone: '1-555-555-5555' },
json: true };
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
});
// empty
名称 | 请求/选项 | 类型 | 描述 |
---|---|---|---|
username | 必填 | string |
要更新用户个人资料的用户名。 有效字符:a—zA—Z0—9@-_+ |
first_name | 必填 | string |
要更新用户个人资料的名字。 字符长度限制:128 |
last_name | 必填 | string |
要更新用户个人资料的姓氏。 字符长度限制:128 |
必填 | string |
要更新用户个人资料的电子邮件地址。 仅接受有效的电子邮件地址。 字符长度限制:255 |
|
job_title | 可选 | string |
要更新用户个人资料的职位名称。 对作为 EV 审批者的用户必填。 字符长度限制:64 |
telephone | 可选 | string |
要更新用户个人资料的电话号码。 对作为 EV 审批者的用户必填。 字符长度限制:64 |