Hi Jim,

Thank you for the tip.  What I posted was the output of logging the
object, which was sent from JavaScript (and properly serialized to the
HTTP request, indeed).

Here is a complete repro from the command line, using CURL (just adapt
the second line with your credentials, potentially the firt one as
well if you do not use DIGEST, and the last line if your dev MarkLogic
instance is not on localhost).

curl --digest \
    -uadmin:admin \
    -X POST \
    -H "Content-Type: application/json" \
    -d '
{ "database-name": "fgeorges-test",
  "range-element-index":
   [ { "scalar-type": "string",
       "localname": "foobar",
       "range-value-positions": false,
       "invalid-values": "ignore",
       "namespace-uri": "",
       "collation": "http://marklogic.com/collation/"; } ] }' \
    http://localhost:8002/manage/v2/databases

If you execute this command on a shell, it will create a database with
the name "fgeorges-test" (you can check it is OK on the admin console).
If you try to execute the same again, it returns the following error:

{"errorResponse": {
    "statusCode":"400",
    "status":"Bad Request",
    "messageCode":"MANAGE-CONFLICTINGCONFIG",
    "message":"MANAGE-CONFLICTINGCONFIG: (err:FOER0000) A conflict has been
detected:  database configurations differ."}}

Is this really the expected behaviour?  Even though both requests are
exactly the same?

Regards,

-- 
Florent Georges
H2O Consulting
http://h2o.consulting/ - New website!


On 25 January 2017 at 18:11, Jim Fuller wrote:

> as one of my colleagues reminded me I meant 'quotes'
>
> J
> ------------------------------
> *From:* Jim Fuller
> *Sent:* 25 January 2017 17:05
> *To:* [email protected]
> *Subject:* re Management API
>
> Hello Florent,
>
> The json you supplied seems to be missing some single quotes in places.
>
> Could you check you have well formed json and retry ?
>
> thx, Jim Fuller
>
>
>
>
> _______________________________________________
> General mailing list
> [email protected]
> Manage your subscription at:
> http://developer.marklogic.com/mailman/listinfo/general
>
> --
> <http://developer.marklogic.com/mailman/listinfo/general>
> Florent Georges
> <http://developer.marklogic.com/mailman/listinfo/general>
> http://fgeorges.org/
> http://h2o.consulting/ - New website!
>
_______________________________________________
General mailing list
[email protected]
Manage your subscription at: 
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to