Get started
  • 14 May 2024
  • 2 Minutes to read
  • Contributors
  • Dark
  • PDF

Get started

  • Dark
  • PDF

Article summary

The REST API is available to all Enterprise customers.

To better understand how to use the Mozenda REST API, we have provided this getting started toolkit to walk you through the most commonly executed tasks of the API.

Web service key
To run API calls, you need a web service key. You can find this by following the instructions here.

Running projects

Run an agent

To run an agent, use Agent.Run. If you have parameters you would like to pass in to the agent, refer to the Agent.Run documentation.
How to find the AgentID

Sign in to the Web Console, go to the Agents tab, and look at the ItemID next to the agent you’d like to run.

The call returns something similar to the following:

<?xml version="1.0" encoding="utf-8"?>

The data is ready when both the harvest job (JobID) and the refresh job (ReportRefreshJobID) have a status of Done. Use Job.Get or Job.GetStatus to check the current status.

Run a sequence

A sequence creates a workflow that allows for more task automation than can be accomplished by a single agent.

To run a sequence, use Sequence.Run.
How to find the SequenceID

Sign in to the* Web Console* > select Sequences > Look at the ItemID next to the sequence you’d like to run.

To check the status of the sequence, use Sequence.GetStatus. This operation returns information about the steps included in the sequence, including which step is currently running.

Getting data

Return items from a view

Use View.GetItems to access data that Mozenda has captured.
How to find the ViewID

Sign into the Web Console > select Collections > select the collection you are interested in pulling from > hover over the view in the drop-down at the top right corner of the page.
view id

If the view has more than 1000 items, this request returns 1000 items at a time.

Set a publisher and publishing

Through the API, you can alter the publisher where a collection publishes to. The options for the method of publishing are: Email, FTP, AmazonS3, AzureStorage, Dropbox, Google Cloud Storage, and Google drive. For more information about these methods and the parameters required for each, visit the Collection.SetPublisher documentation.
How to find the CollectionID

Sign into the Web Console > select Collections > look at the ItemID next to the collection you’d like to set the publisher for.

After you set a publisher for the collection, publish the data using Collection.Publish.

Was this article helpful?