curl --request POST \
--url https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_ids": [
"component_id"
],
"variant": "variant"
}
'import requests
url = "https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect"
payload = {
"component_ids": ["component_id"],
"variant": "variant"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({component_ids: ['component_id'], variant: 'variant'})
};
fetch('https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect', 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.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect",
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([
'component_ids' => [
'component_id'
],
'variant' => 'variant'
]),
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://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect"
payload := strings.NewReader("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}"
response = http.request(request)
puts response.read_body{
"description": "<string>",
"display_name": "<string>",
"name": "<string>",
"priority": "10",
"tags": [
"<string>"
],
"type": "COMPONENT_REFERENCE",
"boundary": {
"type": "ANCESTOR_TYPE",
"ancestor_type": "<string>"
},
"component_type": "<string>",
"lookup_strategy": {
"type": "CAMPAIGN_PATH"
},
"selectable_filters": [
{
"type": "COMPONENT_TYPE",
"component_type": "<string>"
}
],
"source": "INHERITED",
"unmatched_description": "<string>",
"values": {
"default": {},
"en": {}
}
}Unselect components for a component reference list
Clears the components in component_ids from the named COMPONENT_REFERENCE_LIST setting, along with the values captured with them, and leaves every other selected component in place. Naming a component that is not selected leaves the stored value unchanged, though the setting is still saved and a campaign version is still written. Returns the setting in the same shape as GET and PUT on the setting itself. A reference left pointing at nothing warns at build rather than failing it.
curl --request POST \
--url https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_ids": [
"component_id"
],
"variant": "variant"
}
'import requests
url = "https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect"
payload = {
"component_ids": ["component_id"],
"variant": "variant"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({component_ids: ['component_id'], variant: 'variant'})
};
fetch('https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect', 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.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect",
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([
'component_ids' => [
'component_id'
],
'variant' => 'variant'
]),
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://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect"
payload := strings.NewReader("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v1/components/{component_id}/settings/component-reference-list/{setting_name}/unselect")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"component_ids\": [\n \"component_id\"\n ],\n \"variant\": \"variant\"\n}"
response = http.request(request)
puts response.read_body{
"description": "<string>",
"display_name": "<string>",
"name": "<string>",
"priority": "10",
"tags": [
"<string>"
],
"type": "COMPONENT_REFERENCE",
"boundary": {
"type": "ANCESTOR_TYPE",
"ancestor_type": "<string>"
},
"component_type": "<string>",
"lookup_strategy": {
"type": "CAMPAIGN_PATH"
},
"selectable_filters": [
{
"type": "COMPONENT_TYPE",
"component_type": "<string>"
}
],
"source": "INHERITED",
"unmatched_description": "<string>",
"values": {
"default": {},
"en": {}
}
}Authorizations
Body
The components to clear from this reference. Every other selected component stays selected, and naming a component that is not selected changes nothing.
The components to clear from this reference. Every other selected component stays selected, and naming a component that is not selected changes nothing.
The setting value variant the selection is cleared in. Defaults to default.
Response
The setting after the selection was cleared, in the same shape GET and PUT return.
Stored campaign component component reference variable definition. Fields description and unmatched_description are unevaluated and appear in buildtime-evaluatable form.
The description as configured: a literal value, or an expression (type:string) when defined dynamically. Buildtime expressions use CampaignBuildtimeContext.
"10"
COMPONENT_REFERENCE, COMPONENT_REFERENCE_LIST Boundary that limits where selectable components are resolved from.
- Option 1
- Option 2
Show child attributes
Show child attributes
Component type that can be selected by this variable.
Lookup strategy used to match selectable components.
- Option 1
- Option 2
Show child attributes
Show child attributes
Filters that narrow the components available for selection.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
INHERITED, LOCAL, PARAMETER Description shown when a saved reference no longer matches a selectable component. Buildtime expressions use CampaignBuildtimeContext.
Open map of setting values keyed by value key. There is no fixed or maximum number of keys. Any string key may be present; each value uses the same shape for this setting's type. The properties listed here are common examples only and are not required.
Show child attributes
Show child attributes
Was this page helpful?
