Thursday, April 27, 2017

Oracle Cloud Eloqua Rest API using PHP 


This is an example for  Eloqua Rest API using PHP, which demonstrates how you can access the REST API's to read and retrieve the data from Eloqua.


Below is an example of how this can be achieved using PHP.

The REST API details can be found here:
https://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAC/rest-endpoints.html

The below one retrieves the emails based on the search criteria provided.

Using the Get method: GET /assets/emails?search=Green*

Response: will be in JSON, which was converted to PHP array and parsed.

Array ( [elements] => Array ( [0] => Array ( [type] => Email [currentStatus] => Draft [id] => 56 [createdAt] => 1363635707 [depth] => minimal [folderId] => 379 [name] => Green Laptop Offer NO Trial [permissions] => fullControl [updatedAt] => 1363759032 [updatedBy] => 32 [htmlContent] => Array ( [type] => StructuredHtmlContent ) ) [1] => Array ( [type] => Email [currentStatus] => Draft [id] => 79 [createdAt] => 1366961204 [createdBy] => 23 [depth] => minimal [folderId] => 418 [name] => Green Laptops Registration [permissions] => fullControl [updatedAt] =>

 The final result is formatted to display the required information.


1 comment:

  1. do you offer an rss feed? I would like to follow your posts via rss.
    Thanks,
    -Alexei

    ReplyDelete

Total Pageviews

Copyright © Tech & Management Notes