About web services about-web-services
Definition of ۶Ƶ Campaign APIs definition-of-adobe-campaign-apis
The ۶Ƶ Campaign application server was designed for openness and easy integration with increasingly diverse and complex company information systems.
۶Ƶ Campaign APIs are used in JavaScript within the application and in SOAP outside of it. They make up a library of generic functions that can be enriched. For further information, refer to Implementing SOAP methods.
A list of all the APIs including their full description is available in [this dedicated documentation](/developer/campaign-api/api/index.html.
Prerequisites prerequisites
Before using the ۶Ƶ Campaign APIs, you need to be familiar with the following topics:
- Javascript
- SOAP protocol
- ۶Ƶ Campaign data model
Using ۶Ƶ Campaign APIs using-adobe-campaign-apis
۶Ƶ Campaign uses two types of APIs:
- Generic data access APIs for querying the data model data. Refer to Data oriented APIs.
- Business specific APIs that let you act on each object: deliveries, workflows, subscriptions, etc. Refer to Business oriented APIs.
In order to develop APIs and interact with ۶Ƶ Campaign, you need to be familiar with your data model. ۶Ƶ Campaign lets you generate a complete description of the base. Refer to Description of the model.
SOAP calls soap-calls
The SOAP protocol lets you invoke API methods, via the rich client, third-party applications using webservices, or JSP using these methods natively.
The structure of a SOAP message is as follows:
- an envelope which defines the structure of the message,
- an optional header,
- a body containing the information about the call and the response,
- error management that defines the error condition.
Resources and exchanges resources-and-exchanges
The following schema shows the various resources involved in the use of ۶Ƶ Campaign APIs:
Example of a SOAP message on the ‘ExecuteQuery’ method example-of-a-soap-message-on-the--executequery--method--
In this example, a SOAP query invokes the “ExecuteQuery” method, which takes a character string as a parameter for authentication (session token) and an XML content for the description of the query to be executed.
For further information, refer to ExecuteQuery (xtk:queryDef).
SOAP query soap-query
<?xml version='1.0' encoding='ISO-8859-1'?>
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='http://xml.apache.org/xml-soap' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Body>
<ExecuteQuery xmlns='urn:xtk:queryDef' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<__sessiontoken xsi:type='xsd:string'/>
<entity xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
<queryDef firstRows="true" lineCount="200" operation="select" schema="nms:rcpGrpRel" startLine="0" startPath="/" xtkschema="xtk:queryDef">
...
</queryDef>
</entity>
</ExecuteQuery>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The <soap-env:envelope>
element is the first element of the message representing the SOAP envelope.
The <soap-env:body>
element is the first child element of the envelope. It contains the description of the message, i.e. the content of the query or the response.
The method to be invoked is entered in the <executequery>
element from the body of the SOAP message.
In SOAP, the parameters are recognized by order of appearance. The first parameter, <__sessiontoken>
, takes the authentication chain, the second parameter is the XML description of the query from the <querydef>
element.
SOAP response soap-response
<?xml version='1.0' encoding='ISO-8859-1'?>
<SOAP-ENV:Envelope xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:ns='http://xml.apache.org/xml-soap' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP-ENV:Body>
<ExecuteQueryResponse xmlns='urn:xtk:queryDef' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'>
<pdomOutput xsi:type='ns:Element' SOAP-ENV:encodingStyle='http://xml.apache.org/xml-soap/literalxml'>
<rcpGrpRel-collection><rcpGrpRel group-id="1872" recipient-id="1362"></rcpGrpRel></rcpGrpRel-collection>
</pdomOutput>
</ExecuteQueryResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The result of the query is entered from the <pdomoutput>
element.
Error management error-management
Example SOAP error response: