|
Mozenda API Documentation
Index
Configuring your account to be accessible via the API is a simple process: After you have enabled your account for API access you will want to determine what functions you need to accomplish programmatically. Most of the actions you can perform via the Web Console can also be initiated through the API. Use the rest of this document as a reference for the different functions that you will need to perform. Mozenda API Syntax
With every API request there is some standard information that must be passed.
First is the base url, which is:
https://api.mozenda.com/rest?
Next, each request made to the API requires your Web Service Key (described above) to authenticate your account. This value is passed in using the WebServiceKey parameter:
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E
Next, each request needs to provide the Service parameter. This parameter specifies the version of the API being used. Right now the only accepted value is Mozenda10:
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10
Finally, each request needs to provide the Operation parameter. This parameter tells the API what operation you want performed. A list of the available operations follows, along with a sample URL showing how to use the operation.
API Request Frequency: The Mozenda system currently supports making up to 30 requests to our API every minute.
Collection.AddDescriptionAdds an empty collection in your account.Required parametersNameOptional parametersDescriptionReturnsThe result of the operation and the CollectionID if it was successful.Example request url
https://api.mozenda.com/rest?WebServiceKey=3FE7221C-9097-4B64-AED6-0950F675F398&Service=Mozenda10&Operation=Collection.Add&Name=MyFirstCollection&Description=My%20description
<?xml version="1.0" encoding="utf-8" ?> <CollectionAddResponse> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <CollectionID>2259</CollectionID> </CollectionAddResponse>back to top Collection.AddItemDescriptionAdds an item to a collection with the values specified. Instead of including the single item to be added in the request it is also possible to add items in bulk by attaching a file with the request.Required parametersCollectionIDOptional parametersField.<FieldName>ReturnsThe ItemID of the newly added item, or an error message stating why it could not be added.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.AddItem&CollectionID=1099&Field.FirstName=John&Field.LastName=Smith
<?xml version="1.0" encoding="utf-8" ?> <CollectionAddItemResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <ItemID>1098</ItemID> </CollectionAddItemResponse> Bulk InsertionIn addition to adding items one at a time, there is a method that can be used to add items in bulk. Below is some sample C# code that will demonstrate how this is done. This same technique can be used in many different programming languages to add multiple items to a Mozenda collection at one time. This option should be used whenever a large number of items need to be inserted all at once.
string webServiceKey = C70E1F84-E12B-4e73-B199-2EE6D43AF44E; //Your Account WebServiceKey.
string collectionID = 1001; //The ID of the destination Collection.
string url = string.Format(
"https://api.mozenda.com/rest?WebServiceKey={0}&Service=Mozenda10&Operation=Collection.AddItem&CollectionID={1}",
webServiceKey, collectionID);
string fileName = "C:\\Temp\\NewItems.xml"; //Path to the file containing the items to be uploaded.
WebClient client = new WebClient();
byte[] responseBinary = client.UploadFile(url, fileName);
string response = Encoding.UTF8.GetString(responseBinary);
The image below illustrates the format for each item in the uploaded file.![]() back to top Collection.AddFieldDescriptionAdds a field to the desired Collection. This field is created with the default format of "Text". This operation can only be performed on Collections that are created by a user.Required parametersCollectionID, NameOptional parametersDescriptionReturnsThe result of the operation and the FieldID if it was successful.Example request url
https://api.mozenda.com/rest?WebServiceKey=3FE7221C-9097-4B64-AED6-0950F675F398&Service=Mozenda10&Operation=Collection.AddField&CollectionID=1052&Field=Col7&FieldDescription=My%20col7%20description
<?xml version="1.0" encoding="utf-8" ?> <CollectionAddField xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <FieldID>2259</FieldID> </CollectionAddField>back to top Collection.ClearDescriptionClears the contents of a collection but leaves the collection intact. WARNING: This operation is permanent!Required parametersCollectionIDReturnsA message indicating whether or not the command was successful.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.Clear&CollectionID=1099
<?xml version="1.0" encoding="utf-8" ?> <CollectionClearResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </CollectionClearResponse>back to top Collection.DeleteDescriptionDeletes the collection and all data within it. WARNING: This operation is permanent!Required parametersCollectionIDReturnsA message detailing whether or not the requested command was successful.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.Delete&CollectionID=1009
<?xml version="1.0" encoding="utf-8" ?> <CollectionDeleteResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </CollectionDeleteResponse>back to top Collection.DeleteFieldDescriptionDeletes a field from the Collection. This operation can only be performed on Collections that are created by a user.Required parametersCollectionID, FieldReturnsA message detailing whether the delete field command executed successfully.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.DeleteField&CollectionID=1009&Field=ExampleFieldName
<?xml version="1.0" encoding="utf-8" ?> <ApiResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </ApiResponse>back to top Collection.DeleteItemDescriptionDeletes an item from a collectionRequired parametersCollectionID, ItemIDReturnsA message detailing whether the delete item command executed successfully.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.DeleteItem&CollectionID=1009&ItemID=1922
<?xml version="1.0" encoding="utf-8" ?> <CollectionDeleteItemResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </CollectionDeleteItemResponse>back to top Collection.GetFieldsDescriptionReturns a list of fields that are in that collection with their detailsRequired parametersCollectionIDOptional parameterInclude (Can be set to All or Unique. It defaults to All.)ReturnsA list of fields for a collection.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.GetFields&CollectionID=1001&Include=Unique
<?xml version="1.0" encoding="utf-8" ?> <CollectionGetFieldsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <FieldList> <Field> <FieldID>418</FieldID> <CollectionID>1003</CollectionID> <Name>ID</Name> <Description>Unique number identifying the Default.</Description> <IsSystem>True</IsSystem> <IsMatchUp>False</IsMatchUp> </Field> <Field> <FieldID>430</FieldID> <CollectionID>1003</CollectionID> <Name>AgentID</Name> <Description /> <IsSystem>True</IsSystem> <IsMatchUp>False</IsMatchUp> </Field> </FieldLists> </CollectionGetFieldsResponse>back to top Collection.GetListDescriptionReturns a list of collections for an accountRequired parametersNoneReturnsA List of the collections in an accountExample request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.GetList
<?xml version="1.0" encoding="utf-8" ?> <CollectionGetListResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <CollectionList> <Collection> <CollectionID>1005</CollectionID> <Name>My First Collection</Name> <Description>Sample description of 'My 1st Collection'.</Description> <DefaultViewID>1003</DefaultViewID> <AgentID>1002</AgentID> </Collection> <Collection> <CollectionID>1067</CollectionID> <Name>ZipCodes</Name> <Description>Sample description of the 'ZipCodes' repository.</Description> <DefaultViewID>1036</DefaultViewID> </Collection> </CollectionList> </CollectionGetListResponse>back to top Collection.GetViewsDescriptionGets a list of views for a particular collectionRequired parametersCollectionIDReturnsA list of the views that is currently in the system for a particular collection.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.GetViews&CollectionID=1008
<?xml version="1.0" encoding="utf-8" ?> <CollectionGetViewsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <ViewList> <View> <ViewID>801</ViewID> <CollectionID>801</CollectionID> <Name>All ZipCodes</Name> <Description>All items in the ZipCodes collection.</Description> </View> </ViewList> </CollectionGetViewsResponse>back to top Collection.GetPublisherDescriptionReturns a list of collections and their current publishing configuration.NOTE: The PublishWhenAgentCompletes field will be removed if the collection is publishing on a schedule. Required parametersCollectionID or AgentID (comma separated lists)ReturnsA list of collections with their current publishing configuration.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.GetPublisher&CollectionID=1099&AgentID=1002
<?xml version="1.0" encoding="utf-8" ?> <GetPublisherResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <CollectionList> <Collection> <CollectionName>Lowes</CollectionName> <CollectionID>1099</CollectionID> <AgentID>1001</AgentID> <PublishWhenAgentCompletes>1001</PublishWhenAgentCompletes> <Created>2012-01-01 10:50:45</Created> <CreatedBy>John</CreatedBy> <Description>Collection for Lowes</Description> <ViewID>1036</ViewID> <FileFormat>CSV</FileFormat> <FileName /> <Method>Ftp</Method> <IncludePackages>Yes</IncludePackages> <FtpServer>test.myserver.com</FtpServer> <FtpPort>21</FtpPort> <FtpDirectory /> <FtpUser /> <FtpPassword /> <FtpUsePassive>Yes</FtpUsePassive> <FtpProtocol>SFTP</FtpProtocol> </Collection> <Collection> <CollectionName>Home Depot</CollectionName> <CollectionID>1100</CollectionID> <AgentID>1002</AgentID> <Created>2012-01-01 10:45:45</Created> <CreatedBy>John</CreatedBy> <Description>Collection for Home Depot</Description> <ViewID>1036</ViewID> <FileFormat>CSV</FileFormat> <FileName /> <Method>Email</Method> <EmailAddress>john.doe@gmail.com<EmailAddress> <EmailSubject /> </Collection> </CollectionList> </GetPublisherResponse>back to top Collection.PublishDescriptionPublishes the collection according to the publishing information setup for the collection. Currently, this must be entered via the Web Console. For more information about configuring your collection for FTP publishing please click here.Required parametersCollectionIDReturnsThe result of the operation and the jobID if the request was successful.Example request url
https://api.mozenda.com/rest?WebServiceKey=3FE7221C-9097-4B64-AED6-0950F675F398&Service=Mozenda10&Operation=Collection.Publish&CollectionID=1005
<?xml version="1.0" encoding="utf-8" ?> <CollectionPublishResponse> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <JobID>EE64EC0E-F233-4549-8DF0-852298965F81</JobID> </CollectionPublishResponse>back to top Collection.SetUniqueFieldsDescriptionSets the Unique Fields on the Collection. WARNING: This operation will delete any duplicates in the collection based on the new unique fields being set.Required parametersCollectionID, Fields (comma-separated list of field names to be set as unique)ReturnsA message detailing whether the command executed successfully and also the number of duplicate items removed.Example request url
https://api.mozenda.com/rest?WebServiceKey=3FE7221C-9097-4B64-AED6-0950F675F377&Service=Mozenda10&Operation=Collection.SetUniqueFields&Fields=Col1,Col2,Col3&CollectionID=1052
<?xml version="1.0" encoding="utf-8" ?> <CollectionSetUniqueFieldsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <DuplicateItemsRemoved>0</DuplicateItemsRemoved> </CollectionSetUniqueFieldsResponse>back to top Collection.SetPublisherDescriptionUpdates or creates a new publisher for the specified collection.NOTE: A publisher cannot be created with a PublishMethod of "None", it must be Ftp, Email, or AmazonS3. NOTE: A publisher will only update the fields related to your PublishMethod (i.e - If Method is Ftp, only the common optional fields and the Ftp fields will be updated). NOTE: If you are creating a new publisher any fields you don't provide (that are not required) will be set to default values. NOTE: 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. Required parametersCollectionID, PublishMethodRequired parameters by PublishMethodEmail: EmailAddressFtp: FtpServer 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) Optional parametersViewID (An empty viewID is the default and will use "Everything" from the collection), FileFormat (CSV, TSV, XML. 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 whent the Agent completes. Defaults to Yes)Optional parameters by PublishMethodEmail: EmailSubjectFtp: FtpPort (Default is 21), FtpProtocol (FTP, SFTP. Default is FTP), FtpDirectory, FtpUser, FtpPassword, FtpUsePassive ('Yes', 'No'. Yes to use passive transer mode. Default is Yes.), IncludePackages ('Yes', 'No'. Yes to include images/files when publishing to FTP. Default is No.) ReturnsReturns 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&PublishMethod=Email&EmailAddress=MyEmail@Provider.com
<?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>back to top Collection.UpdateFieldDescriptionModifies a field in a collection.Required parametersFieldIDOptional parametersDescription, Format (currently supported options are Text, File, and DateTime), NameReturnsReturns a message specifying whether or not the update was successfulExample request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.UpdateField&CollectionID=1008&FieldID=1098&Name=MyNewFieldName&Description=My%20new%20field%20description&Format=File
<?xml version="1.0" encoding="utf-8" ?> <CollectionUpdateFieldResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </CollectionUpdateFieldResponse>back to top Collection.UpdateItemDescriptionUpdates an item in the collection.Required parametersCollectionID, ItemIDOptional parametersField.<FieldName>ReturnsReturns a message specifying whether or not the update was successfulExample request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Collection.UpdateItem&CollectionID=1008&ItemID=1098&Field.FirstName=Harry&Field.LastName=Johnson&Field.Age=27
<?xml version="1.0" encoding="utf-8" ?> <CollectionUpdateItemResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </CollectionUpdateItemResponse>back to top View.DeleteItemsDescriptionDeletes all the items in the View. WARNING: This operation is permanent!Required parametersViewIDReturnsA message detailing whether or not the requested command was successful and the number of items that have been deleted.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=View.DeleteItems&ViewID=1009
<?xml version="1.0" encoding="utf-8" ?>back to top View.GetItemsDescriptionReturns items from a view. To setup a view for a collection click hereRequired parametersViewIDOptional parametersPageNumber, PageItemCount, ViewParameter.JobID, ViewParamater.<ViewParameterName>NOTE: A maximum of 1,000 items will be returned even if the specified PageItemCount parameter is greater than 1,000. ReturnsThe number of items that were requested according to the PageItemCount parameterExample request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=View.GetItems&ViewID=1022&ViewParameter.JobID=04E2DA-DF22-4239-A343-DE685AF54EC6&PageNumber=1&PageItemCount=20&ViewParameter.Name=Michael
<?xml version="1.0" encoding="utf-8" ?> <ViewGetItemsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <PageItemCount>2</PageItemCount> <PageNumber>2</PageNumber> <PageCount>106</PagesCount> <ItemList> <Item> <ItemID>1092</ItemID> <Year>2000</Year> <Make>BMW</Make> <Model>328CI</Model> <Price>$7490</Price> <Telephone>4049141131</Telephone> <AreaCode>404</AreaCode> <Source>A1Cars</Source> </Item> <Item> <ItemID>1103</ItemID> <Year>2003</Year> <Make>BMW</Make> <Model>525i</Model> <Price>$14850</Price> <Telephone>8606342015</Telephone> <AreaCode>860</AreaCode> <Source>A1Cars</Source> </Item> </ItemList> </ViewGetItemsResponse>back to top View.SetFieldsDescriptionSets the fields that are included in the view and also their order. To setup a view for a collection click hereRequired parametersViewID, Fields (Comma-separated list of field names to be included in the view)ReturnsThe result of the operationExample request url
https://api.mozenda.com/rest?WebServiceKey=3FE7221C-9097-4B64-AED6-0950F675F377&Service=Mozenda10&Operation=View.SetFields&Fields=Col6,Col5,Col4&ViewID=1054
<?xml version="1.0" encoding="utf-8" ?> <ViewSetFieldsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </ViewSetFieldsResponse>back to top Agent.AddDescriptionAdds a new Agent. Cannot be used to overwrite an existing Agent. The existing Agent must be deleted first using the Agent.Delete request.Required parametersName, Definition (Needs to be attached as a file)Optional parametersAgentID, DescriptionReturnsThe AgentID and CollectionID for the new Agent if the request was successful.Example requeststring agentDefinitionfileName = @"C:\Temp\AgentDefinition.xml"; //Path to the Agent definition file to be uploaded. string url = @"https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10& Operation=Agent.Save&AgentID=1009&Name=MyTestAgent"; WebClient client = new WebClient(); byte[] responseBinary = client.UploadFile(url, agentDefinitionfileName); string response = Encoding.UTF8.GetString(responseBinary); <?xml version="1.0" encoding="utf-8" ?> <AgentSaveResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <AgentID>1009</AgentID> <CollectionID>1009</CollectionID> </AgentSaveResponse>back to top Agent.DeleteDescriptionDeletes an agent and all associated schedules for that agent.Required parametersAgentIDReturnsA confirmation message describing whether or not the request was successful.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Agent.Delete&AgentID=1008
<?xml version="1.0" encoding="utf-8" ?> <AgentDeleteResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </AgentDeleteResponse>back to top Agent.GetDescriptionGets the Agent definition and meta data for an Agent.Required parametersAgentIDReturnsA response containing the AgentID, Name, CollectionID, Description, Domain, and Definition for an Agent.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Agent.Get&AgentID=1005
<?xml version="1.0" encoding="utf-8" ?> <AgentGetResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <AgentID>1005</AgentID> <Name>My First Agent</Name> <CollectionID>1005</CollectionID> <Description>Extracts new lead information</Description> <Domain>myleadwebsite.com</Domain> <Definition>back to top Agent.GetListDescriptionReturns a list of your agents with their ID, Name, Settings, Description, and other important information.Required parametersNoneOptional parametersIncludeStartingURL (true or false)ReturnsA list of agents for an account.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Agent.GetList
<?xml version="1.0" encoding="utf-8" ?> <AgentGetListResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <AgentList> <Agent> <Created>2008-06-21 08:45:32</Created> <Modified /> <AgentID>1001</AgentID> <Name>My First Agent</Name> <Description>This is my first agent</Description> <Settings /> <StartingURL>http://mozenda.com/builderwelcome</StartingURL> </Agent> <Agent> <Created>2008-06-23 14:20:49</Created> <Modified /> <AgentID>1003</AgentID> <Name>Scraped Data</Name> <Description /> <Settings /> <StartingURL>http://mozenda.com/builderwelcome</StartingURL> </Agent> </AgentList> </AgentGetListResponse>back to top Agent.GetCombinedCollectionsDescriptionReturns a list of Agents and the combined collections they source.Required parametersAgentID (comma separated list)ReturnsA list of Agents and the combined collections they source.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Agent.GetCombinedCollections&AgentID=1001,1002
<?xml version="1.0" encoding="utf-8" ?> <AgentGetCombinedCollectionsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <AgentList> <Agent> <AgentID>1001</AgentID> <SourcesCollections>1145</SourcesCollections> </Agent> <Agent> <AgentID>1002</AgentID> <SourcesCollections>1145,1146</SourcesCollections> </Agent> </AgentList> </AgentGetListResponse>back to top Agent.GetJobsDescriptionReturns a list of your agent's jobs with detailed information.Required parametersAgentIDOptional parametersJob.Created (YYYY-MM-DD. Returns jobs that were created greater than or equal to the date specified), Job.Started (YYYY-MM-DD. Returns jobs that were started greater than or equal to the date specified), Job.Ended (YYYY-MM-DD. Returns jobs that ended less than or equal to the date specified), Job.State (Active, Archived, All)ReturnsA list of current jobs in the system for this agent in descending order.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Agent.GetJobs&AgentID=1001&Job.Started=2009-02-06&Job.Ended=2009-02-07&Job.State=Active
<?xml version="1.0" encoding="utf-8" ?> <AgentGetJobsResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <JobList> <Job> <Created>2008-11-13 16:41:26</Created> <Modified>2008-11-13 16:41:27</Modified> <JobID>EE64EC0E-F233-4549-8DF0-852298965F81</JobID> <JobType>WebPageHarvest</JobType> <Status /> <Started /> <Ended /> <AgentID>1002</AgentID> <ErrorCode /> <ErrorMessage /> <ErrorFirst /> <ErrorLast /> <ErrorCount /> <WarningFirst /> <WarningLast /> <WarningCount /> </Job> </JobList> </AgentGetJobsResponse>back to top Agent.RunDescriptionStarts or resumes the AgentRequired parametersAgentIDOptional parametersAgentParameter.<AgentParameterName>
(To learn more about how to set the parameters of an agent using the API, please visit
the Using Agent Parameters page in our Help Center) ReturnsThe result of the operation and the jobID if the request was successful.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Agent.Run&AgentID=1009&AgentParameter.Zip=90210
<?xml version="1.0" encoding="utf-8" ?> <AgentRunResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <AgentID>1002</AgentID> <JobID>EE64EC0E-F233-4549-8DF0-852298965F81</JobID> </AgentRunResponse>back to top Job.CancelDescriptionCancels a Job in the system. Note, a job must be in a Paused or Error State to cancel a jobRequired parametersJobIDReturnsA message indicating whether the command was successfulExample request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Job.Cancel&JobID=EE64EC0E-F233-4549-8DF0-852298965F81
<?xml version="1.0" encoding="utf-8" ?> <JobCancelResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </JobCancelResponse>back to top Job.GetDescriptionGets the details of a job by the Job ID.Required parametersJobID (comma-separated list of JobID's)ReturnsA response containing the Status, Command, CreatedDate, CreatedBy, AccountID, AgentID, and ErrorMessage of a particular job in the system.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Job.Get&JobID=EE64EC0E-F233-4549-8DF0-852298965F81
<?xml version="1.0" encoding="utf-8" ?> <JobGetResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <Job> <ActiveJob>True</ActiveJob> <JobID>EE64EC0E-F233-4549-8DF0-852298965F81</JobID> <JobType>WebPageHarvest</JobType> <Created>2008-11-05 17:04:36</Created> <Modified>2008-11-14 13:20:19</Modified> <Status>Running</Status> <Started /> <Ended /> <ScheduleID /> <ScheduleItemType>WebPageHarvest</ScheduleItemType> <ScheduleItemID>1001</ScheduleItemID> <ErrorCode /> <ErrorMessage /> <ErrorFirst /> <ErrorLast /> <ErrorCount /> <WarningFirst /> <WarningLast /> <WarningCount /> </Job> </JobGetResponse>back to top Job.GetAgentProgressDescriptionGets the progress of the Agent.Required parametersJobIDReturnsA response containing the progress of each list in the Agent. If there are DataLists then it will return the currently processing item from the view.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Job.GetAgentProgress&JobID=EE64EC0E-F233-4549-8DF0-852298965F81
<?xml version="1.0" encoding="utf-8" ?> <JobGetAgentProgressResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <AgentID>1029</AgentID> <JobID>1B869E2F-06CA-48D4-B7D9-CECC7DE28DA6</JobID> <BeginListList> <BeginList> <ListName>ForumTitleList</ActiveJob> <AgentPage>1</AgentPage> <Type>BeginAnchorList</Type> <RestartItemIndex>5</RestartItemIndex> </BeginList> </BeginListList> </JobGetResponse>back to top Job.GetListDescriptionGets all the active jobs for the account.Required parametersNoneOptional parametersJob.Created (Returns jobs that were created greater than or equal to the date specified), Job.Started (Returns jobs that were started greater than or equal to the date specified), Job.Ended (Returns jobs that ended less than or equal to the date specified), Job.State (All, Active, Archived)ReturnsA response containing the Status, Command, CreatedDate, CreatedBy, AccountID, AgentID, and ErrorMessage of all jobs for a particular account in the system.Example request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Job.GetList&Job.State=Archived
<?xml version="1.0" encoding="utf-8" ?> <JobGetResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> <JobCount>Success</JobCount> <JobList> <Job> <ActiveJob>True</ActiveJob> <JobID>EE64EC0E-F233-4549-8DF0-852298965F81</JobID> <JobType>WebPageHarvest</JobType> <Created>2008-11-05 17:04:36</Created> <Modified>2008-11-14 13:20:19</Modified> <Status>Running</Status> <Started /> <Ended /> <ScheduleID /> <ScheduleItemType>WebPageHarvest</ScheduleItemType> <ScheduleItemID>1001</ScheduleItemID> <ErrorCode /> <ErrorMessage /> <ErrorFirst /> <ErrorLast /> <ErrorCount /> <WarningFirst /> <WarningLast /> <WarningCount /> </Job> <Job> <ActiveJob>True</ActiveJob> <JobID>FF64EC0E-F233-4549-8DF0-852298965F82</JobID> <JobType>WebPageHarvest</JobType> <Created>2008-11-06 16:04:36</Created> <Modified>2008-11-14 14:20:19</Modified> <Status>Running</Status> <Started /> <Ended /> <ScheduleID /> <ScheduleItemType>WebPageHarvest</ScheduleItemType> <ScheduleItemID>1002</ScheduleItemID> <ErrorCode /> <ErrorMessage /> <ErrorFirst /> <ErrorLast /> <ErrorCount /> <WarningFirst /> <WarningLast /> <WarningCount /> </Job> </JobList> </JobGetResponse>back to top Job.PauseDescriptionIssues the 'Pause' command for a job currently running in the systemRequired parametersJobIDReturnsA message indicating whether the command was successfulExample request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Job.Pause&JobID=EE64EC0E-F233-4549-8DF0-852298965F81
<?xml version="1.0" encoding="utf-8" ?> <JobPauseResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </JobPauseResponse>back to top Job.ResumeDescriptionResumes a job that is in a Paused or Error state.Required parametersJobIDReturnsA message indicating whether the command was successfulExample request url
https://api.mozenda.com/rest?WebServiceKey=C70E1F84-E12B-4e73-B199-2EE6D43AF44E&Service=Mozenda10&Operation=Job.Resume&JobID=EE64EC0E-F233-4549-8DF0-852298965F81
<?xml version="1.0" encoding="utf-8" ?> <JobResumeResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Result>Success</Result> </JobResumeResponse>back to top |




Using the Mozenda Web Services Rest API, customers can programmatically connect to their Mozenda account. This provides complete automation capabilities for setting search parameters, gathering results, updating collections, etc. This connection is made by sending a standard Http request that includes variables and other settings for interacting with the system.


Our records indicate that your email is already associated with a Mozenda account.
Thanks for your interest in Mozenda. To activate your Free Trial, please email