curl --request POST \
--url https://api.extole.io/v1/components/{component_id}/settings/component-reference/{setting_name}/unselect \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_id": "component_id",
"variant": "variant"
}
'import requests
url = "https://api.extole.io/v1/components/{component_id}/settings/component-reference/{setting_name}/unselect"
payload = {
"component_id": "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_id: 'component_id', variant: 'variant'})
};
fetch('https://api.extole.io/v1/components/{component_id}/settings/component-reference/{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/{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_id' => '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/{setting_name}/unselect"
payload := strings.NewReader("{\n \"component_id\": \"component_id\",\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/{setting_name}/unselect")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_id\": \"component_id\",\n \"variant\": \"variant\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v1/components/{component_id}/settings/component-reference/{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_id\": \"component_id\",\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 a component for a component reference
Clears component_id from the named COMPONENT_REFERENCE setting, along with the values captured with it. A reference pointing at a different component is left untouched, 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/{setting_name}/unselect \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"component_id": "component_id",
"variant": "variant"
}
'import requests
url = "https://api.extole.io/v1/components/{component_id}/settings/component-reference/{setting_name}/unselect"
payload = {
"component_id": "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_id: 'component_id', variant: 'variant'})
};
fetch('https://api.extole.io/v1/components/{component_id}/settings/component-reference/{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/{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_id' => '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/{setting_name}/unselect"
payload := strings.NewReader("{\n \"component_id\": \"component_id\",\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/{setting_name}/unselect")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"component_id\": \"component_id\",\n \"variant\": \"variant\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v1/components/{component_id}/settings/component-reference/{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_id\": \"component_id\",\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": {}
}
}Body
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.
Where this setting takes its value from. LOCAL uses the values stored on this component. INHERITED uses the same-named setting of the nearest ancestor component that is not itself INHERITED. PARAMETER uses the same-named parameter of the socket this component is installed into. For an INHERITED setting, values shows what is stored on this component, not the value in effect; the built setting reports that.
INHERITED, LOCAL, PARAMETER Description shown when a saved reference no longer matches a selectable component. Buildtime expressions use CampaignBuildtimeContext.
Was this page helpful?
