Retrieve a list of campaigns

get

/api/rest/2.0/assets/campaigns

Retrieves all campaigns that match the criteria specified by the request parameters.

Request

Supported Media Types
Query Parameters
  • Maximum number of entities to return. Must be less than or equal to 1000 and greater than or equal to 1.
  • Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: minimal, partial, and complete. The default value is minimal.
  • The date and time the campaign was last updated.
  • Specifies the field by which list results are ordered.
  • 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.
  • Specifies the search criteria used to retrieve entities. See the tutorial for information about using this parameter.
Back to Top

Response

Supported Media Types

200 Response

OK
Body ()
Root Schema : QueryResultCampaign
Type: object
Title: QueryResultCampaign
Show Source
Nested Schema : elements
Type: array
Array of campaign fields.
Show Source
Nested Schema : Campaign
Type: object
Title: Campaign
Show Source
Nested Schema : elements
Type: array
A list of campaign elements.
Show Source
Nested Schema : fieldValues
Type: array
Array containing type and id values for all of the contactFields associated with a given contact. For campaigns, "fieldValues" include all custom campaign fields (type, id, value).
Show Source
Nested Schema : permissions
Type: array
The permissions for the campaign granted to your current instance. This is a read-only property.
Show Source
Nested Schema : CampaignElement
Type: object
Title: CampaignElement
Show Source
Nested Schema : outputTerminals
Type: array
A list of the campaign element ids within the campaign. This is a read-only property.
Show Source
Nested Schema : permissions
Type: array
The permissions for the campaign element granted to your current instance. This is a read-only property.
Show Source
Nested Schema : Position
Type: object
Title: Position
Show Source
  • The campaign element's type. This is a read-only property.
  • The position of the campaign element on the x axis.
  • The position of the campaign element on the y axis.
Nested Schema : CampaignOutputTerminal
Type: object
Title: CampaignOutputTerminal
Show Source
Nested Schema : permissions
Type: array
The permissions for the campaign output terminal granted to your current instance.
Show Source
Nested Schema : FieldValue
Type: object
Title: FieldValue
Show Source
  • Read Only: true
    The id of the field to be set to the corresponding value.
  • Name of the field value.
  • The asset's type in Eloqua. This is a read-only property.
  • 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.
Back to Top

Examples

Retrieve the first 2 campaigns in your database:

Note:

See URL parameters for more information on how to customize requests.

GET /api/REST/2.0/assets/campaigns?count=2&page=1
			

Response:


{
    "elements":[
        {
            "type":"Campaign",
            "id":"2",
            "createdAt":"1403035873",
            "createdBy":"15",
            "depth":"minimal",
            "folderId":"308",
            "name":"Test",
            "updatedAt":"1403035877",
            "updatedBy":"15"
        },
        {
            "type":"Campaign",
            "currentStatus":"Draft",
            "id":"3",
            "createdAt":"1403041992",
            "createdBy":"15",
            "depth":"minimal",
            "folderId":"308",
            "name":"Untitled Campaign",
            "updatedAt":"1403041992",
            "updatedBy":"15"
        }
    ],
    "page":1,
    "pageSize":2,
    "total":2
}
			
Back to Top