This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Working with External Assets



Overview

The following operations allow you to work with External Assets. Click an operation name to see details on how to use it.

For a sample proxy service that illustrates how to work with External Assets, see Sample configuration .

For more details click External Assets.

OperationDescription
createAnExternalAsset Creates an external asset.
updateAnExternalAssetUpdates an existing external asset.
getAllExternal AssetsRetrieves all external assets.
getAnExternalAsset Retrieves the details of an external asset specified by the external asset id.
getAllExternalAssetTypes Retrieves all external asset types.
deleteAnExternalAssetDeletes a External Asset associated with the specified external asset id.

Operation Details

This section provides further details on the operations related to External Assets.

Create An External Asset

The createAnExternalAsset operation creates a new external asset.

createAnExternalAsset
<eloquaStandardAPI.createAnExternalAsset>
    <externalAssetTypeId>1</externalAssetTypeId>
    <name>my new asset</name>
</eloquaStandardAPI.createAnExternalAsset>
properties
  • externalAssetTypeId : Unique identifier of the external asset type.

  • name                : Name of the external asset to create the asset on this name.

Sample request

Following is a sample REST/JSON request that can be handled by the createAnExternalAsset operation.

Sample request for createAnExternalAsset
{
   "username":"myusername",
   "password":"mypassword",
   "siteName":"mysiteName",
   "externalAssetTypeId":"1",
   "name":"my new asset"
}

Update An External Asset

The updateAnExternalAsset operation updates an external asset.

updateAnExternalAsset
<eloquaStandardAPI.updateAnExternalAsset>
    <externalAssetId>1</externalAssetId>
    <externalAssetTypeId>1</externalAssetTypeId>
    <name>my asset</name>
</eloquaStandardAPI.updateAnExternalAsset>
properties
  • externalAssetId     : Unique identifier of the external asset.

  • externalAssetTypeId : Unique identifier of the external asset type.

  • name                : Name of the external asset to update the name as it is.

Sample request

Following is a sample REST/JSON request that can be handled by the updateAnExternalAsset operation.

Sample request for updateAnExternalAsset
{   
   "username":"myusername",
   "password":"mypassword",
   "siteName":"mysiteName",
   "externalAssetId":"1",
   "externalAssetTypeId":"1",
   "name":"my new asset"
}

Get All External Assets

The getAllExternal Assets operation retrieves all external assets.

getAllExternalAssets
<eloquaStandardAPI.getAllExternal Assets>
    <count>2</count>
    <depth>1</depth>
    <search></search>
    <page>1</page>
    <orderBy></orderBy>
    <lastUpdatedAt>1426066807</lastUpdatedAt>
    <extensions></extensions>
</eloquaStandardAPI.getAllExternal Assets>
properties
  • count         : The number of results in a page to display. This must me in between 1 and 1000.

  • depth         : The RequestDepth. It can be 'Complete' or 'Reference' or 'Minimal' or 'Partial'.

  • search        : The search field, to search for that field.

  • page          : The page number to display. This must be greater than 1.

  • orderBy       : The order by property to order the fields.

  • lastUpdatedAt : The date time of the last update.

  • extensions    : The extensions to filter. Must follow the pattern : ^[A-Za-z0-9]+$.

Sample Request

Following is a sample REST/JSON request that can be handled by getAllExternalAssets operation.

Sample request for getAllExternalAssets
{   
   "username":"myusername",
   "password":"mypassword",
   "siteName":"mysiteName",
   "count":2,
   "page":1,
   "lastUpdatedAt":1426066807,
   "depth":"Complete"
}

Get An External Asset

The getAnExternalAsset operation retrieves the details of an external asset associated with the specified external asset id.

getAnExternalAsset
<eloquaStandardAPI.getAnExternalAsset>
	<externalAssetId>1</externalAssetId>
	<depth>Complete</depth>
	<extensions></extensions>
</eloquaStandardAPI.getAnExternalAsset>
properties
  • externalAssetId : Unique identifier of the external asset.

  • depth           : The RequestDepth. It can be 'Complete' or 'Reference' or 'Minimal' or 'Partial'.

  • extensions      : The extensions to filter. Must follow the pattern : ^[A-Za-z0-9]+$.

