Skip to content

Add integration with Jabref Online #7582

Open
@tobiasdiez

Description

@tobiasdiez

JabRefOnline now supports a (simple) API to create and login users as well as create and get documents (BibEntries). What is missing is the integration with JabRef. It would be nice if another developer could implement this so that I can concentrate fully on the server side. @koppor @calixtus @Siedlerchr interested?

To get started, follow the instructions in JabRefOnline to setup the local environment and run yarn dev to start the server. Afterwards the API can be reached at http://localhost:3000/api. Alternatively, you can also use the online version: https://jabref-online.herokuapp.com/user/register
It is probably good to use a client-side Java library for Graphql, e.g. https://www.apollographql.com/docs/android/essentials/get-started-java/.

Here are few relevant queries:

  • Add new entry
mutation {
  addUserDocumentRaw(document: {
    type: "article",
    citationKey: "citeme",
    fields: [
      { field: "author", value: "JabRef devs" }
      { field: "some", value: "random field" }
    ]
  }) {
    id
  }
}

Response contains an id that should be stored in the bibentry for further identification.

  • Get entry by id:
query getDocumentById($id: ID!) {
	getUserDocumentRaw(id: $id) {
  	type
    citationKey
    fields { field, value }
  }
}

with query variables being the id returned by the add operation, e.g. {"id": "ckmtd42zj000658v7csce7job"}. This returns the following data

{
  "data": {
    "getUserDocumentRaw": {
      "type": "article",
      "citationKey": "citeme",
      "fields": [
        {
          "field": "author",
          "value": "JabRef devs"
        },
        {
          "field": "some",
          "value": "random field"
        }
      ]
    }
  }
}
  • More functions (such as deleting and updating documents) will be added soon.

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Free to take

    Status

    High priority

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions