curl --request POST \
--url https://api.extole.io/v1/components/{component_id}/operations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "description",
"display_name": "display_name",
"method": "DELETE",
"name": "name",
"path": "path",
"priority": "10",
"tags": [
"tag"
],
"type": "CONSUMER_TO_EXTOLE"
}
'import requests
url = "https://api.extole.io/v1/components/{component_id}/operations"
payload = {
"description": "description",
"display_name": "display_name",
"method": "DELETE",
"name": "name",
"path": "path",
"priority": "10",
"tags": ["tag"],
"type": "CONSUMER_TO_EXTOLE"
}
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({
description: 'description',
display_name: 'display_name',
method: 'DELETE',
name: 'name',
path: 'path',
priority: '10',
tags: ['tag'],
type: 'CONSUMER_TO_EXTOLE'
})
};
fetch('https://api.extole.io/v1/components/{component_id}/operations', 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}/operations",
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([
'description' => 'description',
'display_name' => 'display_name',
'method' => 'DELETE',
'name' => 'name',
'path' => 'path',
'priority' => '10',
'tags' => [
'tag'
],
'type' => 'CONSUMER_TO_EXTOLE'
]),
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}/operations"
payload := strings.NewReader("{\n \"description\": \"description\",\n \"display_name\": \"display_name\",\n \"method\": \"DELETE\",\n \"name\": \"name\",\n \"path\": \"path\",\n \"priority\": \"10\",\n \"tags\": [\n \"tag\"\n ],\n \"type\": \"CONSUMER_TO_EXTOLE\"\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}/operations")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"description\",\n \"display_name\": \"display_name\",\n \"method\": \"DELETE\",\n \"name\": \"name\",\n \"path\": \"path\",\n \"priority\": \"10\",\n \"tags\": [\n \"tag\"\n ],\n \"type\": \"CONSUMER_TO_EXTOLE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v1/components/{component_id}/operations")
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 \"description\": \"description\",\n \"display_name\": \"display_name\",\n \"method\": \"DELETE\",\n \"name\": \"name\",\n \"path\": \"path\",\n \"priority\": \"10\",\n \"tags\": [\n \"tag\"\n ],\n \"type\": \"CONSUMER_TO_EXTOLE\"\n}"
response = http.request(request)
puts response.read_body{
"description": "<string>",
"display_name": "<string>",
"method": "DELETE",
"name": "<string>",
"path": "<string>",
"priority": "10",
"request_schema": {},
"response_schema": {},
"tags": [
"<string>"
],
"type": "CONSUMER_TO_EXTOLE"
}Create a component operation
Declares a new operation on the component identified by component_id.
curl --request POST \
--url https://api.extole.io/v1/components/{component_id}/operations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "description",
"display_name": "display_name",
"method": "DELETE",
"name": "name",
"path": "path",
"priority": "10",
"tags": [
"tag"
],
"type": "CONSUMER_TO_EXTOLE"
}
'import requests
url = "https://api.extole.io/v1/components/{component_id}/operations"
payload = {
"description": "description",
"display_name": "display_name",
"method": "DELETE",
"name": "name",
"path": "path",
"priority": "10",
"tags": ["tag"],
"type": "CONSUMER_TO_EXTOLE"
}
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({
description: 'description',
display_name: 'display_name',
method: 'DELETE',
name: 'name',
path: 'path',
priority: '10',
tags: ['tag'],
type: 'CONSUMER_TO_EXTOLE'
})
};
fetch('https://api.extole.io/v1/components/{component_id}/operations', 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}/operations",
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([
'description' => 'description',
'display_name' => 'display_name',
'method' => 'DELETE',
'name' => 'name',
'path' => 'path',
'priority' => '10',
'tags' => [
'tag'
],
'type' => 'CONSUMER_TO_EXTOLE'
]),
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}/operations"
payload := strings.NewReader("{\n \"description\": \"description\",\n \"display_name\": \"display_name\",\n \"method\": \"DELETE\",\n \"name\": \"name\",\n \"path\": \"path\",\n \"priority\": \"10\",\n \"tags\": [\n \"tag\"\n ],\n \"type\": \"CONSUMER_TO_EXTOLE\"\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}/operations")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"description\",\n \"display_name\": \"display_name\",\n \"method\": \"DELETE\",\n \"name\": \"name\",\n \"path\": \"path\",\n \"priority\": \"10\",\n \"tags\": [\n \"tag\"\n ],\n \"type\": \"CONSUMER_TO_EXTOLE\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.extole.io/v1/components/{component_id}/operations")
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 \"description\": \"description\",\n \"display_name\": \"display_name\",\n \"method\": \"DELETE\",\n \"name\": \"name\",\n \"path\": \"path\",\n \"priority\": \"10\",\n \"tags\": [\n \"tag\"\n ],\n \"type\": \"CONSUMER_TO_EXTOLE\"\n}"
response = http.request(request)
puts response.read_body{
"description": "<string>",
"display_name": "<string>",
"method": "DELETE",
"name": "<string>",
"path": "<string>",
"priority": "10",
"request_schema": {},
"response_schema": {},
"tags": [
"<string>"
],
"type": "CONSUMER_TO_EXTOLE"
}Authorizations
Path Parameters
Body
Body of a POST /v1/components/{component_id}/operations request.
HTTP method of the operation. Buildtime evaluatable. Buildtime expressions use CampaignBuildtimeContext.
DELETE, GET, PATCH, POST, PUT Unique name of the operation within its component. Lowercase letters, digits, underscores and dashes only.
Path of the operation, for example /v5/persons/{person_id}. The host is derived from the operation type and path: events.extole.io for SERVER_TO_EXTOLE on /v6/events, api.extole.io for SERVER_TO_EXTOLE on any other path, or the default program domain of the client for CONSUMER_TO_EXTOLE. Buildtime evaluatable. Buildtime expressions use CampaignBuildtimeContext.
Which Extole API this operation belongs to. Dictates authentication.
CONSUMER_TO_EXTOLE, SERVER_TO_EXTOLE Explanation of what the operation does. Buildtime expressions use CampaignBuildtimeContext.
Human-readable label for the operation, shown in authoring surfaces. Buildtime expressions use CampaignBuildtimeContext.
"10"
Choose between static or dynamic request schema. Buildtime expressions use CampaignBuildtimeContext.
Choose between static or dynamic response schema. Buildtime expressions use CampaignBuildtimeContext.
Freeform labels used for grouping, including category such as ACTION or VIEW.
Freeform labels used for grouping, including category such as ACTION or VIEW.
Response
Successful response
Stored component operation definition. Fields display_name, description, request_schema, response_schema, path, and method are unevaluated and appear in buildtime-evaluatable form.
Explanation of what the operation does. Buildtime expressions use CampaignBuildtimeContext.
Human-readable label for the operation, shown in authoring surfaces. Buildtime expressions use CampaignBuildtimeContext.
HTTP method of the operation. Buildtime evaluatable. Buildtime expressions use CampaignBuildtimeContext.
DELETE, GET, PATCH, POST, PUT Unique name of the operation within its component. Lowercase letters, digits, underscores and dashes only.
Path of the operation, for example /v5/persons/{person_id}. The host is derived from the operation type and path: events.extole.io for SERVER_TO_EXTOLE on /v6/events, api.extole.io for SERVER_TO_EXTOLE on any other path, or the default program domain of the client for CONSUMER_TO_EXTOLE. Buildtime evaluatable. Buildtime expressions use CampaignBuildtimeContext.
"10"
The request schema as configured: a literal value, or an expression (type:string) when defined dynamically. Buildtime expressions use CampaignBuildtimeContext.
The response schema as configured: a literal value, or an expression (type:string) when defined dynamically. Buildtime expressions use CampaignBuildtimeContext.
Freeform labels used for grouping, including category such as ACTION or VIEW.
Freeform labels used for grouping, including category such as ACTION or VIEW.
Which Extole API this operation belongs to. Dictates authentication.
CONSUMER_TO_EXTOLE, SERVER_TO_EXTOLE 