Collection.SetPublisher - Mozenda

Collection.SetPublisher

August 10, 2015

Description

Updates or creates a new publisher for the specified collection.

Required parameters

CollectionID, Method

Required parameters by Method

Email:
Method = “Email”
EmailAddress = [email address]

FTP:
Method = “Ftp”
FtpServer = [FTP server name]

AmazonS3:
Method = “AmazonS3”
AmazonS3AuthenticationToken (AWS Access Key ID)
AmazonS3SignRequestToken (AWS Secret Access Key)
AmazonS3BucketPath
AmazonS3BucketRegion (The Amazon S3 endpoint for the selected bucket. Click here to see a list of valid endpoints)

AzureStorage:
Method = “AzureStorage”
MicrosoftAzureStorageAccountName
MicrosoftAzureStorageAccountKey
MicrosoftAzureStorageContainerName

Dropbox:
Method = “Dropbox”

Google Drive:
Method = “Google”

Optional parameters

ViewID (An empty viewID is the default and will use “Everything” from the collection)
FileFormat (CSV, TSV, XML, JSON, and XLSX. Default is CSV)
FileName
FileIncludeHeader (‘Yes’, ‘No’ – Yes to add field headers to row one in the published file. Default is Yes.)
PublishWhenAgentCompletes (‘Yes’, ‘No’ – ‘Yes’ to publish when the Agent completes. ‘No’ to publish manually. When not specified, no change is made unless initializing a new publisher which defaults to ‘No’.)
ItemStatusIncludeColumn (‘Yes’, ‘No’ – ‘Yes’ to include the column in the data file. Default is No)

Optional parameters for ItemStatusInclude

ItemStatusIncludeAdded (‘Yes’, ‘No’)
ItemStatusIncludeChanged (‘Yes’, ‘No’)
ItemStatusIncludeUnchanged (‘Yes’, ‘No’)
ItemStatusIncludeDeleted (‘Yes’, ‘No’)
ItemStatusIncludeChangeMarkup (‘Yes’, ‘No’)
Note: These item status filtering options have no effect unless ItemStatusIncludeColumn is true.

Optional parameters by Method

Email:
EmailSubject

FTP:
FtpPort (Default is 21),
FtpProtocol (FTP, SFTP, FTPSImplicit, FTPSExplicit. Default is FTP),
FtpDirectory,
FtpUser,
FtpPassword,
FtpUsePassive (‘Yes’, ‘No’. Yes to use passive transfer mode. Default is Yes.),
IncludePackages (‘Yes’, ‘No’. Yes to include images/files when publishing to FTP. Default is No.)

Dropbox:
DropBoxFolder (use a file path beginning with the first sub-folder, for example: Mozenda/DataFeeds/Agent1)

Google Drive:
GoogleFolder (use a file path beginning with the first sub-folder, for example: Mozenda/DataFeeds/Agent1)

Returns

Returns a message specifying whether or not the add/update was successful.

Example request url

https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.SetPublisher&CollectionID=1099&Method=Email&EmailAddress=MyEmail@Provider.com

Example response

<?xml version="1.0" encoding="utf-8" ?>
<SetPublisherResponse
		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
		xmlns:xsd="http://www.w3.org/2001/XMLSchema">
	<Result>Success</Result>
</SetPublisherResponse>

Additional Information

  • A publisher cannot be created with a Method of “None”, it must be FTP, Email, AmazonS3, Azure, Dropbox, or Google.
  • A publisher will only update the fields related to your Method (i.e – If Method is Ftp, only the common optional fields and the Ftp fields will be updated).
  • If you are creating a new publisher any fields you don’t provide (that are not required) will be set to default values.
  • If you have manually setup a schedule for your publisher in the web console’s publish dialog, then do not provide the ‘PublishWhenAgentCompletes’ parameter or the schedule will be deleted.

Need more information?

We'd love to hear from you.

100% Privacy. You are that important to us. Privacy Policy