Loading TOC...

POST /manage/v2/databases/{id|name}/temporal/collections


This resource address creates a new temporal collection for the named database.

URL Parameters
format The format of the posted data. Can be either html, json, or xml (default). This value overrides the Accept header if both are present.
Request Headers
Accept The expected MIME type of the response. If the format parameter is present, it takes precedence over the Accept header.
Response Headers
Content-type The MIME type of the data in the response body. Depending upon the value of the format parameter or Accept header, one of application/xml, application/json, or text/html.


Upon success, MarkLogic Server returns status code 202 (Accepted). If the collection already exists or if the payload is malformed, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.

Required Privileges

This operation requires the temporal-admin role, or the following privilege:


Usage Notes

The structure of the data in the request body is shown here.

Note: The properties described here are for XML payloads. In general they are the same for JSON, with the exception that, in JSON, options is expressed in singular form. For example, in JSON, options is instead option and the format is: "option":["opt"].


The unique ID of the collection.


The name of a temporal collection.


System axis name for the temproal collection.


Valid axis name for the temporal collection.


Options for a temporal collection

This is a complex structure with the following children:


Option for temporal collection.


   cat temporal-collection.json
     "collection-name": "mycollectionnameuri",
     "system-axis": "mysystemaxisname",
     "valid-axis": "myvalidaxisname"
  curl -X POST  --anyauth -u admin:admin --header "Content-Type:application/json" \
  -d @temporal-collection.json \

  ==>  Creates a temporal collection, named 'mycollectionnameuri," in the 
       Documents database. 

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.