Fork me on GitHub

is there a recommended Java API approach or documentation about it? I see there is done, but not sure where to find the docs for it. for example: a takes a list of lists, and it comes down to a function that verifies that each doc in that list is a map however there is also a that conveniently adds keyword("crux.tx/put") and friends, but it is constructed from the and not a map, so they don’t seem to fit the List of Maps expectation of submitTx but.. then it looks like in tests.. ))


I was pointed to this page when I asked for Java examples:


The idea here is, that you write plain crux statement as a string: e.g.:

String put = "[:crux.tx/put\n" +
            "{:crux.db/id :someId\n" +
            ":foo      \"foo\"\n" +
            ":bar  \"bar\"\n" +
And read it through Clojure read api:
Object datafied =;
The output of this function can be passed down the Crux API:
node.submitTx((List<List<?>>) datafied)


it’s not exactly that simple with real Java nested object ) also hard to compose Java and Clojure functions. I added something to yang that was useful: to get this done, but I have not used ICruxIngestAPI.submitTx I just handrolled some of these:

static IFn submitTx() {
        return Clojure.var("crux.api", "submit-tx");

    static IPersistentVector toTx(Object event) {
        return (PersistentVector) vector.invoke(TX_PUT, event);


Hi @U0541KMAZ sorry for the late response. Unfortunately we should have removed / deprecated the /api/alpha code already as it is not going to be supported. We will be working on another Java-friendly implementation soon however


ah, makes sense, cause it did not seem “together” ) no worries, it’s the same (J)VM anyway

😅 1