curl --request POST \
--url http://localhost:4200/media/cms \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"page": 123,
"limit": 123,
"config": {}
}
'import requests
url = "http://localhost:4200/media/cms"
payload = {
"query": "<string>",
"page": 123,
"limit": 123,
"config": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', page: 123, limit: 123, config: {}})
};
fetch('http://localhost:4200/media/cms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4200",
CURLOPT_URL => "http://localhost:4200/media/cms",
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([
'query' => '<string>',
'page' => 123,
'limit' => 123,
'config' => [
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:4200/media/cms"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"page\": 123,\n \"limit\": 123,\n \"config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://localhost:4200/media/cms")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"page\": 123,\n \"limit\": 123,\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4200/media/cms")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"page\": 123,\n \"limit\": 123,\n \"config\": {}\n}"
response = http.request(request)
puts response.read_bodyList media from the site's CMS
The CMS tab of the editor’s image picker. POST rather than GET because the body carries a token: the standalone server wires no CMS adapter of its own, so the connection details come from the caller — the editor holds one cmsMedia block per site it knows about. Contentful, Sanity and Strapi are recognised. A CMS read that throws answers { items: [], totalPages: 0 } rather than an error, so a transient CMS outage empties the tab instead of breaking it.
curl --request POST \
--url http://localhost:4200/media/cms \
--header 'Content-Type: application/json' \
--data '
{
"query": "<string>",
"page": 123,
"limit": 123,
"config": {}
}
'import requests
url = "http://localhost:4200/media/cms"
payload = {
"query": "<string>",
"page": 123,
"limit": 123,
"config": {}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({query: '<string>', page: 123, limit: 123, config: {}})
};
fetch('http://localhost:4200/media/cms', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "4200",
CURLOPT_URL => "http://localhost:4200/media/cms",
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([
'query' => '<string>',
'page' => 123,
'limit' => 123,
'config' => [
]
]),
CURLOPT_HTTPHEADER => [
"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 := "http://localhost:4200/media/cms"
payload := strings.NewReader("{\n \"query\": \"<string>\",\n \"page\": 123,\n \"limit\": 123,\n \"config\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
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("http://localhost:4200/media/cms")
.header("Content-Type", "application/json")
.body("{\n \"query\": \"<string>\",\n \"page\": 123,\n \"limit\": 123,\n \"config\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:4200/media/cms")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"query\": \"<string>\",\n \"page\": 123,\n \"limit\": 123,\n \"config\": {}\n}"
response = http.request(request)
puts response.read_bodyBody
Search text.
1-based. Defaults to 1.
1-50. Defaults to 20.
Which bucket to read. Honoured by library mode (createOrchestrator()), which also filters the response by it; the standalone server ignores the field and always returns images.
image, file The CMS connection. { provider: "contentful", spaceId, deliveryToken, environment? }, { provider: "sanity", projectId, dataset?, token? } or { provider: "strapi", url, token? }.
Response
{ items, totalPages }. Library mode also returns canUpload.