listAudiences
get
/ccadmin/v1/audiences
List Audiences. This operation is used to get the collection of audiences from Oracle Commerce Cloud.
Request
Supported Media Types
- application/json
Query Parameters
- fields
-
Type:
stringThis controls which fields are returned in the response body. The default is to include the top-level response fields and the Audience id, displayName, description, and enabled fields.- limit
Type:integerThis is the field to specify the number of records to be fetched per REST call.- offset
Type:integerThis field specifies the offset/starting index from which data to be fetched.- q
Type:stringThis field specifies the query used to limit Audiences.- sort
Type:stringThis field specifies the sort order of the list to be fetched.- totalResults
Type:booleanIndicates if the total results should be included in the response.Response
Supported Media Types- application/json
200 ResponseFollowing model is returned when operation succeeds.BodyRoot Schema : listAudiences_response- items
-
Type:
arrayitemsAdditional Properties Allowed:The returned list of items. - limit
-
Type:
integerMaximum number of audiences to be fetched. - offset
-
Type:
integerThe starting index of the returned audiences. - sort
-
Type:
objectsortAdditional Properties Allowed:The sort used for the returned audiences. - totalResults
-
Type:
integerThe total number of audiences that match the supplied filter.
Nested Schema : itemsNested Schema : sortType:objectThe sort used for the returned audiences.- order
-
Type:
stringThe sort order: either asc or desc. - property
-
Type:
stringThe property sorted on.
Nested Schema : itemsType:object- deleted
-
Type:
booleanIndicates if this audience is deleted. - description
-
Type:
stringThe audience description. - displayName
-
Type:
stringThe audience display name. - enabled
-
Type:
booleanIndicates if this audience is enabled. - id
-
Type:
stringThe audience Id. - ruleSet
-
Type:
objectruleSetAdditional Properties Allowed:The audience rule set. - usage
-
Type:
arrayusageAdditional Properties Allowed:The array of audience consumers. - useInReports
-
Type:
booleanIndicates if this audience will be used in reporting.
Nested Schema : ruleSetType:objectThe audience rule set.- operator
-
Type:
stringThe operator applied to all of the rules in the rule set. - rules
-
Type:
arrayrulesAdditional Properties Allowed:The array of rules that are contained in the rule set.
Nested Schema : usageNested Schema : rulesNested Schema : itemsType:object- category
-
Type:
stringThe category of the property, i.e. the user profile. - operator
-
Type:
stringThe operator applied to the rule property. - property
-
Type:
stringThe property to be evaluated. - value
-
Type:
stringThe value used to compare against the property value to determine the rule result. Values can be strings, integers, doubles, floats, JSON objects or JSON arrays depending on the operator and how the property was described in the audienceRuleProperty endpoint.
Nested Schema : itemsType:object- assetType
-
Type:
stringThe consumer type. I.e. slots, experiments, etc. - assetTypeDisplayName
-
Type:
stringThe localized user-friendly label for the consumer type. - count
-
Type:
integerThe number of consumers of this type that this audience has.
Example application/json
{ "q":"displayName co \"aud\" or description co \"aud\"", "totalResults":2, "offset":0, "limit":40, "sort":[ { "property":"displayName", "order":"asc" } ], "items":[ { "displayName":"Audience 1", "usage":[ { "assetTypeDisplayName":"Audiences", "count":2, "assetType":"audiences" }, { "assetTypeDisplayName":"Experiments", "count":1, "assetType":"experiments" }, { "assetTypeDisplayName":"Slots", "count":3, "assetType":"slots" } ], "ruleSet":{ "rules":[ { "property":"gender", "category":"profile", "value":"male", "operator":"eq" } ], "operator":"all" }, "description":"blah blah blah", "id":"audience1" }, { "displayName":"Audience 2", "usage":[ { "assetTypeDisplayName":"Audiences", "count":2, "assetType":"audiences" }, { "assetTypeDisplayName":"Promotions", "count":1, "assetType":"promotions" }, { "assetTypeDisplayName":"Slots", "count":3, "assetType":"slots" } ], "ruleSet":{ "rules":[ { "property":"shippingAddress.city", "category":"profile", "value":"San Francisco", "operator":"eq" } ], "operator":"all" }, "description":"blah blah blah", "id":"audience2" } ] }Default ResponseThe error response. The following are the internal error codes thrown by this API when the request processing fails in Oracle Commerce Cloud: |Error Code|Description| |------------------|------------------| |54004|An error occurred accessing audiences with query {0}.| |85003|Invalid attribute in query: {}| |85000|q query param is not valid SCIM filter format|BodyRoot Schema : errorModelType:object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - errors
-
Type:
arrayerrorsAdditional Properties Allowed:An optional list of errors if multiple errors were encountered - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code - type
-
Type:
stringThe URI to the HTTP state code definition
Nested Schema : errorsNested Schema : itemsType:object- devMessage
-
Type:
stringAn optional non-localized message containing technical information for developers - errorCode
-
Type:
stringThe numerical code identifying the error - message
-
Type:
stringThe localized message describing the error - moreInfo
-
Type:
stringAn optional non-localized message with more information - o:errorPath
-
Type:
stringAn optional machine readable description of where the error occurred - status
-
Type:
stringThe HTTP status code
Examples
Sample Response Payload returned by endpoint:
{ "q": "displayName co \"aud\" or description co \"aud\"", "totalResults": 2, "offset": 0, "limit": 40, "sort": [{ "property": "displayName", "order": "asc" }], "items": [ { "displayName": "Audience 1", "usage": [ { "assetTypeDisplayName": "Audiences", "count": 2, "assetType": "audiences" }, { "assetTypeDisplayName": "Experiments", "count": 1, "assetType": "experiments" }, { "assetTypeDisplayName": "Slots", "count": 3, "assetType": "slots" } ], "ruleSet": { "rules": [{ "property": "gender", "category": "profile", "value": "male", "operator": "eq" }], "operator": "all" }, "description": "blah blah blah", "id": "audience1" }, { "displayName": "Audience 2", "usage": [ { "assetTypeDisplayName": "Audiences", "count": 2, "assetType": "audiences" }, { "assetTypeDisplayName": "Promotions", "count": 1, "assetType": "promotions" }, { "assetTypeDisplayName": "Slots", "count": 3, "assetType": "slots" } ], "ruleSet": { "rules": [{ "property": "shippingAddress.city", "category": "profile", "value": "San Francisco", "operator": "eq" }], "operator": "all" }, "description": "blah blah blah", "id": "audience2" } ] }