Save a personal Library filter view
Uses the current tenant and Library/linked-record permissions. Private preferences and collections belong to the current user. Mutations are unavailable in support sessions. Requires a nonblank name and a nonempty valid filters tree. Maximum 100 views per user. Updating replaces the complete saved definition with submitted supported fields.
curl --request POST \
--url https://api.gratona.com/v1/admin/workspace-library/file-views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"filters": {
"id": "<string>",
"rules": "<array>",
"path": [
"<string>"
],
"operator": "<string>",
"value": "<string>",
"negated": true
},
"search": "<string>",
"record": "<string>",
"collection_id": 2,
"display": {
"source": true,
"type": true,
"size": true,
"modified": true
}
}
'import requests
url = "https://api.gratona.com/v1/admin/workspace-library/file-views"
payload = {
"name": "<string>",
"filters": {
"id": "<string>",
"rules": "<array>",
"path": ["<string>"],
"operator": "<string>",
"value": "<string>",
"negated": True
},
"search": "<string>",
"record": "<string>",
"collection_id": 2,
"display": {
"source": True,
"type": True,
"size": True,
"modified": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
filters: {
id: '<string>',
rules: '<array>',
path: ['<string>'],
operator: '<string>',
value: '<string>',
negated: true
},
search: '<string>',
record: '<string>',
collection_id: 2,
display: {source: true, type: true, size: true, modified: true}
})
};
fetch('https://api.gratona.com/v1/admin/workspace-library/file-views', 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/file-views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'filters' => [
'id' => '<string>',
'rules' => '<array>',
'path' => [
'<string>'
],
'operator' => '<string>',
'value' => '<string>',
'negated' => true
],
'search' => '<string>',
'record' => '<string>',
'collection_id' => 2,
'display' => [
'source' => true,
'type' => true,
'size' => true,
'modified' => 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/file-views"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"filters\": {\n \"id\": \"<string>\",\n \"rules\": \"<array>\",\n \"path\": [\n \"<string>\"\n ],\n \"operator\": \"<string>\",\n \"value\": \"<string>\",\n \"negated\": true\n },\n \"search\": \"<string>\",\n \"record\": \"<string>\",\n \"collection_id\": 2,\n \"display\": {\n \"source\": true,\n \"type\": true,\n \"size\": true,\n \"modified\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/admin/workspace-library/file-views")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"filters\": {\n \"id\": \"<string>\",\n \"rules\": \"<array>\",\n \"path\": [\n \"<string>\"\n ],\n \"operator\": \"<string>\",\n \"value\": \"<string>\",\n \"negated\": true\n },\n \"search\": \"<string>\",\n \"record\": \"<string>\",\n \"collection_id\": 2,\n \"display\": {\n \"source\": true,\n \"type\": true,\n \"size\": true,\n \"modified\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/workspace-library/file-views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"filters\": {\n \"id\": \"<string>\",\n \"rules\": \"<array>\",\n \"path\": [\n \"<string>\"\n ],\n \"operator\": \"<string>\",\n \"value\": \"<string>\",\n \"negated\": true\n },\n \"search\": \"<string>\",\n \"record\": \"<string>\",\n \"collection_id\": 2,\n \"display\": {\n \"source\": true,\n \"type\": true,\n \"size\": true,\n \"modified\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"definition": {
"filters": {
"id": "<string>",
"type": "group",
"combinator": "and",
"rules": "<array>",
"path": [
"<string>"
],
"operator": "<string>",
"value": "<string>",
"negated": true
},
"search_mode": "filename",
"search": "<string>",
"record": "<string>",
"source": "records",
"type": "image",
"scope": "all",
"collection_id": 2,
"sort": "name",
"direction": "asc",
"display": {
"source": true,
"type": true,
"size": true,
"modified": true
}
}
}
}{
"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"
}{
"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.
Body
Request fields accepted by this operation. Omitted optional properties retain the behavior described above.
Validation: required|string|max:100.
100Root must be a group; at most40 nodes and4 nested levels, distinct nonempty IDs. Nonroot groups cannot be empty. Rule path contains one available field ID; values follow that field type/options, at most50 items. Range values contain two ordered values. Dates are real YYYY-MM-DD values. Recipient text fields do not support ends_with.
Show child attributes
Show child attributes
Validation: in:filename,content.
filename, content Validation: nullable|string|max:200.
200Validation: nullable|string.
^(entity|donor):[1-9][0-9]*$Validation: nullable|in:records,library,drive,mailings,trips,donations,activities,collaboration,stories,messages,reports.
records, library, drive, mailings, trips, donations, activities, collaboration, stories, messages, reports, null image, pdf, document, spreadsheet, video, audio, archive, other, null Validation: nullable|in:all,recent,starred.
all, recent, starred, null Validation: nullable|integer|min:1.
x >= 1Validation: in:name,modified,size,type.
name, modified, size, type Validation: in:asc,desc.
asc, desc Show child attributes
Show child attributes
Response
Save a personal Library filter view response.
Show child attributes
Show child attributes
curl --request POST \
--url https://api.gratona.com/v1/admin/workspace-library/file-views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"filters": {
"id": "<string>",
"rules": "<array>",
"path": [
"<string>"
],
"operator": "<string>",
"value": "<string>",
"negated": true
},
"search": "<string>",
"record": "<string>",
"collection_id": 2,
"display": {
"source": true,
"type": true,
"size": true,
"modified": true
}
}
'import requests
url = "https://api.gratona.com/v1/admin/workspace-library/file-views"
payload = {
"name": "<string>",
"filters": {
"id": "<string>",
"rules": "<array>",
"path": ["<string>"],
"operator": "<string>",
"value": "<string>",
"negated": True
},
"search": "<string>",
"record": "<string>",
"collection_id": 2,
"display": {
"source": True,
"type": True,
"size": True,
"modified": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
filters: {
id: '<string>',
rules: '<array>',
path: ['<string>'],
operator: '<string>',
value: '<string>',
negated: true
},
search: '<string>',
record: '<string>',
collection_id: 2,
display: {source: true, type: true, size: true, modified: true}
})
};
fetch('https://api.gratona.com/v1/admin/workspace-library/file-views', 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/file-views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'filters' => [
'id' => '<string>',
'rules' => '<array>',
'path' => [
'<string>'
],
'operator' => '<string>',
'value' => '<string>',
'negated' => true
],
'search' => '<string>',
'record' => '<string>',
'collection_id' => 2,
'display' => [
'source' => true,
'type' => true,
'size' => true,
'modified' => 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/file-views"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"filters\": {\n \"id\": \"<string>\",\n \"rules\": \"<array>\",\n \"path\": [\n \"<string>\"\n ],\n \"operator\": \"<string>\",\n \"value\": \"<string>\",\n \"negated\": true\n },\n \"search\": \"<string>\",\n \"record\": \"<string>\",\n \"collection_id\": 2,\n \"display\": {\n \"source\": true,\n \"type\": true,\n \"size\": true,\n \"modified\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.gratona.com/v1/admin/workspace-library/file-views")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"filters\": {\n \"id\": \"<string>\",\n \"rules\": \"<array>\",\n \"path\": [\n \"<string>\"\n ],\n \"operator\": \"<string>\",\n \"value\": \"<string>\",\n \"negated\": true\n },\n \"search\": \"<string>\",\n \"record\": \"<string>\",\n \"collection_id\": 2,\n \"display\": {\n \"source\": true,\n \"type\": true,\n \"size\": true,\n \"modified\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gratona.com/v1/admin/workspace-library/file-views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"filters\": {\n \"id\": \"<string>\",\n \"rules\": \"<array>\",\n \"path\": [\n \"<string>\"\n ],\n \"operator\": \"<string>\",\n \"value\": \"<string>\",\n \"negated\": true\n },\n \"search\": \"<string>\",\n \"record\": \"<string>\",\n \"collection_id\": 2,\n \"display\": {\n \"source\": true,\n \"type\": true,\n \"size\": true,\n \"modified\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 123,
"name": "<string>",
"definition": {
"filters": {
"id": "<string>",
"type": "group",
"combinator": "and",
"rules": "<array>",
"path": [
"<string>"
],
"operator": "<string>",
"value": "<string>",
"negated": true
},
"search_mode": "filename",
"search": "<string>",
"record": "<string>",
"source": "records",
"type": "image",
"scope": "all",
"collection_id": 2,
"sort": "name",
"direction": "asc",
"display": {
"source": true,
"type": true,
"size": true,
"modified": true
}
}
}
}{
"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"
}{
"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"
}