Sample request

Following is a sample REST/JSON request that can be handled by the getAnExternalAsset operation.

Sample request for getAnExternalAsset
{   
   "username":"myusername",
   "password":"mypassword",
   "siteName":"mysiteName",
   "externalAssetId":"1",
   "depth":"Complete"
}

Delete An External Asset

The deleteAnExternalAsset operation deletes an external asset associated with the specified external asset id.

deleteAnExternalAsset
<eloquaStandardAPI.deleteAnExternalAsset>
	<externalAssetId>1</externalAssetId>
</eloquaStandardAPI.deleteAnExternalAsset>
properties
  • externalAssetId : Unique identifier of the external asset.

Sample request

Following is a sample REST/JSON request that can be handled by the deleteAnExternalAsset operation.

Sample request for deleteAnExternalAsset
{  
   "username":"myusername",
   "password":"mypassword",
   "siteName":"mysiteName",
   "externalAssetId":"1"
}

Get All External Asset Types

The getAllExternalAssetTypes operation retrieves all external asset types.

getAllExternalAssetTypes
<eloquaStandardAPI.getAllExternalAssetTypes>
    <count>2</count>
    <depth>1</depth>
    <search></search>
    <page>1</page>
    <orderBy></orderBy>
    <lastUpdatedAt>1426066807</lastUpdatedAt>
    <extensions></extensions>
</eloquaStandardAPI.getAllExternalAssetTypes>
properties
  • count         : The number of results in a page to display. This must me in between 1 and 1000.

  • depth         : The RequestDepth. It can be 'Complete' or 'Reference' or 'Minimal' or 'Partial'.

  • search        : The search field, to search for that field.

  • page          : The page number to display. This must be greater than 1.

  • orderBy       : The order by property to order the fields.

  • lastUpdatedAt : The date time of the last update.

  • extensions    : The extensions to filter. Must follow the pattern : ^[A-Za-z0-9]+$.

Sample request

Following is a sample REST/JSON request that can be handled by the getAllExternalAssetTypes operation.

Sample request for getAllExternalAssetTypes
{   
   "username":"myusername",
   "password":"mypassword",
   "siteName":"mysiteName",
   "count":2,
   "page":1,
   "lastUpdatedAt":1426066807,
   "depth":"Complete"
}

Sample Configuration

Following is a sample proxy service that illustrates how to connect to Eloqua Standard API with the init operation to use the getAllExternalAssets operation. The sample request for this proxy can be found in getAllExternalAssets sample request . You can use this sample as a template for using other operations in this category.

Sample proxy
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="eloqua_getAllExternalAssets"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
    <target>
        <inSequence>
            <property name="siteName" expression="json-eval($.siteName)"/>
            <property name="username" expression="json-eval($.username)"/>
            <property name="password" expression="json-eval($.password)"/>
            <property name="count" expression="json-eval($.count)"/>
            <property name="depth" expression="json-eval($.depth)"/>
            <property name="search" expression="json-eval($.search)"/>
            <property name="page" expression="json-eval($.page)"/>
            <property name="orderBy" expression="json-eval($.orderBy)"/>
            <property name="lastUpdatedAt" expression="json-eval($.lastUpdatedAt)"/>
            <property name="extensions" expression="json-eval($.extensions)"/>
            <eloquaStandardAPI.init>
                <siteName>{$ctx:siteName}</siteName>
                <username>{$ctx:username}</username>
                <password>{$ctx:password}</password>
            </eloquaStandardAPI.init>
            <eloquaStandardAPI.getAllExternalAssets>
                <count>{$ctx:count}</count>
                <depth>{$ctx:depth}</depth>
                <search>{$ctx:search}</search>
                <page>{$ctx:page}</page>
                <orderBy>{$ctx:orderBy}</orderBy>
                <lastUpdatedAt>{$ctx:lastUpdatedAt}</lastUpdatedAt>
                <extensions>{$ctx:extensions}</extensions>
            </eloquaStandardAPI.getAllExternalAssets>
            <respond/>
        </inSequence>
        <outSequence/>
        <faultSequence/>
    </target>
    <description/>
</proxy>