curl --request PUT \
--url https://api.example.com/v0/corpora/{corpus_id}/retrieval \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"retrieval": {
"plugin_profile": "<string>",
"fields": [
{
"name": "<string>",
"source_pointer": "<string>",
"roles": []
}
]
}
}
'import requests
url = "https://api.example.com/v0/corpora/{corpus_id}/retrieval"
payload = {
"idempotency_key": "<string>",
"retrieval": {
"plugin_profile": "<string>",
"fields": [
{
"name": "<string>",
"source_pointer": "<string>",
"roles": []
}
]
}
}
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({
idempotency_key: '<string>',
retrieval: {
plugin_profile: '<string>',
fields: [{name: '<string>', source_pointer: '<string>', roles: []}]
}
})
};
fetch('https://api.example.com/v0/corpora/{corpus_id}/retrieval', 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.example.com/v0/corpora/{corpus_id}/retrieval",
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([
'idempotency_key' => '<string>',
'retrieval' => [
'plugin_profile' => '<string>',
'fields' => [
[
'name' => '<string>',
'source_pointer' => '<string>',
'roles' => [
]
]
]
]
]),
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.example.com/v0/corpora/{corpus_id}/retrieval"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"retrieval\": {\n \"plugin_profile\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"source_pointer\": \"<string>\",\n \"roles\": []\n }\n ]\n }\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.example.com/v0/corpora/{corpus_id}/retrieval")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"retrieval\": {\n \"plugin_profile\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"source_pointer\": \"<string>\",\n \"roles\": []\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/corpora/{corpus_id}/retrieval")
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 \"idempotency_key\": \"<string>\",\n \"retrieval\": {\n \"plugin_profile\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"source_pointer\": \"<string>\",\n \"roles\": []\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"operation_id": "<string>",
"kind": "<string>",
"state": "queued",
"counters": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}
],
"progress": 0.5,
"previous_operation_id": "<string>",
"corpus_id": "<string>",
"result": {
"projection_generation_id": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}Configure retrieval
Resolve mapping and schedule a new immutable Projection Generation through a retrieval_configuration Operation (202 with Location). Existing active config remains in effect, and is what getCorpus returns, until validated cutover; the Operation reports the pending config’s progress and outcome but not its content. A newer accepted config supersedes older pending ones, and a generation pinned to an older config than the effective one fails with retrieval_configuration_superseded instead of reverting it. Same key and canonical request replay the Operation; a changed request is 409 idempotency_conflict. Does not require a separate per-Corpus physical collection.
curl --request PUT \
--url https://api.example.com/v0/corpora/{corpus_id}/retrieval \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"idempotency_key": "<string>",
"retrieval": {
"plugin_profile": "<string>",
"fields": [
{
"name": "<string>",
"source_pointer": "<string>",
"roles": []
}
]
}
}
'import requests
url = "https://api.example.com/v0/corpora/{corpus_id}/retrieval"
payload = {
"idempotency_key": "<string>",
"retrieval": {
"plugin_profile": "<string>",
"fields": [
{
"name": "<string>",
"source_pointer": "<string>",
"roles": []
}
]
}
}
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({
idempotency_key: '<string>',
retrieval: {
plugin_profile: '<string>',
fields: [{name: '<string>', source_pointer: '<string>', roles: []}]
}
})
};
fetch('https://api.example.com/v0/corpora/{corpus_id}/retrieval', 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.example.com/v0/corpora/{corpus_id}/retrieval",
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([
'idempotency_key' => '<string>',
'retrieval' => [
'plugin_profile' => '<string>',
'fields' => [
[
'name' => '<string>',
'source_pointer' => '<string>',
'roles' => [
]
]
]
]
]),
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.example.com/v0/corpora/{corpus_id}/retrieval"
payload := strings.NewReader("{\n \"idempotency_key\": \"<string>\",\n \"retrieval\": {\n \"plugin_profile\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"source_pointer\": \"<string>\",\n \"roles\": []\n }\n ]\n }\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.example.com/v0/corpora/{corpus_id}/retrieval")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"idempotency_key\": \"<string>\",\n \"retrieval\": {\n \"plugin_profile\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"source_pointer\": \"<string>\",\n \"roles\": []\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v0/corpora/{corpus_id}/retrieval")
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 \"idempotency_key\": \"<string>\",\n \"retrieval\": {\n \"plugin_profile\": \"<string>\",\n \"fields\": [\n {\n \"name\": \"<string>\",\n \"source_pointer\": \"<string>\",\n \"roles\": []\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"operation_id": "<string>",
"kind": "<string>",
"state": "queued",
"counters": {},
"errors": [
{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}
],
"progress": 0.5,
"previous_operation_id": "<string>",
"corpus_id": "<string>",
"result": {
"projection_generation_id": "<string>"
}
}{
"code": "<string>",
"message": "<string>",
"retryable": true,
"field": "<string>",
"resync_url": "<string>"
}Authorizations
API key, not necessarily a JWT. Server derives Organization, permitted actions and Corpus scope; every resource access is authorized.
Path Parameters
1Body
1Pin a plugin-provided profile when resolving config. Explicit fields override default fields by logical name; unmapped source data remains preserved. getCorpus returns the effective resolved fields. The only built-in profile, example.editorial, is illustrative (paired with the example extension namespace), not a product default; an uninstalled profile is 422 unsupported_profile.
Show child attributes
Show child attributes
Response
Successful response
Administrative execution only. Retries keep identity. Intentional terminal rerun has a new ID and previous_operation_id. Cancellation does not promise universal rollback; already-terminal state and racing completion may win. projection_rebuild and retrieval_configuration Operations require corpus_id; when succeeded they require result naming the activated logical generation. This result shape covers those two command kinds only.
11queued, running, succeeded, failed, cancel_requested, canceled Show child attributes
Show child attributes
20Show child attributes
Show child attributes
Approximate fraction, omitted when unknown.
0 <= x <= 111Logical generation activated for the requested Corpus. Opaque ID, never a physical search collection name.
Show child attributes
Show child attributes