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_bodyManagement-API — Geteilte Nutzer & Rollen
Einen geteilten Benutzer aktualisieren
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_bodyGeteilte Benutzer sind die Teammitglieder, die Sie in Ihr Scanova-Konto einladen — dieselbe Liste, die in der Benutzer-Tabelle des Dashboards angezeigt wird. Mit diesem Endpunkt können Sie sie programmatisch auflisten, einladen, aktualisieren oder entfernen.
Dieser Endpunkt war bisher nicht dokumentiert. Er erfordert einen Management-API-Schlüssel mit
MANAGEMENT_API- (oder MANAGEMENT_API_SANDBOX-)Quota, gesendet als roher Authorization-Header-Wert — siehe die Management-API-Übersicht — sowie die eigene Team-Quota des Kontos für geteilte Benutzer. Was jede Rolle tatsächlich gewährt, erfahren Sie unter Rollen & Berechtigungen; das Wire-Format der Rollen selbst finden Sie unter Rollen (Zugriffsebenen).integer
erforderlich
Die Datensatz-ID des geteilten Benutzers aus der obigen Listenantwort.
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 gibt dieselbe Form wie die obige Einladungs-Antwort zurück.
email und name gelten nur bei der Erstellung — werden sie in einem PUT-Body gesendet, wird dies stillschweigend ignoriert statt einen Fehler auszulösen, da die Identität eines geteilten Benutzers nach dem Versand der Einladung nicht mehr geändert werden kann. Um die Rolle, den Tag-Geltungsbereich oder den aktiven Status zu aktualisieren, verwenden Sie nur die Felder, die Sie tatsächlich ändern möchten.Verwandte Themen
- Geteilte Benutzer auflisten — finden Sie die
pk, mit der Sie hier arbeiten. - Einen geteilten Benutzer abrufen — eine andere Operation an diesem selben
{pk}-Endpunkt. - Einen geteilten Benutzer entfernen — eine andere Operation an diesem selben
{pk}-Endpunkt. - Rollen auflisten — suchen oder erstellen Sie die
access_level-ID, die die Einladungs-/Aktualisierungs-Aufrufe dieses Endpunkts benötigen. - Eine benutzerdefinierte Rolle erstellen — suchen oder erstellen Sie die
access_level-ID, die die Einladungs-/Aktualisierungs-Aufrufe dieses Endpunkts benötigen. - Geteilte Benutzer — die eigene Benutzer-Tabelle des Dashboards, die dieselben Einladungs-/Deaktivierungs-/Entfernungs-Aktionen zeigt.
- Rollen & Berechtigungen — was jede Rolle einem Teammitglied tatsächlich gewährt.
Autorisierungen
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.
Pfadparameter
Body
application/json
Antwort
200
Shared user updated.
War diese Seite hilfreich?
⌘I