Created
August 23, 2017 13:42
-
-
Save ableasdale/ec9dd29c6a5d32f9d5312fc69f5edcbe to your computer and use it in GitHub Desktop.
MarkLogic: Getting the status of a backup using the ReST API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0-ml"; | |
declare variable $payload-status := '{"operation": "backup-status", "job-id" : "' || "8774639830166037592" || '","host-name": "' || xdmp:host-name() || '"}'; | |
xdmp:http-post("http://localhost:8002/manage/v2/databases/Documents?format=json", | |
<options xmlns="xdmp:http"> | |
<authentication method="digest"> | |
<username>admin</username> | |
<password>admin</password> | |
</authentication> | |
<data>{$payload-status}</data> | |
<headers> | |
<content-type>application/json</content-type> | |
<accept>application/json</accept> | |
</headers> | |
</options>) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment