Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Campaign Reporting via API documentation

Avatar

Level 1

Hi Adobe Campaign Community:

 

Is there a definitive guide to obtaining detailed Adobe Campaign Reports via API?

 

Michael

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can query acc instance, any schema and pull data out through API, by querying the souprouter.jsp endpoint. "https://<yourinstance>/nl/jsp/soaprouter.jsp"

 

You need to download the wsdl file and import it into your microservice or soapUI tool for testing.

 

Web service description: WSDL

A WSDL (Web Service Description Library) file is available for each service. This XML file uses a metalanguage to describe the service and to specify the available methods, parameters, and the server to contact for executing the service.

WSDL file generation

To generate a WSDL file, you must enter the following URL from a Web browser:

https://<server>/nl/jsp/schemawsdl.jsp?schema=<schema>

 

Using the following queryDef script, you could essentially query any schema and select columns and add conditions.

Call examples

  • Using HttpSoapConnection/SoapService:

    var cnx = new HttpSoapConnection("https://serverURL/nl/jsp/soaprouter.jsp");
  var session = new SoapService(cnx, 'urn:xtk:session');
  session.addMethod("Logon", "xtk:session#Logon",
                      ["sessiontoken", "string", "Login", "string", "Password", "string", "Parameters", "NLElement"],
                      ["sessionToken", "string", "sessionInfo", "NLElement", "securityToken", "string"]);

  var res = session.Logon("", "admin", "pwd", <param/>);
  var sessionToken = res[0];
  var securityToken = res[2];

  cnx.addTokens(sessionToken, securityToken);
  var query = new SoapService(cnx, 'urn:xtk:queryDef');
  query.addMethod("ExecuteQuery", "xtk:queryDef#ExecuteQuery",
                      ["sessiontoken", "string", "entity", "NLElement"],
                      ["res", "NLElement"]);

  var queryRes = query.ExecuteQuery("", <queryDef operation="select" schema="nms:recipient">
            <select>
              <node expr="@email"/>
              <node expr="@lastName"/>
              <node expr="@firstName"/>
            </select>
            <where>
              <condition expr="@email = 'joe.doe@aol.com'"/>
            </where>
          </queryDef>);
  logInfo(queryRes[0].toXMLString())

 

 

 

Here are some resources:

  1. https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/api/web-...
  2. https://blog.qburst.com/2020/09/a-friendly-intro-to-soap-web-services-in-adobe-campaign/

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

You can query acc instance, any schema and pull data out through API, by querying the souprouter.jsp endpoint. "https://<yourinstance>/nl/jsp/soaprouter.jsp"

 

You need to download the wsdl file and import it into your microservice or soapUI tool for testing.

 

Web service description: WSDL

A WSDL (Web Service Description Library) file is available for each service. This XML file uses a metalanguage to describe the service and to specify the available methods, parameters, and the server to contact for executing the service.

WSDL file generation

To generate a WSDL file, you must enter the following URL from a Web browser:

https://<server>/nl/jsp/schemawsdl.jsp?schema=<schema>

 

Using the following queryDef script, you could essentially query any schema and select columns and add conditions.

Call examples

  • Using HttpSoapConnection/SoapService:

    var cnx = new HttpSoapConnection("https://serverURL/nl/jsp/soaprouter.jsp");
  var session = new SoapService(cnx, 'urn:xtk:session');
  session.addMethod("Logon", "xtk:session#Logon",
                      ["sessiontoken", "string", "Login", "string", "Password", "string", "Parameters", "NLElement"],
                      ["sessionToken", "string", "sessionInfo", "NLElement", "securityToken", "string"]);

  var res = session.Logon("", "admin", "pwd", <param/>);
  var sessionToken = res[0];
  var securityToken = res[2];

  cnx.addTokens(sessionToken, securityToken);
  var query = new SoapService(cnx, 'urn:xtk:queryDef');
  query.addMethod("ExecuteQuery", "xtk:queryDef#ExecuteQuery",
                      ["sessiontoken", "string", "entity", "NLElement"],
                      ["res", "NLElement"]);

  var queryRes = query.ExecuteQuery("", <queryDef operation="select" schema="nms:recipient">
            <select>
              <node expr="@email"/>
              <node expr="@lastName"/>
              <node expr="@firstName"/>
            </select>
            <where>
              <condition expr="@email = 'joe.doe@aol.com'"/>
            </where>
          </queryDef>);
  logInfo(queryRes[0].toXMLString())

 

 

 

Here are some resources:

  1. https://experienceleague.adobe.com/docs/campaign-classic/using/configuring-campaign-classic/api/web-...
  2. https://blog.qburst.com/2020/09/a-friendly-intro-to-soap-web-services-in-adobe-campaign/