Update a shared user's role/access
curl --request PUT \
--url https://management.scanova.io/multi-users/{pk}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"access_level": 3
}
'import requests
url = "https://management.scanova.io/multi-users/{pk}/"
payload = { "access_level": 3 }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({access_level: 3})
};
fetch('https://management.scanova.io/multi-users/{pk}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://management.scanova.io/multi-users/{pk}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'access_level' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://management.scanova.io/multi-users/{pk}/"
payload := strings.NewReader("{\n \"access_level\": 3\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://management.scanova.io/multi-users/{pk}/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"access_level\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://management.scanova.io/multi-users/{pk}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"access_level\": 3\n}"
response = http.request(request)
puts response.read_body管理 API — 共享用户与角色
更新共享用户
PUT /multi-users//
PUT
/
multi-users
/
{pk}
/
Update a shared user's role/access
curl --request PUT \
--url https://management.scanova.io/multi-users/{pk}/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"access_level": 3
}
'import requests
url = "https://management.scanova.io/multi-users/{pk}/"
payload = { "access_level": 3 }
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({access_level: 3})
};
fetch('https://management.scanova.io/multi-users/{pk}/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://management.scanova.io/multi-users/{pk}/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'access_level' => 3
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://management.scanova.io/multi-users/{pk}/"
payload := strings.NewReader("{\n \"access_level\": 3\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://management.scanova.io/multi-users/{pk}/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"access_level\": 3\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://management.scanova.io/multi-users/{pk}/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"access_level\": 3\n}"
response = http.request(request)
puts response.read_body共享用户是您邀请加入 Scanova 账户的团队成员——与仪表盘 Users 表格中展示的列表相同。此端点让您可以以编程方式列出、邀请、更新或移除他们。
此端点此前未被记录过文档。它需要一个拥有
MANAGEMENT_API(或 MANAGEMENT_API_SANDBOX)配额的 Management API 密钥,以原始 Authorization 请求头的值发送——参见 Management API 概览——外加账户自身用于共享用户的 Team 配额。关于每个角色实际授予的权限,请参见角色与权限;关于角色本身的数据格式,请参见角色(访问级别)。integer
必填
上方列表响应中的共享用户记录 ID。
curl --request PUT \
--url 'https://management.scanova.io/multi-users/118/' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"access_level": 3}'
curl --request PUT \
--url 'https://management.scanova.io/multi-users/118/' \
--header 'Authorization: YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{"is_active": false}'
PUT 返回与上方邀请响应相同的数据结构。
email 和 name 仅限创建时使用——在 PUT 请求体中传入这两个字段会被静默忽略,而不会报错,因为共享用户的身份在邀请发出后无法更改。要更新角色、标签范围或活跃状态,请只传入您打算更改的字段。相关内容
- 列出共享用户 — 查找要在此处操作的
pk。 - 获取共享用户 — 同一
{pk}端点的另一个操作。 - 移除共享用户 — 同一
{pk}端点的另一个操作。 - 列出角色 —— 查找或创建本端点的邀请/更新调用所需的
access_levelID。 - 创建自定义角色 —— 查找或创建本端点的邀请/更新调用所需的
access_levelID。 - 共享用户 —— 仪表盘自身的 Users 表格,展示相同的邀请/停用/移除操作。
- 角色与权限 —— 每个角色实际授予团队成员的权限。
授权
Send your Management API key as the raw value of the Authorization header — no "Bearer " or "Token " prefix, and no other characters. Example: Authorization: 401f7ac837da42b97f613d789819ff93537bee6a. A header containing more than one space-separated part is rejected outright. Requests also require the request's Host header to be the management API host (e.g. management.scanova.io) — the same key sent to the regular API host will not authenticate.
路径参数
请求体
application/json
响应
200
Shared user updated.
此页面对您有帮助吗?
⌘I