Create or update a connection from a "A/B test" node
1 min
POST
https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/abtest/successors/{nodeId}
Path Parameters
- clientIdstringrequiredDescription
- nodeIdstringrequiredDescription
- campaignIdinteger<int64>requiredDescriptionFormatint64
Header Parameters
- acceptstringDescriptionDefaultapplication/jsonAllowedapplication/jsonapplication/vnd.optivo.broadmail.v1+json
Form Parameters
- absoluteinteger<int32>DescriptionFormatint32
- relativenumber<float>DescriptionFormatfloat
- namestringDescription
- targetGroupstringDescription
- predecessorNodeIdstringDescription
- successorNodeIdstringDescription
Responses
200
- RestSplitSuccessor
- nodeIdstringDescription
- namestringDescription
- targetGroupFilter
- namestring
- relativenumber<float>DescriptionFormatfloat
- absoluteinteger<int32>DescriptionFormatint32
- linksobject[]
- uriBuilderobject
- relsstring[]
- relstring
- typestring
- paramsmap<string, string>
- titlestring
- uristring<uri>Formaturi
201
404
curl
curl --request POST \
--url https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/abtest/successors/{nodeId} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/x-www-form-urlencoded");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/abtest/successors/{nodeId}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "net/http"
url = URI("https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/abtest/successors/{nodeId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/x-www-form-urlencoded"
response = https.request(request)
puts response.read_body
python
import requests
url = "https://api.campaign.episerver.net/rest/{clientId}/smartcampaigns/{campaignId}/abtest/successors/{nodeId}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/x-www-form-urlencoded'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The "A/B test" connection was updated successfully.
{
"nodeId": "",
"name": "",
"targetGroup": {
"name": ""
},
"relative": "",
"absolute": "",
"links": [
{
"uriBuilder": {},
"rels": [
""
],
"rel": "",
"type": "",
"params": "",
"title": "",
"uri": ""
}
]
}201
// The "A/B test" connection was created successfully.
404
// The "A/B test" successor node could not be found. Ensure that the required parameters such as "campaignId" or "nodeId" are correct and the successor node exists.