The REST API in Five Minutes

MarkLogic provides a RESTful interface to its powerful database and search functionality. If you're unfamiliar with some terms and concepts from basic web development (e.g., HTTP, URLs, XML, and JSON), you may want to go bone up on those elsewhere. And if you are a Java pro, you may prefer to see the Java version of this tutorial. Otherwise, please read on.

This tutorial walks you through some basic concepts. It also provides some elementary examples, with links to the REST Application Developer's Guide and API reference, where you can find details and richer examples.

To start with, the MarkLogic REST API assumes three job roles for individuals:

  1. The developer. This person does the day to day programming against REST endpoints. They're a pro with .NET, Ruby, Python, or some other language, and the REST API documentation (Developers Guide and REST Client API reference) are the main exposure they have to MarkLogic.

  2. The developer admin. This person controls MarkLogic administrative settings and configuration that affect the REST API's behavior. For example, they adjust current query settings, any stored transformations or extensions which may be called, and index settings. They do this via REST endpoints separate from those available to the regular developer. They do not access or administer MarkLogic outside of these endpoints.

  3. The database admin. This person installs MarkLogic, creates users, sets up databases and REST servers, and manages and monitors them. They're the classic IT database administrator, often not a programmer.

In some cases, a single individual may have more than one of these roles. For example, if you're running MarkLogic on your own laptop, you'll assume all of these roles on day one.

Basic Concepts


  • This could be useful in helping you monitor REST APIs for performance and accuracy. Uptime Cloud Monitor supports monitoring REST APIs on a completely SAAS based model. The setup is quick and easy. You can configure the REST API URL, the REST method (GET/ POST/ PUT/ DELETE), request parameters (if any), credentials required (if any), the monitoring frequency, the geographic location of the monitoring stations (from a choice of 15 stations across the globe). You can match the REST API response body against a specific string to ensure that the response is as expected. You can also configure alerts (notified via SMS, Email, PagerDuty etc) to be triggered based on API downtime, performance degradation or API response verification failure. More details on REST API Monitoring: You can also sign up for a 14 day free trial of Uptime Cloud Monitor Disclaimer: I work at Uptime Cloud Monitor.