Export Data Using REST APIs

List all the Available Objects to Export

First, let us get a list of objects in your instance of Oracle CX Sales and Fusion Service that support export through REST APIs.

Send a GET request using the following curl command for a list of supported objects.

cURL Command

curl --user sales_cloud_user https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/importExportObjectMetadata?orderBy=DisplayName:asc

Response Payload

Here's an example of the response body in JSON format.

{
  "items" :
 [  {
    "DisplayName": "Account",
    "ExportSupport": "Y",
    "PuidAttribute": "PartyNumber",
    "KeyAttributes": "PartyId",
    "RequiredFields": "OwnerPartyNumber,PartyNumberKey,ConflictId,AddressNumber,Country,PartyId,PartyNumber,OrganizationProfileId,OrganizationName,SalesProfileNumber",
    ...
    }, 
	{
    "DisplayName": "Activity",
    "ExportSupport": "Y",
    "PuidAttribute" : "ActivityNumber",
    "KeyAttributes" : "ActivityId",
    "RequiredFields" : "OwnerName,AccountNumber,ContactNumber,ResourceNumber,ActivityId,ActivityNumber,ActivityFunctionCode,Subject,ConflictId,OwnerId",
    ...
    },
    {
    "DisplayName": "Address",
    "ExportSupport": "Y",   
    "PuidAttribute": "AddressNumber",
    "KeyAttributes": "AddressId",
    "RequiredFields": "LocationId,StartDateActive,Country,PartyId,PartyNumber,AddressNumber,PrimaryFlag,Status,ConflictId,AddressId", 
    ...
    },
	...
  ]
}

The response lists the objects that you can export using the REST APIs. This will also tell you what kind of information each object exports. You can use the orderBy parameter to sort the results.

Select the Object to Export and get its Object Metadata

Based on the response received in the previous section, you must select appropriate objects to export your data. For example, if you want to export customer account information then you must select the Account or Contact objects, depending on the information you want to export.

Use the following curl command to get metadata details of the object:

cURL Command

curl --user sales_cloud_user https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/importExportObjectMetadata/Account

Response Payload

Here is an example of the response body in JSON format.

{
"ObjectCode": "Account",
"SupportHighVolume": "Y",
"PuidAttribute": "PartyNumber",
"KeyAttributes": "PartyId",
"ParentKeyAttributes": "",
"RequiredFields": "PartyId,PartyNumber,OrganizationProfileId,OrganizationName,SalesProfileNumber,OwnerPartyNumber,PartyNumberKey,AddressNumber,ConflictId,Country",
"UcmAccount": "crm/simplifiedAccount/import/",
...	
 }

Next you can get the attribute information using the following curl command:

cURL Command

curl --user sales_cloud_user https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/importExportObjectMetadata/Account/ child/ObjectAttributes?fields=DisplayName,Type,AttributeCode,Description

Response Payload

Here is an example of the response body in JSON format.


{  
  	Items: 
	[
	{
	"DisplayName": "Party ID",  
	"Type": "Long",   
	"AttributeCode": "PartyId",  
	"Description": "Unique party identifier."
	},
	{ 
	"DisplayName": "Party Number",  
	"Type": "String", 
	"AttributeCode": "PartyNumber", 
	"Description": "Unique identification number for the party."   
	},  
	{ 
	"DisplayName": "Party Source System",  
	"Type": "String",  
	"AttributeCode": "SourceSystem",  
	"Description": ""   
	}  
]
  } 

You can use the fields parameter to filter the attributes that you want to view in the results. If you do not use this parameter, then the results display all the attributes of the object.

Apply the Filter Criteria for Attributes

You can use various filter criteria to filter the data to export, depending on the attribute values. Note that you can add only queryable attributes to the filter criteria. For example, to filter only the data that has the Organization Name as 'acc_name', you can use the following filter criterion:

"ExportFilterCriteria": "OrganizationName = '<acc_name>'"

To filter the data that is updated after June 01, 2007, use the following filter criterion:

"ExportFilterCriteria": "LastUpdateDate >'2007-06-01T00:00:00+00:00'"

