Update segment
1 min
PUT
https://api.us1.odp.optimizely.com/v3/segments/{segment_id}
Path Parameters
- segment_idstringrequired
Body Parameters
- bodyobjectrequired
- descriptionstringExample
- metadatamap<string, string>Example
{ "display_name": "Customer Has Email" } - definitionSegmentDefinitionExample
{ "root_condition": { "customer_condition": { "customer_filter": { "is_not_missing": { "source": { "path_reference": { "value": "customer.email" } } } } } } }- root_conditionobjectDescription
- Condition
- combinationCondition.Combination
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- conditionsCondition[]
- Circular-Reference
- customer_conditionCustomerCondition
- customer_filterobjectDescription
- Expression
- combinationExpression.CombinationDescription
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- expressionsExpression[]Description
- Circular-Reference
- comparisonComparisonDescription
- lhsExpression
- Circular-Reference
- comparatorComparatorDefaultCOMPARATOR_NOT_SET
- rhsExpression
- Circular-Reference
- path_referencePathReferenceDescription
- valuestring
- string_literalStringLiteralDescription
- valuestring
- number_literalNumberLiteralDescription
- valuestring
- boolean_literalBooleanLiteralDescription
- valueboolean
- is_missingIsMissingDescription
- sourceExpression
- Circular-Reference
- is_not_missingIsNotMissingDescription
- sourceExpression
- Circular-Reference
- false_or_missingFalseOrMissingDescription
- sourceobjectDescription
- Expression
- Circular-Reference
- true_or_missingTrueOrMissingDescription
- sourceobjectDescription
- Expression
- Circular-Reference
- coalesceCoalesceDescription
- sourcesExpression[]Description
- Circular-Reference
- truncate_timeTruncateTimeDescription
- sourceobjectDescription
- Expression
- Circular-Reference
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- timezoneobjectDescription
- Expression
- Circular-Reference
- shift_timeShiftTimeDescription
- sourceobjectDescription
- Expression
- Circular-Reference
- amountobjectDescription
- Expression
- Circular-Reference
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- timezoneobjectDescription
- Expression
- Circular-Reference
- any_of_stringAnyOfStringDescription
- needleExpression
- Circular-Reference
- haystackstring[]
- any_of_numberAnyOfNumberDescription
- needleExpression
- Circular-Reference
- haystackstring[]
- none_of_stringNoneOfStringDescription
- needleExpression
- Circular-Reference
- haystackstring[]
- none_of_numberNoneOfNumberDescription
- needleExpression
- Circular-Reference
- haystackstring[]
- like_any_of_stringLikeAnyOfStringDescription
- needleExpression
- Circular-Reference
- haystackstring[]
- like_none_of_stringLikeNoneOfStringDescription
- needleExpression
- Circular-Reference
- haystackstring[]
- is_list_memberIsListMemberDescription
- liststring
- is_not_list_memberIsNotListMemberDescription
- liststring
- goalobjectDescription
- CustomerContinuation
- combinationobjectDescription
- CustomerContinuation.Combination
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- continuationsCustomerContinuation[]Description
- Circular-Reference
- timeout_sourceobjectDescription
- Expression
- combinationExpression.CombinationDescription
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- Max depth limit reached
- expressionsExpression[]Description
- Max depth limit reached
- comparisonComparisonDescription
- lhsExpression
- Max depth limit reached
- comparatorComparatorDefaultCOMPARATOR_NOT_SET
- Max depth limit reached
- rhsExpression
- Max depth limit reached
- path_referencePathReferenceDescription
- valuestring
- string_literalStringLiteralDescription
- valuestring
- number_literalNumberLiteralDescription
- valuestring
- boolean_literalBooleanLiteralDescription
- valueboolean
- is_missingIsMissingDescription
- sourceExpression
- Max depth limit reached
- is_not_missingIsNotMissingDescription
- sourceExpression
- Max depth limit reached
- false_or_missingFalseOrMissingDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- true_or_missingTrueOrMissingDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- coalesceCoalesceDescription
- sourcesExpression[]Description
- Max depth limit reached
- truncate_timeTruncateTimeDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- Max depth limit reached
- timezoneobjectDescription
- Expression
- Max depth limit reached
- shift_timeShiftTimeDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- amountobjectDescription
- Expression
- Max depth limit reached
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- Max depth limit reached
- timezoneobjectDescription
- Expression
- Max depth limit reached
- any_of_stringAnyOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- any_of_numberAnyOfNumberDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- none_of_stringNoneOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- none_of_numberNoneOfNumberDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- like_any_of_stringLikeAnyOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- like_none_of_stringLikeNoneOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- is_list_memberIsListMemberDescription
- liststring
- is_not_list_memberIsNotListMemberDescription
- liststring
- disqualifierobjectDescription
- CustomerContinuation
- combinationobjectDescription
- CustomerContinuation.Combination
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- continuationsCustomerContinuation[]Description
- Circular-Reference
- timeout_sourceobjectDescription
- Expression
- combinationExpression.CombinationDescription
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- Max depth limit reached
- expressionsExpression[]Description
- Max depth limit reached
- comparisonComparisonDescription
- lhsExpression
- Max depth limit reached
- comparatorComparatorDefaultCOMPARATOR_NOT_SET
- Max depth limit reached
- rhsExpression
- Max depth limit reached
- path_referencePathReferenceDescription
- valuestring
- string_literalStringLiteralDescription
- valuestring
- number_literalNumberLiteralDescription
- valuestring
- boolean_literalBooleanLiteralDescription
- valueboolean
- is_missingIsMissingDescription
- sourceExpression
- Max depth limit reached
- is_not_missingIsNotMissingDescription
- sourceExpression
- Max depth limit reached
- false_or_missingFalseOrMissingDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- true_or_missingTrueOrMissingDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- coalesceCoalesceDescription
- sourcesExpression[]Description
- Max depth limit reached
- truncate_timeTruncateTimeDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- Max depth limit reached
- timezoneobjectDescription
- Expression
- Max depth limit reached
- shift_timeShiftTimeDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- amountobjectDescription
- Expression
- Max depth limit reached
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- Max depth limit reached
- timezoneobjectDescription
- Expression
- Max depth limit reached
- any_of_stringAnyOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- any_of_numberAnyOfNumberDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- none_of_stringNoneOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- none_of_numberNoneOfNumberDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- like_any_of_stringLikeAnyOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- like_none_of_stringLikeNoneOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- is_list_memberIsListMemberDescription
- liststring
- is_not_list_memberIsNotListMemberDescription
- liststring
- inversebooleanDescription
- sequence_conditionSequenceCondition
- sequenceSequence
- entry_event_filterobjectDescription
- Expression
- combinationExpression.CombinationDescription
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- Max depth limit reached
- expressionsExpression[]Description
- Max depth limit reached
- comparisonComparisonDescription
- lhsExpression
- Max depth limit reached
- comparatorComparatorDefaultCOMPARATOR_NOT_SET
- Max depth limit reached
- rhsExpression
- Max depth limit reached
- path_referencePathReferenceDescription
- valuestring
- string_literalStringLiteralDescription
- valuestring
- number_literalNumberLiteralDescription
- valuestring
- boolean_literalBooleanLiteralDescription
- valueboolean
- is_missingIsMissingDescription
- sourceExpression
- Max depth limit reached
- is_not_missingIsNotMissingDescription
- sourceExpression
- Max depth limit reached
- false_or_missingFalseOrMissingDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- true_or_missingTrueOrMissingDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- coalesceCoalesceDescription
- sourcesExpression[]Description
- Max depth limit reached
- truncate_timeTruncateTimeDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- Max depth limit reached
- timezoneobjectDescription
- Expression
- Max depth limit reached
- shift_timeShiftTimeDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- amountobjectDescription
- Expression
- Max depth limit reached
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- Max depth limit reached
- timezoneobjectDescription
- Expression
- Max depth limit reached
- any_of_stringAnyOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- any_of_numberAnyOfNumberDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- none_of_stringNoneOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- none_of_numberNoneOfNumberDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- like_any_of_stringLikeAnyOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- like_none_of_stringLikeNoneOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- is_list_memberIsListMemberDescription
- liststring
- is_not_list_memberIsNotListMemberDescription
- liststring
- unique_key_sourcesExpression[]Description
- combinationExpression.CombinationDescription
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- Max depth limit reached
- expressionsExpression[]Description
- Max depth limit reached
- comparisonComparisonDescription
- lhsExpression
- Max depth limit reached
- comparatorComparatorDefaultCOMPARATOR_NOT_SET
- Max depth limit reached
- rhsExpression
- Max depth limit reached
- path_referencePathReferenceDescription
- valuestring
- string_literalStringLiteralDescription
- valuestring
- number_literalNumberLiteralDescription
- valuestring
- boolean_literalBooleanLiteralDescription
- valueboolean
- is_missingIsMissingDescription
- sourceExpression
- Max depth limit reached
- is_not_missingIsNotMissingDescription
- sourceExpression
- Max depth limit reached
- false_or_missingFalseOrMissingDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- true_or_missingTrueOrMissingDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- coalesceCoalesceDescription
- sourcesExpression[]Description
- Max depth limit reached
- truncate_timeTruncateTimeDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- Max depth limit reached
- timezoneobjectDescription
- Expression
- Max depth limit reached
- shift_timeShiftTimeDescription
- sourceobjectDescription
- Expression
- Max depth limit reached
- amountobjectDescription
- Expression
- Max depth limit reached
- unitTimeUnitDefaultTIME_UNIT_NOT_SET
- Max depth limit reached
- timezoneobjectDescription
- Expression
- Max depth limit reached
- any_of_stringAnyOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- any_of_numberAnyOfNumberDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- none_of_stringNoneOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- none_of_numberNoneOfNumberDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- like_any_of_stringLikeAnyOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- like_none_of_stringLikeNoneOfStringDescription
- needleExpression
- Max depth limit reached
- haystackstring[]
- is_list_memberIsListMemberDescription
- liststring
- is_not_list_memberIsNotListMemberDescription
- liststring
- tracked_dataTrackedData[]Description
- keyKeyDescription
- keystring
- source_pathstringDescription
- field_sub_pathsstring[]Description
- max_age_secondsinteger<int32>DescriptionFormatint32
- goalobjectDescription
- Continuation
- combinationContinuation.Combination
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- Max depth limit reached
- continuationsContinuation[]Description
- Max depth limit reached
- event_filterobjectDescription
- Expression
- combinationExpression.CombinationDescription
- Max depth limit reached
- comparisonComparisonDescription
- Max depth limit reached
- path_referencePathReferenceDescription
- Max depth limit reached
- string_literalStringLiteralDescription
- Max depth limit reached
- number_literalNumberLiteralDescription
- Max depth limit reached
- boolean_literalBooleanLiteralDescription
- Max depth limit reached
- is_missingIsMissingDescription
- Max depth limit reached
- is_not_missingIsNotMissingDescription
- Max depth limit reached
- false_or_missingFalseOrMissingDescription
- Max depth limit reached
- true_or_missingTrueOrMissingDescription
- Max depth limit reached
- coalesceCoalesceDescription
- Max depth limit reached
- truncate_timeTruncateTimeDescription
- Max depth limit reached
- shift_timeShiftTimeDescription
- Max depth limit reached
- any_of_stringAnyOfStringDescription
- Max depth limit reached
- any_of_numberAnyOfNumberDescription
- Max depth limit reached
- none_of_stringNoneOfStringDescription
- Max depth limit reached
- none_of_numberNoneOfNumberDescription
- Max depth limit reached
- like_any_of_stringLikeAnyOfStringDescription
- Max depth limit reached
- like_none_of_stringLikeNoneOfStringDescription
- Max depth limit reached
- is_list_memberIsListMemberDescription
- Max depth limit reached
- is_not_list_memberIsNotListMemberDescription
- Max depth limit reached
- sequence_conditionSequenceCondition
- Circular-Reference
- timeout_sourceobjectDescription
- Expression
- combinationExpression.CombinationDescription
- Max depth limit reached
- comparisonComparisonDescription
- Max depth limit reached
- path_referencePathReferenceDescription
- Max depth limit reached
- string_literalStringLiteralDescription
- Max depth limit reached
- number_literalNumberLiteralDescription
- Max depth limit reached
- boolean_literalBooleanLiteralDescription
- Max depth limit reached
- is_missingIsMissingDescription
- Max depth limit reached
- is_not_missingIsNotMissingDescription
- Max depth limit reached
- false_or_missingFalseOrMissingDescription
- Max depth limit reached
- true_or_missingTrueOrMissingDescription
- Max depth limit reached
- coalesceCoalesceDescription
- Max depth limit reached
- truncate_timeTruncateTimeDescription
- Max depth limit reached
- shift_timeShiftTimeDescription
- Max depth limit reached
- any_of_stringAnyOfStringDescription
- Max depth limit reached
- any_of_numberAnyOfNumberDescription
- Max depth limit reached
- none_of_stringNoneOfStringDescription
- Max depth limit reached
- none_of_numberNoneOfNumberDescription
- Max depth limit reached
- like_any_of_stringLikeAnyOfStringDescription
- Max depth limit reached
- like_none_of_stringLikeNoneOfStringDescription
- Max depth limit reached
- is_list_memberIsListMemberDescription
- Max depth limit reached
- is_not_list_memberIsNotListMemberDescription
- Max depth limit reached
- disqualifierobjectDescription
- Continuation
- combinationContinuation.Combination
- conjunctionConjunctionDefaultCONJUNCTION_NOT_SET
- Max depth limit reached
- continuationsContinuation[]Description
- Max depth limit reached
- event_filterobjectDescription
- Expression
- combinationExpression.CombinationDescription
- Max depth limit reached
- comparisonComparisonDescription
- Max depth limit reached
- path_referencePathReferenceDescription
- Max depth limit reached
- string_literalStringLiteralDescription
- Max depth limit reached
- number_literalNumberLiteralDescription
- Max depth limit reached
- boolean_literalBooleanLiteralDescription
- Max depth limit reached
- is_missingIsMissingDescription
- Max depth limit reached
- is_not_missingIsNotMissingDescription
- Max depth limit reached
- false_or_missingFalseOrMissingDescription
- Max depth limit reached
- true_or_missingTrueOrMissingDescription
- Max depth limit reached
- coalesceCoalesceDescription
- Max depth limit reached
- truncate_timeTruncateTimeDescription
- Max depth limit reached
- shift_timeShiftTimeDescription
- Max depth limit reached
- any_of_stringAnyOfStringDescription
- Max depth limit reached
- any_of_numberAnyOfNumberDescription
- Max depth limit reached
- none_of_stringNoneOfStringDescription
- Max depth limit reached
- none_of_numberNoneOfNumberDescription
- Max depth limit reached
- like_any_of_stringLikeAnyOfStringDescription
- Max depth limit reached
- like_none_of_stringLikeNoneOfStringDescription
- Max depth limit reached
- is_list_memberIsListMemberDescription
- Max depth limit reached
- is_not_list_memberIsNotListMemberDescription
- Max depth limit reached
- sequence_conditionSequenceCondition
- Circular-Reference
- timeout_sourceobjectDescription
- Expression
- combinationExpression.CombinationDescription
- Max depth limit reached
- comparisonComparisonDescription
- Max depth limit reached
- path_referencePathReferenceDescription
- Max depth limit reached
- string_literalStringLiteralDescription
- Max depth limit reached
- number_literalNumberLiteralDescription
- Max depth limit reached
- boolean_literalBooleanLiteralDescription
- Max depth limit reached
- is_missingIsMissingDescription
- Max depth limit reached
- is_not_missingIsNotMissingDescription
- Max depth limit reached
- false_or_missingFalseOrMissingDescription
- Max depth limit reached
- true_or_missingTrueOrMissingDescription
- Max depth limit reached
- coalesceCoalesceDescription
- Max depth limit reached
- truncate_timeTruncateTimeDescription
- Max depth limit reached
- shift_timeShiftTimeDescription
- Max depth limit reached
- any_of_stringAnyOfStringDescription
- Max depth limit reached
- any_of_numberAnyOfNumberDescription
- Max depth limit reached
- none_of_stringNoneOfStringDescription
- Max depth limit reached
- none_of_numberNoneOfNumberDescription
- Max depth limit reached
- like_any_of_stringLikeAnyOfStringDescription
- Max depth limit reached
- like_none_of_stringLikeNoneOfStringDescription
- Max depth limit reached
- is_list_memberIsListMemberDescription
- Max depth limit reached
- is_not_list_memberIsNotListMemberDescription
- Max depth limit reached
- min_countinteger<int32>DescriptionFormatint32
- max_countinteger<int32>DescriptionFormatint32
- externalobjectDescription
- ExternalDefinition
- external_audience_idstringDescription
- collectionsCollection[]
- keystring
- sourceKeyDescription
- keystring
- narrowed_sub_pathsstring[]Description
- uniquebooleanDescription
Responses
200
- InstallSegmentResponseExample
{ "revision": 1 }- revisioninteger<int32>Formatint32
201
- InstallSegmentResponseExample
{ "revision": 1 }- revisioninteger<int32>Formatint32
400
- undefined
curl
curl --request PUT \
--url https://api.us1.odp.optimizely.com/v3/segments/{segment_id} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'PUT',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.us1.odp.optimizely.com/v3/segments/{segment_id}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api.us1.odp.optimizely.com/v3/segments/{segment_id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.us1.odp.optimizely.com/v3/segments/{segment_id}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
200
// A successful response.
{
"revision": ""
}201
// Created.
{
"revision": ""
}400
// Bad Request.
""