Retrieve a list of custom object data
get
/api/rest/2.0/data/customObject/{parentId}/instances
Retrieves the data (records) for all custom objects that match the criteria specified by the request parameters.
Request
Supported Media Types
- application/json
Path Parameters
-
parentId: integer
Id of the parent.
Query Parameters
-
count(optional): integer
Maximum number of entities to return. Must be less than or equal to 1000 and greater than or equal to 1.
-
depth(optional): 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. -
orderBy(optional): string
Specifies the field by which list results are ordered.
-
page(optional): integer
Specifies which page of custom object data assets to return (the count parameter defines the number of custom object data assets per page). If the page parameter is not supplied, 1 will be used by default.
-
search(optional): 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 : QueryResultCustomObjectData
Type:
object
Title:
Show Source
QueryResultCustomObjectData
-
elements(optional):
array elements
Array of custom object field elements.
-
page(optional):
integer
The specified page.
-
pageSize(optional):
integer
The page size.
-
total(optional):
integer
The total amount of results.
-
type(optional):
string
The asset's type in Eloqua.
Nested Schema : elements
Type:
array
Array of custom object field elements.
Show Source
-
Array of:
object CustomObjectData
Title:
CustomObjectData
Nested Schema : CustomObjectData
Type:
object
Title:
Show Source
CustomObjectData
-
accessedAt(optional):
string
Read Only:
true
The date and time the custom object data was last accessed, expressed in Unix time. -
accountId(optional):
string
The account record Id associated to this custom object data. This is a read-only property.
-
contactId(optional):
string
The contact record Id associated to this custom object data.
-
createdAt(optional):
string
Read Only:
true
The date and time the custom object data was created, expressed in Unix time. This is a read-only property. -
createdBy(optional):
string
Read Only:
true
The login id of the user who created the custom object data. This is a read-only property. -
currentStatus(optional):
string
The custom object data's current status.
-
customObjectRecordStatus(optional):
string
The record status of the custom object data.
-
depth(optional):
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(optional):
string
The description of the custom object data.
-
fieldValues(optional):
array fieldValues
Array containing
type
andid
values for all of the fields associated with a given custom object data asset. Custom object date field values must be in Unix time format. -
folderId(optional):
string
Read Only:
true
The folder id of the folder which contains the custom object data. -
id(optional):
string
Read Only:
true
Id of the custom object data. -
isMapped(optional):
string
Whether or not the custom object data is mapped to a custom object.
-
name(optional):
string
The name of the custom object data.
-
permissions(optional):
array permissions
The permissions for the custom object data granted to your current instance. This is a read-only property.
-
scheduledFor(optional):
string
Read Only:
true
The date the custom object data is scheduled. -
sourceTemplateId(optional):
string
Id of the template used to create the asset.
-
type(optional):
string
The asset's type in Eloqua. This is a read-only property.
-
uniqueCode(optional):
string
The unique code associated to the custom object data.
-
updatedAt(optional):
string
Read Only:
true
Unix timestamp for the date and time the custom object data was last updated. -
updatedBy(optional):
string
Read Only:
true
The login id of the user that last updated the custom object data.
Nested Schema : fieldValues
Type:
array
Array containing
Show Source
type
and id
values for all of the fields associated with a given custom object data asset. Custom object date field values must be in Unix time format.-
Array of:
object FieldValue
Title:
FieldValue
Nested Schema : permissions
Type:
array
The permissions for the custom object data granted to your current instance. This is a read-only property.
Show Source
Nested Schema : FieldValue
Type:
object
Title:
Show Source
FieldValue
-
id(optional):
string
Read Only:
true
The id of the field to be set to the corresponding value. -
name(optional):
string
Name of the field value.
-
type(optional):
string
The asset's type in Eloqua. This is a read-only property.
-
value(optional):
string
The value to set the corresponding field id to. Date values must be submitted as a unix timestamp.
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
The following examples demonstrate how to retrieve data for custom objects using an HTTP request and cURL. For more information on requests, see API requests.
HTTP Request Example
Retrieve the first 2 custom object data assets in your database:
GET /api/REST/2.0/data/customObject/12/instances?count=2
Response:
{
"elements":[
{
"type":"CustomObjectDataAsset",
"id":"5",
"createdAt":"1402929826",
"createdBy":"2",
"depth":"minimal",
"description":"Opportunity",
"name":"Opportunity",
"updatedAt":"1402929826",
"updatedBy":"2"
},
{
"type":"CustomObjectDataAsset",
"id":"6",
"createdAt":"1402929826",
"createdBy":"2",
"depth":"minimal",
"description":"Purchase History",
"name":"Purchase History",
"updatedAt":"1402929827",
"updatedBy":"2"
}
],
"page":1,
"pageSize":2,
"total":2
}
cURL Example
Here is the same example in cURL given an instance with the name APITest
, username API.User
, and POD of 3
.
curl --user "APITest\API.User" --request GET https://secure.p03.eloqua.com/api/REST/2.0/data/customObject/12/instances?count=2