Retrieve a list of contact segments
get
/api/rest/2.0/assets/contact/segments
Retrieves all contact segments that match the criteria specified by the request parameters
Request
Supported Media Types
- application/json
Query Parameters
-
count: integer
Maximum number of entities to return. Must be less than or equal to 1000 and greater than or equal to 1.
-
depth: string
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:
minimal
,partial
, andcomplete
. Any other values passed are reset tominimal
by default. -
lastUpdatedAt: integer
Unix timestamp for the date and time the contact segment was last updated.
-
orderBy: string
Specifies the field by which list results are ordered.
-
page: integer
Specifies which page of entities to return (the count parameter defines the number of entities per page). If the page parameter is not supplied, 1 will be used by default.
-
search: string
Specifies the search criteria used to retrieve entities. See the tutorial for information about using this parameter.
Response
Supported Media Types
- application/json
200 Response
OK
Root Schema : QueryResultSegment
Type:
object
Title:
Show Source
QueryResultSegment
-
elements:
array elements
Array of contact segment fields.
-
page:
integer
The specified page.
-
pageSize:
integer
The page size.
-
total:
integer
The total amount of results.
-
type:
string
The asset's type in Eloqua.
Nested Schema : elements
Type:
array
Array of contact segment fields.
Show Source
-
Array of:
object ContactSegment
Title:
ContactSegment
Nested Schema : ContactSegment
Type:
object
Title:
Show Source
ContactSegment
-
count:
string
The number of contacts in the contact segment. This is a read-only property.
-
createdAt:
string
Read Only:
true
The date and time the contact segment was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the contact segment. -
createdByName:
string
The name of the user who created the contact segment.
-
currentStatus:
string
This property is not used for contact segments.
-
dependencyName:
string
Segment_Field_DependencyName_Description
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
description:
string
This property is not used for contact segments.
-
elements:
array elements
Array of contact segment elements.
-
folderId:
string
Read Only:
true
The folder id of the folder which contains the contact segment. -
id:
string
Read Only:
true
Id of the contact segment. This is a read-only property. -
isStale:
string
Whether or not the contact segment has been refreshed in the last 24 hours by the user performing the request.
-
lastCalculatedAt:
string
The date and time of the most recent calculation. This is a read-only property.
-
name:
string
The contact segment's name.
-
permissions:
array permissions
The permissions for the contact segment granted to your current instance. This is a read-only property.
-
scheduledFor:
string
Read Only:
true
This property is not used for contact segments. -
sourceTemplateId:
string
This property is not used for contact segments.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the contact segment was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the contact segment. -
updatedByName:
string
The name of the user who last updated the contact segment.
Nested Schema : elements
Type:
array
Array of contact segment elements.
Show Source
-
Array of:
object SegmentElement
Title:
SegmentElement
Nested Schema : permissions
Type:
array
The permissions for the contact segment granted to your current instance. This is a read-only property.
Show Source
Nested Schema : SegmentElement
Type:
object
Title:
Show Source
SegmentElement
-
count:
string
The number of contacts in the contact segment element. This is a read-only property.
-
createdAt:
string
Read Only:
true
The date and time the contact segment element was created, expressed in Unix time. -
createdBy:
string
Read Only:
true
The login id of the user who created the contact segment element. -
createdByName:
string
The name of the user who created the contact segment element.
-
currentStatus:
string
The contact segment element's current status. This is a read-only property.
-
depth:
string
Read Only:
true
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
description:
string
This property is not used for contact segment elements.
-
folderId:
string
Read Only:
true
The folder id of the folder which contains the contact segment element. -
id:
string
Read Only:
true
Id of the contact segment element. This is a read-only property. -
isIncluded:
string
The total amount of contacts within the segment element.
-
lastCalculatedAt:
string
The date and time the contact segment element was last calculated. This is a read-only property.
-
name:
string
This property is not used for contact segment elements.
-
permissions:
array permissions
The permissions for the contact segment element granted to your current instance. This is a read-only property.
-
scheduledFor:
string
Read Only:
true
This property is not used for contact segment elements. -
sourceTemplateId:
string
This property is not used for contact segment elements.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
updatedAt:
string
Read Only:
true
Unix timestamp for the date and time the contact segment element was last updated. -
updatedBy:
string
Read Only:
true
The login id of the user that last updated the contact segment element. -
updatedByName:
string
The name of the user who last updated the contact segment element.
Nested Schema : permissions
Type:
array
The permissions for the contact segment element granted to your current instance. This is a read-only property.
Show Source
400 Response
Bad request. See Status Codes for information about other possible HTTP status codes.
401 Response
Unauthorized. See Status Codes for information about other possible HTTP status codes.
403 Response
Forbidden. See Status Codes for information about other possible HTTP status codes.
404 Response
The requested resource was not found. See Status Codes for information about other possible HTTP status codes.
500 Response
The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Examples
Retrieve the first 3 contact segments in your database:
GET /api/REST/2.0/assets/contact/segments?count=3
Content-Type: application/json
Response:
{
"elements": [
{
"type": "ContactSegment",
"currentStatus": "Draft",
"id": "70",
"createdAt": "1501002060",
"createdBy": "9",
"depth": "minimal",
"folderId": "1267",
"name": "My new segment name",
"permissions": [
"Retrieve",
"SetSecurity",
"Delete",
"Update"
],
"updatedAt": "1501002674",
"updatedBy": "9"
},
{
"type": "ContactSegment",
"currentStatus": "Draft",
"id": "67",
"createdAt": "1492455370",
"createdBy": "10",
"depth": "minimal",
"folderId": "1267",
"name": "Modern Marketers",
"permissions": [
"Retrieve",
"SetSecurity",
"Delete",
"Update"
],
"updatedAt": "1492455370",
"updatedBy": "10"
},
{
"type": "ContactSegment",
"currentStatus": "Draft",
"id": "4",
"createdAt": "1420037733",
"createdBy": "5",
"depth": "minimal",
"folderId": "1267",
"name": "Oracle Employees",
"permissions": [
"Retrieve",
"SetSecurity",
"Delete",
"Update"
],
"updatedAt": "1420488265",
"updatedBy": "5"
}
],
"page": 1,
"pageSize": 3,
"total": 56
}