API Requests

Once you have learned about authentication, and determining your base URL, you can start making API requests. A basic application and Bulk API request has several components not including authentication. An Oracle Eloqua application and Bulk API request follows the form:


[Verb] [base URL]/API/[APIName]/[APINumber]/[endpoint]
            

Where [APIName] is the name of the API, such as 'rest' or 'bulk', and "[APINumber]" is the version of the API, such as '1.0' or '2.0'.

Therefore an example of a complete request would be as follows:


GET https://secure.p03.eloqua.com/API/rest/1.0/assets/emails
            

The reporting API call consists of an initial authentication and the following API call format. The reporting API only supports GET commands.

GET [baseURL]/API/odata/[subjectArea]/[APIVersionIdentifier]/[endpoint]

For example, a typical API call using the reporting API would look something like:

GET https://secure.p03.eloqua.com/api/odata/campaignAnalysis/1.0/campaign

Where [subjectArea] is the subject area of the endpoint, such as "campaignAnalysis", and [APIVersionIdentifier] is the version of the API, such as "1.0".

In the sections below you will find articles explaining different request components. For a video demonstration of these concepts, refer to the Sending Requests topic in the Eloqua Developer Help Center.

HTTP verbs

Eloqua's API services support four different methods or "verbs": POST, GET, PUT and DELETE. In terms of database functions, these HTTP verbs correspond to the basic operations of "CRUD": create, read, update and delete. Learn more about HTTP verbs.

  • GET is used to retrieve a representation or API entity from a resource. Can be used to retrieve one or more entities. The reporting API only supports GET requests.
  • POST is used to create a new resource.
  • PUT is used to update a resource.
  • DELETE is used to delete a resource.

Endpoints

Endpoints allow access to Oracle Eloqua resources and operations. Each resource/operation is associated with a specific URL. Endpoints have can be accessed and manipulated through HTTP verbs, but not all verbs are valid for all endpoints.

Note:

An endpoint is sometimes referred to as a "URI" or uniform resource identifier.

For example, performing a GET request on the REST 1.0 assets/emails endpoint will return a list of all the emails in your instance's database. However, you cannot perform a POST request on this endpoint.

cURL requests

Learn how to form a request using cURL.