[MarkLogic Dev General] Management API: JSON payload for "path namespaces"

Jim Fuller Jim.Fuller at marklogic.com
Thu Sep 21 03:51:39 PDT 2017


for json payloads, the convention is to use the singular for array keynames

{
  "path-namespace": [
    {
      "prefix": "ns",
      "namespace-uri": "http://example.com/test"
    }
  ]
}

hth, J

________________________________
From: general-bounces at developer.marklogic.com <general-bounces at developer.marklogic.com> on behalf of Florent Georges <lists at fgeorges.org>
Sent: 21 September 2017 12:44:41
To: MarkLogic Developer Discussion
Subject: [MarkLogic Dev General] Management API: JSON payload for "path namespaces"

Hi,

I am trying to send an update request for the property "path namespaces" on a database (PUT /databases/{name}/properties), using a JSON payload.  The payload is:

    { "path-namespaces": [{
        "prefix": "ns",
        "namespace-uri": "http://example.com/"
    }]}

I then get a MANAGE-INVALIDPAYLOAD error:

    Unexpected element: prefix (not in schema)

Any idea what's wrong?

Regards,

--
Florent Georges
H2O Consulting
http://h2o.consulting/


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://developer.marklogic.com/pipermail/general/attachments/20170921/1bef9214/attachment.html 


More information about the General mailing list