Update file clearance or safety signals
Uses the current tenant and Library/linked-record permissions. Private preferences and collections belong to the current user. Mutations are unavailable in support sessions. Library managers may narrow visibility. Widening, removing linked-supporter restrictions or weakening safety signals requires media_clearance_manage and access to every associated recipient/program. Consent holds reject widening with 409. Record uploads cannot be reset to not_reviewed and people_detected is not persisted for them.
curl --request PUT \
--url https://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"linked_supporters_only": true,
"people_detected": true,
"minors_detected": true
}
'import requests
url = "https://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance"
payload = {
"linked_supporters_only": True,
"people_detected": True,
"minors_detected": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({linked_supporters_only: true, people_detected: true, minors_detected: true})
};
fetch('https://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance', 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://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance",
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([
'linked_supporters_only' => true,
'people_detected' => true,
'minors_detected' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance"
payload := strings.NewReader("{\n \"linked_supporters_only\": true,\n \"people_detected\": true,\n \"minors_detected\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"linked_supporters_only\": true,\n \"people_detected\": true,\n \"minors_detected\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"linked_supporters_only\": true,\n \"people_detected\": true,\n \"minors_detected\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"file_id": "<string>",
"kind": "<string>",
"editable": true,
"level": "<string>",
"linked_supporters_only": true,
"people_detected": true,
"minors_detected": true,
"can_narrow": true,
"can_widen": true,
"can_record_consent": true,
"can_revoke_consent": true,
"recipient_ids": [
123
],
"recipients": [
{
"id": 123,
"name": "<string>"
}
],
"audiences": {
"supporters": {
"allowed": true,
"reason": "<string>",
"variant": "<string>",
"consent_expires_at": "2023-11-07T05:31:56Z"
},
"public": {
"allowed": true,
"reason": "<string>",
"variant": "<string>",
"consent_expires_at": "2023-11-07T05:31:56Z"
}
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}Authorizations
Passport bearer token authentication for legacy admin sessions.
Path Parameters
File.
Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Response
Update file clearance or safety signals response.
Show child attributes
Show child attributes
curl --request PUT \
--url https://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"linked_supporters_only": true,
"people_detected": true,
"minors_detected": true
}
'import requests
url = "https://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance"
payload = {
"linked_supporters_only": True,
"people_detected": True,
"minors_detected": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({linked_supporters_only: true, people_detected: true, minors_detected: true})
};
fetch('https://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance', 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://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance",
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([
'linked_supporters_only' => true,
'people_detected' => true,
'minors_detected' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance"
payload := strings.NewReader("{\n \"linked_supporters_only\": true,\n \"people_detected\": true,\n \"minors_detected\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"linked_supporters_only\": true,\n \"people_detected\": true,\n \"minors_detected\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/workspace-library/files/{file}/clearance")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"linked_supporters_only\": true,\n \"people_detected\": true,\n \"minors_detected\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"file_id": "<string>",
"kind": "<string>",
"editable": true,
"level": "<string>",
"linked_supporters_only": true,
"people_detected": true,
"minors_detected": true,
"can_narrow": true,
"can_widen": true,
"can_record_consent": true,
"can_revoke_consent": true,
"recipient_ids": [
123
],
"recipients": [
{
"id": 123,
"name": "<string>"
}
],
"audiences": {
"supporters": {
"allowed": true,
"reason": "<string>",
"variant": "<string>",
"consent_expires_at": "2023-11-07T05:31:56Z"
},
"public": {
"allowed": true,
"reason": "<string>",
"variant": "<string>",
"consent_expires_at": "2023-11-07T05:31:56Z"
}
}
}
}{
"message": "Unauthorized",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"message": "Not Found",
"status": "error"
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}{
"errors": {},
"status": "error",
"message": "The given data was invalid."
}{
"message": "Something went wrong. Please try again.",
"status": "error",
"error": "invalid_request",
"code": "DONOR_NOT_FOUND"
}