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واجهة الإدارة — المستخدمون المشتركون والأدوار
تحديث مستخدم مشارك
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 (أو MANAGEMENT_API_SANDBOX)، يُرسل كقيمة خام لترويسة Authorization — راجع نظرة عامة على Management API — بالإضافة إلى حصة الفريق الخاصة بالحساب للمستخدمين المشاركين. لمعرفة ما يمنحه كل دور فعليًا، راجع الأدوار والصلاحيات؛ وللاطلاع على الصيغة السلكية للأدوار نفسها، راجع الأدوار (مستويات الوصول).integer
مطلوب
معرّف سجل المستخدم المشارك من استجابة السرد أعلاه.
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_levelأو أنشئه، وهو ما تتطلبه استدعاءات الدعوة/التحديث في نقطة النهاية هذه. - إنشاء دور مخصص — ابحث عن معرّف
access_levelأو أنشئه، وهو ما تتطلبه استدعاءات الدعوة/التحديث في نقطة النهاية هذه. - المستخدمون المشاركون — جدول 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