You must include the filter criteria as part of the export payload. Ensure that you are using the attribute code of the attribute that you obtained from the metadata of the object. In the above examples, OrganizationName and LastUpdateDate are the attribute codes of the attributes. To find the filter conditions to be used for various attribute types in ExportFilterCriteria you can refer to the Manage Collections topic in the Learn More chapter of this guide.

Note:

To make your maps private, pass PrivateMaps as 'Y'.

Prepare and Pass the Export Payload

Your next step is to create the export payload. The payload varies depending on the type of export. You must provide the export name, export object code, export column attribute codes, export file name, and the filter criteria mandatorily in the payload. The following sections explain the different types of exports and their payloads:

Single Object Export

Use the POST method with the following curl command to export an object such as Account:

cURL Command

curl --user sales_cloud_user -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d '{"Name":"Account_Export","ExportObject":"Account","ExportColumnNames":"EmailAddress,PartyStatus, PartyNumber,OrganizationName","ExportFilterCriteria":"OrganizationName = 'acc_name'","ExportFileName":"test_Acc.zip","Activate":"YES"}' https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/bulkExportActivities

Request Payload

Here is an example of the request body in JSON format.

  
   {     
   "Name": "Account_Export",   
   "ExportObject": "Account",   
   "ExportColumnNames":  "EmailAddress,PartyStatus,PartyNumber,OrganizationName",  
   "ExportFilterCriteria": "OrganizationName = 'acc_name'", 
   "ExportFileName":"test_Acc.zip",  
   "Activate": "YES"  
   }

Response Payload

Here is an example of the response body in JSON format.

  
 {   
 "BulkExportJobId": 300100185180389, 
 "Name": "Account_Export", 
 "ExportObject": "Account", 
 "ExportColumnNames": "EmailAddress,PartyStatus,PartyNumber,OrganizationName", 
 "ExportFilterCriteria": "OrganizationName = 'acc_name'", 
 "ExportFileName": "test_Acc.zip",  
 "Status": "QUEUED",   
 "Activate": "YES", 
 "EnableSplit": "NO",   
 ...    
 }

Hierarchy Object Export

If you want to export a hierarchy of objects, then you must include the payloads related to child objects within the childBulkExportActivity element of the parent payload. For example, consider the object hierarchy shown below:

  • Account
    • Address
    • Classification

Use the POST method with the following curl command to export the object mentioned above. Ensure to provide the ExportParentObject attribute for each child object you are exporting.

cURL Command

curl --user sales_cloud_user -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d '{ "Name": "Account_Export_Test_hier", "ExportObject": "Account", "ExportColumnNames": "EmailAddress,PartyStatus,PartyNumber,OrganizationName", "ExportFilterCriteria": "OrganizationName = 'acc_name'","ExportFileName": "test_Acc_hier.zip", "Activate": "NO", "childBulkExportActivity": [{"ExportObject": "Address", "ExportParentObject": "Account", "ExportColumnNames": "City,Country,State,Status"}, {"ExportObject": "Classification", "ExportParentObject": "Account", "ExportColumnNames": "Status,PartyType,PrimaryFlag,ClassCategory,ClassCode" } ]}' https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/bulkExportActivities

Request Payload

Here is an example of the request body in JSON format.

 
   { 
  "Name": "Account_Export_Test_hier", 
  "ExportObject": "Account",
  "ExportColumnNames": "EmailAddress,PartyStatus,PartyNumber,OrganizationName", 
  "ExportFilterCriteria": "OrganizationName = 'acc_name'", 
  "ExportFileName": "test_Acc_hier.zip", 
  "Activate": "NO", 
  "childBulkExportActivity": 
			[ 
			{ 
			"ExportObject": "Address",  
			"ExportParentObject": "Account",   
			"ExportColumnNames": "City,Country,State,Status" 	
			},  
			{ 
			"ExportObject": "Classification", 
			"ExportParentObject": "Account", 
			"ExportColumnNames": "Status,PartyType,PrimaryFlag,ClassCategory,ClassCode" 
			} 
			] 
   }

Response Payload

