curl --request POST \
--url https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "body",
"component_ids": [
"component_id"
],
"component_references": [
{
"component_id": "component_id",
"socket_names": [
"socket_name"
]
}
],
"enabled": true,
"headers": {
"headers_key": "headers_key"
},
"quality": "ALWAYS",
"response": {
"body": "body",
"headers": {
"headers_key": "headers_key"
},
"statusCode": 1
}
}
'import requests
url = "https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays"
payload = {
"body": "body",
"component_ids": ["component_id"],
"component_references": [
{
"component_id": "component_id",
"socket_names": ["socket_name"]
}
],
"enabled": True,
"headers": { "headers_key": "headers_key" },
"quality": "ALWAYS",
"response": {
"body": "body",
"headers": { "headers_key": "headers_key" },
"statusCode": 1
}
}
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({
body: JSON.stringify('body'),
component_ids: ['component_id'],
component_references: [{component_id: 'component_id', socket_names: ['socket_name']}],
enabled: true,
headers: {headers_key: 'headers_key'},
quality: 'ALWAYS',
response: {
body: JSON.stringify('body'),
headers: {headers_key: 'headers_key'},
statusCode: 1
}
})
};
fetch('https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays', 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/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays",
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([
'body' => 'body',
'component_ids' => [
'component_id'
],
'component_references' => [
[
'component_id' => 'component_id',
'socket_names' => [
'socket_name'
]
]
],
'enabled' => true,
'headers' => [
'headers_key' => 'headers_key'
],
'quality' => 'ALWAYS',
'response' => [
'body' => 'body',
'headers' => [
'headers_key' => 'headers_key'
],
'statusCode' => 1
]
]),
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/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays"
payload := strings.NewReader("{\n \"body\": \"body\",\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"enabled\": true,\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"quality\": \"ALWAYS\",\n \"response\": {\n \"body\": \"body\",\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"statusCode\": 1\n }\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/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"body\",\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"enabled\": true,\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"quality\": \"ALWAYS\",\n \"response\": {\n \"body\": \"body\",\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"statusCode\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays")
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 \"body\": \"body\",\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"enabled\": true,\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"quality\": \"ALWAYS\",\n \"response\": {\n \"body\": \"body\",\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"statusCode\": 1\n }\n}"
response = http.request(request)
puts response.read_bodyCreate a display action
Adds a display action to the specified campaign controller. When the controller’s triggers fire, this action controls which content zone or creative is displayed to the participant. Returns the created display action with its server-assigned id.
curl --request POST \
--url https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "body",
"component_ids": [
"component_id"
],
"component_references": [
{
"component_id": "component_id",
"socket_names": [
"socket_name"
]
}
],
"enabled": true,
"headers": {
"headers_key": "headers_key"
},
"quality": "ALWAYS",
"response": {
"body": "body",
"headers": {
"headers_key": "headers_key"
},
"statusCode": 1
}
}
'import requests
url = "https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays"
payload = {
"body": "body",
"component_ids": ["component_id"],
"component_references": [
{
"component_id": "component_id",
"socket_names": ["socket_name"]
}
],
"enabled": True,
"headers": { "headers_key": "headers_key" },
"quality": "ALWAYS",
"response": {
"body": "body",
"headers": { "headers_key": "headers_key" },
"statusCode": 1
}
}
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({
body: JSON.stringify('body'),
component_ids: ['component_id'],
component_references: [{component_id: 'component_id', socket_names: ['socket_name']}],
enabled: true,
headers: {headers_key: 'headers_key'},
quality: 'ALWAYS',
response: {
body: JSON.stringify('body'),
headers: {headers_key: 'headers_key'},
statusCode: 1
}
})
};
fetch('https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays', 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/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays",
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([
'body' => 'body',
'component_ids' => [
'component_id'
],
'component_references' => [
[
'component_id' => 'component_id',
'socket_names' => [
'socket_name'
]
]
],
'enabled' => true,
'headers' => [
'headers_key' => 'headers_key'
],
'quality' => 'ALWAYS',
'response' => [
'body' => 'body',
'headers' => [
'headers_key' => 'headers_key'
],
'statusCode' => 1
]
]),
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/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays"
payload := strings.NewReader("{\n \"body\": \"body\",\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"enabled\": true,\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"quality\": \"ALWAYS\",\n \"response\": {\n \"body\": \"body\",\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"statusCode\": 1\n }\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/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"body\",\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"enabled\": true,\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"quality\": \"ALWAYS\",\n \"response\": {\n \"body\": \"body\",\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"statusCode\": 1\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v2/campaigns/{campaignId}{version}/controllers/{controllerId}/actions/displays")
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 \"body\": \"body\",\n \"component_ids\": [\n \"component_id\"\n ],\n \"component_references\": [\n {\n \"component_id\": \"component_id\",\n \"socket_names\": [\n \"socket_name\"\n ]\n }\n ],\n \"enabled\": true,\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"quality\": \"ALWAYS\",\n \"response\": {\n \"body\": \"body\",\n \"headers\": {\n \"headers_key\": \"headers_key\"\n },\n \"statusCode\": 1\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Path Parameters
(/version/.+)?Body
Body of a POST /v2/campaigns/{campaignId}{version:(/version/.+)?}/controllers/{controllerId}/actions/displays request.
Choose between static or dynamic body
Show child attributes
Show child attributes
Choose between static or dynamic enabled
Choose between static or dynamic headers
Show child attributes
Show child attributes
ALWAYS, HIGH, LOW Choose between static or dynamic response
Show child attributes
Show child attributes
Response
Successful response
DISPLAY Show child attributes
Show child attributes
The enabled as configured: a literal value, or an expression (type:string) when defined dynamically.
ALWAYS, HIGH, LOW The body as configured: a literal value, or an expression (type:string) when defined dynamically.
The headers as configured: a literal value, or an expression (type:string) when defined dynamically.
Show child attributes
Show child attributes
The response as configured: a literal value, or an expression (type:string) when defined dynamically.
Show child attributes
Show child attributes
