I’m passing this query as a json body in accordance with
https://v1-docs.xtdb.com/clients/http/openapi/1.24.3/#/paths/~1_xtdb~1query/post
{
"query": {
"find": ["e"],
"where": [["e", "xt/id", "_"]],
"limit": 100
},
"in-args": ["08k4Z2rD3uuwkvWrd8HHe"]
}
Can’t figure out why I’m receiving a 400.
Raw HTTP request:
– Client >>> Server
POST /_xtdb/query HTTP/1.1\x0d
Accept: application/json\x0d
Content-Type: application/transit+json\x0d
Accept-Encoding: gzip\x0d
Content-Length: 100\x0d
Host: localhost:8999\x0d
Connection: close\x0d
\x0d
{"query":{"find":["e"],"where":[["e","xt/id","_"]],"limit":100},"in-args" ["08k4Z2rD3uuwkvWrd8HHe"]}
– Client <<< Server
HTTP/1.1 400 Bad Request\x0d
Connection: close\x0d
Content-Type: application/json;charset=utf-8\x0d
Content-Length: 999\x0d
Server: Jetty(9.4.43.v20210629)\x0d
\x0d
{"spec":"(juxt.clojars-mirrors.spec-tools.v0v10v5.spec-tools.core/spec {:spec (clojure.spec.alpha/keys :req-un [:xtdb.http-server.query/query] :opt-un
[:xtdb.http-server.query/in-args]), :type :map, :juxt.clojars-mirrors.spec-tools.v0v10v5.spec-tools.parse/key->spec {:in-args
:xtdb.http-server.query/in-args, :query :xtdb.http-server.query/query}, :juxt.clojars-mirrors.spec-tools.v0v10v5.spec-tools.parse/keys #{:in-args
:query}, :juxt.clojars-mirrors.spec-tools.v0v10v5.spec-tools.parse/keys-req #{:query},
:juxt.clojars-mirrors.spec-tools.v0v10v5.spec-tools.parse/keys-opt #{:in-args}, :leaf? false})","problems":[{"path":[],"pred":"(clojure.core/fn [%]
(clojure.core/contains? % :query))","val":{},"via":["xtdb.http-server.query/body-params"],"in":[]}],"type":"juxt.clojars-mirrors.reitit-core.v0v5v15.r
eitit.coercion/request-coercion","coercion":"spec","value":{"query":{"find":["e"],"where":[["e","xt/id","_"]],"limit":100},"in-args":["08k4Z2rD3uuwkvW
rd8HHe"]},"in":["request","body-params"]}