Here is an example of the response body in JSON format.


   {  
   "BulkExportJobId": 300100185180711,  
   "Name": "Account_Export_Test_hier",  
   "ExportObject": "Account", 
   "ExportColumnNames": "EmailAddress,PartyStatus,PartyNumber,OrganizationName", 
   "ExportFilterCriteria": "OrganizationName ='acc_name'", 
   "ExportFileName": "test_Acc_hier.zip",
   "Status": "QUEUED",   
   "Activate": "NO", 
   "EnableSplit": "NO",   
   "childBulkExportActivity": 
				[
				{  
				"ExportObject": "Address", 
				"ExportParentObject": "Account",   
				"ExportColumnNames":   "City,Country,State,Status", 	
				"ExportFilterCriteria": null, 
				 ... 
				 },  
				 {    
				 "ExportObject": "Classification",  
				 "ExportParentObject": "Account",   		
				 "ExportColumnNames": "Status,PartyType,PrimaryFlag,ClassCategory,ClassCode",
					...
				  }
				  ]
   }

You can reuse an existing map for export by providing the export mapping number. You can either pass the export mapping number or the export filter criteria, export column name, and export object.

Request Payload

Here is an example of the request body in JSON format.
{
"Name" : "AccountWithMappingNumber",
"Activate":"YES",
"ExportMapping": "300100557035269"
}

Response Payload

Here is an example of the response body in JSON format.
{
    "BulkExportJobId": 300100557014440,
    "Name": "AccountWithMappingNumber",
    "Description": null,
    "ExportObject": "Action",
    "ExportMapping": "300100557035269",
    "ExportColumnNames": "CreatedBy,CreationDate,DeletedFlag,LastUpdateDate,ProcessConnectionTypeCd,VisibilityCd,LastUpdatedBy,LeadTime,LeadTimeUnit,Name,ObjectEntityName,ParentEntityName,OperationCd,ObjectEntityType,ActionNumber,StripeCd,ProcessMetadataNumber,ActionId",
    "ExportFilterCriteria": "CreationDate > '2019-04-08T04:15:53-07:00'",
    "ExportOrderBy": null,
    "ExportFileName": null,
    "Status": "QUEUED",
    "Activate": "YES",
    "DateFormat": "ORA_ZCA_US_FORMAT",
    "TimestampFormat": "ORA_ZCA_US_FORMAT",
    "Delimiter": "COMMA_DELIMITER",
    "EscapeSpecialCharactersFlag": "false",
    "RecordsExported": "0",
    "ExportFileURL": null,
    "ErrorReportFileURL": null,
    "NotificationEMail": null,
    "FileCharset": "ORA_ZCA_UTF8_ENCODING",
    "CreatedBy": "SALES_ADMIN",
    "CreationDate": "2021-11-16T08:05:26+00:00",
    "LastUpdateDate": "2021-11-16T08:05:32.144+00:00",
    "LastUpdatedBy": "SALES_ADMIN",
    "LastUpdateLogin": null,
    "StartTm": "2021-11-16T08:05:29.000+00:00",
    "EndTm": null,
    "LangIndependentHeader": "YES",
    "NoteObjectCode": null,
    "EnableSplit": "NO",
    "SplitSize": null,
    "EnableExportAttachment": "NO",
    "CurrentLoggedInUser": "SALES_ADMIN",
    "RestNotification": null,
    "Cancel": null,
    "CanceledBy": null,
    "PrivateMap": "N",
    "links": [
...
}

You can create the export activity without activating it by setting the Activate attribute to 'NO'. You can activate the export at a later point with the following PATCH method.

Request Payload

Here is an example of the request body in JSON format.


  {  
  "Activate": "YES"
  }

Response Payload

Here is an example of the response body in JSON format.

 
  { 
  "BulkExportJobId": 300100185180840, 
  "Name": "Account_Export_Test_hier", 
  "ExportObject": "Account", 
  "ExportColumnNames": "EmailAddress,PartyStatus,PartyNumber,OrganizationName", 
  "ExportFilterCriteria": "OrganizationName = 'acc_name'", 
  "ExportFileName": "test_Acc_hier.zip",  
  "Status": "QUEUED",  
  "Activate": "YES", 
   ...
  }

Split Export

You can split your exported data based on the record count. You can use the attributes EnableSplit and SplitSize for this purpose.

cURL Command

curl --user sales_cloud_user -X POST -H "Content-Type:application/vnd.oracle.adf.resourceitem+json" -d '{ "ExportObject":"Account","ExportFilterCriteria":"LastUpdateDate>'2007-06-01T00:00:00+00:00'","Activate":"YES","Name":"50Attrs_extn_12_12", "ExportColumnNames": OrganizationName, EmailAddress,PartyStatus,PartyNumber","ExportFileName":"Account.zip","ExportOrderBy":"OrganizationName:asc", "EnableSplit":"YES","SplitSize":"100000"}' https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/bulkExportActivities

Request Payload

Here is an example of the response body in JSON format.


 {  
 "ExportObject": "Account",
 "ExportFilterCriteria":"LastUpdateDate>'2007-06-01T00:00:00+00:00'",
 "Activate":"YES", 
 "Name":"50Attrs_extn_12_12", 
 "ExportColumnNames" : "EmailAddress,PartyStatus,PartyNumber,OrganizationName",   
 "ExportFileName":"Account.zip", 
 "ExportOrderBy":"OrganizationName:asc", 
 "EnableSplit":"YES", 
 "SplitSize":"100000" 
 }

Response Payload

Here is an example of the response body in JSON format.

 
  {  
 "BulkExportJobId": 300100185181093,
 "Name": "50Attrs_extn_12_12", 
 "ExportColumnNames": "EmailAddress,PartyStatus,PartyNumber,OrganizationName", 
 "ExportFilterCriteria": "LastUpdateDate>'2007-06-01T00:00:00+00:00'",
 "Status": "COMPLETE", 
 "EnableSplit": "YES",
 "SplitSize": 100000,  
 "RecordsExported": "416093", 
   "links": 
    [ { 
    "rel": "child",   
	  "href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/bulkExportActivities/300100185181093/child/Attachments", 
	  "name": "Attachments", 
    "kind": "collection"  
 	    }, 
	...	 
	 ]  
  }

You can download the exported split files as follows: Use curl command to access the Attachments link from the above payload:

cURL Command

curl --user sales_cloud_user https:// servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/bulkExportActivities/300100185181093/child/Attachments

Response Payload

Here is an example of the response body in JSON format.


 {
    {
	"AttachedDocumentId": 300100194336828, 
	"DatatypeCode": "FILE",
	"FileName": "Account_Split_1.zip", 
	"DmDocumentId": "UCMFA00037134",
	"DmVersionNumber": "37387",
	"FileUrl":"/content/conn/FusionAppsContentRepository/uuid/dDocID%3a37387?XFND_SCHEME_ID=1&XFND_CERT_FP=E60AEB2ED0E48BD85246B99F85EFBBBF9E3ABA9C&FND_RANDOM=-6424222778254826357&XFND_EXPIRES=1591354897049&XFND_SIGNATURE=LhCRLES9UU0ZAqp9W5pS4NHhdMqqq9TMikZ4hBB6awne65VN4E82~dJ5-iEt3PoUT3ekMxM0vVy2vR1YZ2x2m69aOtgMgHDoeixN96H1kTDHdQtC-Dgkbh-xf-fXasajTE3A7T9-~SjDex8CiqeWTwYamMS3E9HAzr1N5oiN0OsidnLNUYc4y7WKx42QYR9IF-WEFs7RpgkbEpIC-62Wx8G4jQEft78WMpKYTW1DbdDmPw5L0ZMKqCW5C4vNLNSIGNVyYkKB32882GYN5jEYzuE2zMJjWq45OXjo~A3IwJIrUC4PrPIhBJeH4i0qT3H7M0yiWh-b6meDax-Uos9nVQ__&Id=37387&download",
	"UploadedFileContentType": "application/zip",
	"UploadedFileLength": 727025,
	"Title": "Account_Split_1.zip", 
	"Description": "Exported data file with split number 1",
	... 
	},
  { 
	"AttachedDocumentId": 300100194336836, 
	"DatatypeCode": "FILE",
	"FileName": "Account_Split_2.zip",
	"DmDocumentId": "UCMFA00037135",
   "DmVersionNumber": "37388",
   "FileUrl": "/content/conn/FusionAppsContentRepository/uuid/dDocID%3a37387?XFND_SCHEME_ID=1&XFND_CERT_FP=E60AEB2ED0E48BD85246B99F85EFBBBF9E3ABA9C&FND_RANDOM=-6424222778254826357&XFND_EXPIRES=1591354897049&XFND_SIGNATURE=LhCRLES9UU0ZAqp9W5pS4NHhdMqqq9TMikZ4hBB6awne65VN4E82~dJ5-iEt3PoUT3ekMxM0vVy2vR1YZ2x2m69aOtgMgHDoeixN96H1kTDHdQtC-Dgkbh-xf-fXasajTE3A7T9-~SjDex8CiqeWTwYamMS3E9HAzr1N5oiN0OsidnLNUYc4y7WKx42QYR9IF-WEFs7RpgkbEpIC-62Wx8G4jQEft78WMpKYTW1DbdDmPw5L0ZMKqCW5C4vNLNSIGNVyYkKB32882GYN5jEYzuE2zMJjWq45OXjo~A3IwJIrUC4PrPIhBJeH4i0qT3H7M0yiWh-b6meDax-Uos9nVQ__&Id=37388&download",
	"UploadedFileContentType": "application/zip",
   "UploadedFileLength": 124647,
 	"Title": "Account_Split_2.zip", 
	"Description": "Exported data file with split number 2",
 	...
  }, 
  {
  "AttachedDocumentId": 300100194336820,
  "DatatypeCode": "FILE", 
	"FileName": "Account_Split_3.zip",
	"DmDocumentId": "UCMFA00037132", 
	"DmVersionNumber": "37385",
	"FileUrl": "/content/conn/FusionAppsContentRepository/uuid/dDocID%3a37387?XFND_SCHEME_ID=1&XFND_CERT_FP=E60AEB2ED0E48BD85246B99F85EFBBBF9E3ABA9C&FND_RANDOM=-6424222778254826357&XFND_EXPIRES=1591354897049&XFND_SIGNATURE=LhCRLES9UU0ZAqp9W5pS4NHhdMqqq9TMikZ4hBB6awne65VN4E82~dJ5-iEt3PoUT3ekMxM0vVy2vR1YZ2x2m69aOtgMgHDoeixN96H1kTDHdQtC-Dgkbh-xf-fXasajTE3A7T9-~SjDex8CiqeWTwYamMS3E9HAzr1N5oiN0OsidnLNUYc4y7WKx42QYR9IF-WEFs7RpgkbEpIC-62Wx8G4jQEft78WMpKYTW1DbdDmPw5L0ZMKqCW5C4vNLNSIGNVyYkKB32882GYN5jEYzuE2zMJjWq45OXjo~A3IwJIrUC4PrPIhBJeH4i0qT3H7M0yiWh-b6meDax-Uos9nVQ__&Id=37385&download",
	"UploadedFileContentType": "application/zip",
	"UploadedFileLength": 732812,
	"Title": "Account_Split_3.zip",
	"Description": "Exported data file with split number 3",
	 ... 
	}
}

Use the value of FileUrl attribute in the above response payload to download the exported files using Oracle WebCenter client. You can use the command mentioned below:

java -classpath "oracle.ucm.fa_client_11.1.1.jar" oracle.ucm.client.DownloadTool --url="<host>/_dav/cs/idcplg" --username= sales_cloud_user --dID=466 --k0=XFND_SCHEME_ID --v0=1 --k1=XFND_CERT_FP --v1=05D0C33395B373C3E532BADEB14540FE01BCCA90 --k2=XFND_RANDOM --v2=5730994719565626038 --k3=XFND_EXPIRES --v3=1549853617491 --k4=XFND_SIGNATURE --v4="AaMG51zZg3Nut5t7Vm7U5ESn1~shfnjVwfim7aNnnEdgJvp3RhQ4HIEBy6gTFOwl2CG2FoDoFTQPT2p9QLrJj550TYqpPp20koabldC7WsZkhK25mqAlCWTB3TCXm67HIrwoAXkdaSdMGaWWjN6eKNyxf5F7X8vT8qgNqgMrVzOLNotUqFxmyfy1LwbZTMlUuHCOoOoOZ-hRokAcV5FnDDC53epYsWN74Kn48IQJfdym84YOcAcsSBo1C5GkLvpoeg6Rj9TDJPPLL9duTcf-b~4aeLRKde2i3ZfzbpLOyaYsn3K02gbL7KhSvhRhraM~cf7HF91sGFHOyw" --simpleRIDCLogging --verbose --outputFile="/home/export/Account_Split_3.zip" --proxyHost=www-proxy.us.oracle.com --proxyPort=80

Monitor the Status of the Export Activity

You can monitor the status of the export activity you submitted by using the BulkExportJobId. When you query about your export status using BulkExportJobId value, the Status attribute in the response payload indicates the status of your export activity. Status can be one of the following values:

  • COMPLETE
  • ERROR
  • COMPLETE_WITH_ERRORS

cURL Command

curl --user sales_cloud_user -X GET https://servername.fa.us2.oraclecloud.com /crmRestApi/resources/11.13.18.05/bulkExportActivities/300100185181093

Response Payload

Here is an example of the response body in JSON format.

{
"BulkExportJobId": 300100185181093,
"Name": "Account_Export",
"ExportObject": "Account",
"ExportColumnNames": "EmailAddress,PartyStatus,PartyNumber,OrganizationName",
"ExportFilterCriteria": "LastUpdateDate>'2007-06-01T00:00:00+00:00'",
"ExportFileName": "test_Acc.zip",
"Status": "COMPLETE",
"Activate": "YES",
"ExportFileURL":"/content/conn/FusionAppsContentRepository/uuid/dDocID%3a37387?XFND_SCHEME_ID=1&XFND_CERT_FP=E60AEB2ED0E48BD85246B99F85EFBBBF9E3ABA9C&FND_RANDOM=-6424222778254826357&XFND_EXPIRES=1591354897049&XFND_SIGNATURE=LhCRLES9UU0ZAqp9W5pS4NHhdMqqq9TMikZ4hBB6awne65VN4E82~dJ5-iEt3PoUT3ekMxM0vVy2vR1YZ2x2m69aOtgMgHDoeixN96H1kTDHdQtC-Dgkbh-xf-fXasajTE3A7T9-~SjDex8CiqeWTwYamMS3E9HAzr1N5oiN0OsidnLNUYc4y7WKx42QYR9IF-WEFs7RpgkbEpIC-62Wx8G4jQEft78WMpKYTW1DbdDmPw5L0ZMKqCW5C4vNLNSIGNVyYkKB32882GYN5jEYzuE2zMJjWq45OXjo~A3IwJIrUC4PrPIhBJeH4i0qT3H7M0yiWh-b6meDax-Uos9nVQ__&Id=237388&download",
"RecordsExported": "4150",
...
{
"rel": "enclosure",
"href": "https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/bulkExportActivities/300100185181093/enclosure/ExportFileContents",
"name": "ExportFileContents",
"kind": "other"
},
...
}

Download the Exported File

Once the status of the export is Completed, you can download the exported file. Only the user who submitted the export has access to download the exported data.

You have two options to download the file, depending on the volume of export. If the export has low volume of records, then use curl command to download the file. To download large files without facing any timeouts, use a reliable tool such as Oracle WebCenter client.

Download Low-Volume Export File

The value of the attribute ExportFileURL in the response payload contains a downloadable URL for the exported file. Open the URL in a incognito browser to download exported file. The URL is in the following format:

"/content/conn/FusionAppsContentRepository/uuid/dDocID%3a37387?XFND_SCHEME_ID=1&XFND_CERT_FP=E60AEB2ED0E48BD85246B99F85EFBBBF9E3ABA9C&FND_RANDOM=-6424222778254826357&XFND_EXPIRES=1591354897049&XFND_SIGNATURE=LhCRLES9UU0ZAqp9W5pS4NHhdMqqq9TMikZ4hBB6awne65VN4E82~dJ5-iEt3PoUT3ekMxM0vVy2vR1YZ2x2m69aOtgMgHDoeixN96H1kTDHdQtC-Dgkbh-xf-fXasajTE3A7T9-~SjDex8CiqeWTwYamMS3E9HAzr1N5oiN0OsidnLNUYc4y7WKx42QYR9IF-WEFs7RpgkbEpIC-62Wx8G4jQEft78WMpKYTW1DbdDmPw5L0ZMKqCW5C4vNLNSIGNVyYkKB32882GYN5jEYzuE2zMJjWq45OXjo~A3IwJIrUC4PrPIhBJeH4i0qT3H7M0yiWh-b6meDax-Uos9nVQ__&Id=237388&download"

Alternatively, you can use curl command to download the file. The ExportFileContents enclosure in the response received in the previous section contains the URL that you can use to download the export file.

cURL Command

curl --user sales_cloud_user 
https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/bulkExportActivities/300100185181093/enclosure/ExportFileContents> ./test_Acc.zip

You can use this option to download export files of up to 100 MB.

Download High-Volume Export File

To download high-volume export files, we recommend you to use the Oracle Webcenter Client. The ExportFileURL value is in the following format:

"/content/conn/FusionAppsContentRepository/uuid/dDocID%3a37387?XFND_SCHEME_ID=1&XFND_CERT_FP=E60AEB2ED0E48BD85246B99F85EFBBBF9E3ABA9C&FND_RANDOM=-6424222778254826357&XFND_EXPIRES=1591354897049&XFND_SIGNATURE=LhCRLES9UU0ZAqp9W5pS4NHhdMqqq9TMikZ4hBB6awne65VN4E82~dJ5-iEt3PoUT3ekMxM0vVy2vR1YZ2x2m69aOtgMgHDoeixN96H1kTDHdQtC-Dgkbh-xf-fXasajTE3A7T9-~SjDex8CiqeWTwYamMS3E9HAzr1N5oiN0OsidnLNUYc4y7WKx42QYR9IF-WEFs7RpgkbEpIC-62Wx8G4jQEft78WMpKYTW1DbdDmPw5L0ZMKqCW5C4vNLNSIGNVyYkKB32882GYN5jEYzuE2zMJjWq45OXjo~A3IwJIrUC4PrPIhBJeH4i0qT3H7M0yiWh-b6meDax-Uos9nVQ__&Id=237388&download"

You can parse the above value and use in the below Webcenter client command:

java -classpath "oracle.ucm.fa_client_11.1.1.jar" oracle.ucm.client.DownloadTool --url="<host>/_dav/cs/idcplg" --username=sales_cloud_user --dID=466 --k0=XFND_SCHEME_ID --v0=1 --k1=XFND_CERT_FP --v1=05D0C33395B373C3E532BADEB14540FE01BCCA90 --k2=XFND_RANDOM --v2=5730994719565626038 --k3=XFND_EXPIRES --v3=1549853617491 --k4=XFND_SIGNATURE --v4="VgrX7C7ncEQiuJu1JM3ms0BBmUGGcfuR5KUDFnsi5pmzWaox5I6VPutKXjyAPQnKfaNHInWdPD8FkbPXvizMa51VZThcGZ0MflEsFCFSRyCkf3q3ka0ak21cHbuJy4OvPBWnvPertuxBC4LqrlFmgFeqi5xEbvTsNl05pr~WkPCVqfOWyL9MBzDUXIkfK2wFsYFkHq0FzDGbiShG4iFlCzDCruhRdvMieZI~ohwGHBMZkGOlRMVX47PB9~ac17d3CQlDlzqYYTSDSagxACAg2Aq0j5-ZEZIpYmCB~JmHWaq1bRNXqpoafZkSn0nh~myDZfzCckTRLrMMUjKT6yJ3SQ__" --simpleRIDCLogging --verbose --outputFile="/home/sagonugu/export/asd.zip" --proxyHost=www-proxy.us.oracle.com --proxyPort=80

For more details on installing and using the WebCenter Client, refer to the document Oracle WebCenter Content (WCC) Document Transfer Utility Readme (Doc ID 1624063.1) on My Oracle Support (support.oracle.com).

Download the Error Logs

If your export activity completed with the status of either ERROR or COMPLETE_WITH_ERRORS then you can download the error logs and analyze the error message. The downloaded file ErrorLog.zip will have a CSV file specific to each export object. Use the steps below to download the error log file:

As explained in the earlier section Monitor the Status of the Export Activity, query the export status as given in the following curl command:

cURL Command

curl --user sales_cloud_user -X GET https://servername.fa.us2.oraclecloud.com/crmRestApi/resources/11.13.18.05/bulkExportActivities/300100190810247

Response Payload

Here is an example of the response body in JSON format.


  {
 "BulkExportJobId": 300100190810247,
 "Name": "RestAcc2", 
 "ExportFileName": "test_Acc.zip",
 "Status": "COMPLETE_WITH_ERRORS",
 "Activate": "YES",
 "ExportFileURL": "/content/conn/FusionAppsContentRepository/uuid/dDocID%3a37387?XFND_SCHEME_ID=1&XFND_CERT_FP=E60AEB2ED0E48BD85246B99F85EFBBBF9E3ABA9C&FND_RANDOM=-6424222778254826357&XFND_EXPIRES=1591354897049&XFND_SIGNATURE=LhCRLES9UU0ZAqp9W5pS4NHhdMqqq9TMikZ4hBB6awne65VN4E82~dJ5-iEt3PoUT3ekMxM0vVy2vR1YZ2x2m69aOtgMgHDoeixN96H1kTDHdQtC-Dgkbh-xf-fXasajTE3A7T9-~SjDex8CiqeWTwYamMS3E9HAzr1N5oiN0OsidnLNUYc4y7WKx42QYR9IF-WEFs7RpgkbEpIC-62Wx8G4jQEft78WMpKYTW1DbdDmPw5L0ZMKqCW5C4vNLNSIGNVyYkKB32882GYN5jEYzuE2zMJjWq45OXjo~A3IwJIrUC4PrPIhBJeH4i0qT3H7M0yiWh-b6meDax-Uos9nVQ__&Id=237388&download","ErrorReportFileURL": "/content/conn/FusionAppsContentRepository/uuid/dDocID%3a37387?XFND_SCHEME_ID=1&XFND_CERT_FP=E60AEB2ED0E48BD85246B99F85EFBBBF9E3ABA9C&FND_RANDOM=-6424222778254826357&XFND_EXPIRES=1591354897049&XFND_SIGNATURE=LhCRLES9UU0ZAqp9W5pS4NHhdMqqq9TMikZ4hBB6awne65VN4E82~dJ5-iEt3PoUT3ekMxM0vVy2vR1YZ2x2m69aOtgMgHDoeixN96H1kTDHdQtC-Dgkbh-xf-fXasajTE3A7T9-~SjDex8CiqeWTwYamMS3E9HAzr1N5oiN0OsidnLNUYc4y7WKx42QYR9IF-WEFs7RpgkbEpIC-62Wx8G4jQEft78WMpKYTW1DbdDmPw5L0ZMKqCW5C4vNLNSIGNVyYkKB32882GYN5jEYzuE2zMJjWq45OXjo~A3IwJIrUC4PrPIhBJeH4i0qT3H7M0yiWh-b6meDax-Uos9nVQ__&Id=237389&download",
...    
 { 
 "rel": "enclosure",
 "href": "https://servername.fa.us2.oraclecloud.com /crmRestApi/resources/11.13.18.05/bulkExportActivities/300100185181093/enclosure/ExportFileContents",
 "name": "ExportFileContents",
 "kind": "other" 
 },
 {
 "rel": "enclosure", 
 "href": "https://servername.fa.us2.oraclecloud.com /crmRestApi/resources/11.13.18.05/bulkExportActivities/300100190810247/enclosure/ErrorReportFileContents",
 "name": "ErrorReportFileContents",
 "kind": "other"
 }
 }

You can download the error log file in one of the following two ways:

  • Retrieve the value of the attribute ErrorReportFileURL from the above payload. Open the URL in an incognito browser to download the error file.
  • Use the ErrorReportFileContents enclosure link in the above payload. You can download the file using the following curl command:
curl --user sales_cloud_user https://servername.fa.us2.oraclecloud.com /crmRestApi/resources/11.13.18.05/bulkExportActivities/300100190810247/enclosure/ErrorReportFileContents > ./ErrorLog.zip