-
Notifications
You must be signed in to change notification settings - Fork 4
Home
To access the data saved in the database, the provided REST API can be used. It's possible to request all entities shown on the Database Scheme page using the defined parameters. You can access the REST API at this link.
What follows is a simple example of a GET request:
/person:fullName=John+Doe&birth=1985+10+5
In it, we search for a person entity (=author), whose attributes "fullName" and "birth" correspond to the values specified.
For a more elaborate example consider the following request:
/paper:topic=vogon+poetry/person:fullName=Daniel+Klingbein&obit=1993+05+22
Here we are looking for a paper entity which has the topic of "vogon poetry". This is the first part of the request which filters the result set to only contain papers with that very topic. Since papers and persons have a hierarchical relationship (please note that most relationships, unlike paper <-> author, are unidirectional, for further information see the Database Scheme page) the search can be narrowed down even further. We are now searching for persons named "Daniel Klingbein" who died on the 22nd of May, 1993. The type of objects returned is determined by the entity specified after the last "/" symbol.
Consider the following request:
/paper:title=xyz&topic=abc/person:fullName=foo+bar
At first glance, you might expect this request to return a list of papers, when it will instead return a list of persons that fulfill their specified attributes and can be found in the previously filtered paper entities. How you structure your queries can have a siginificant impact on performance.
Sometimes, paper titles or similar data have special characters in them that are not alphabetic. For those characters, a backtick (`
) can be used to incorporate them into the attribute value. Example:
/paper:title=Keynote`:+My+great+keynote
This way, the API will search the database for a paper with the title "Keynote: My great keynote". Without the backtick, the API will throw a syntax error.
To get all available stored entities of a specific type, just query the entity name without any attributes. E.g.:
- To get all stored papers:
/paper
- To get all sessions in a conference:
/conference:name=ACL+2018/session
. Please note, that in this case, further specifications have to be made on the entities that are not returned in the result set.
The name to use in front of the colon is the entity name as shown on the Database Scheme page, but all lowercase.
The attributes that can be included in the request are the fields in the respective entity class.
The values of the attributes are given by their type. SessionCategory is a single digit (for the meaning see below), LocalDate requires 3 numbers and LocalDateTime requires 5 numbers.
For further API requests that are available but do not follow the scheme above, please see the Special API Requests page.
-
/
denotes a hierarchical relationship between to entities (e.g. conference -> session). For further information, please see the respective entity pages -
+
replaces spaces. Please note, that in numerical attributes, this is used to separate different numbers -
:
signifies that some attributes of the preceding entity will be specified -
&
chains together such attribute specifications -
`
Ignores the (sometimes non-existant) semantic functionality of the next character and makes it part of the attribute value. This allows you to use e.g. colons in paper titles
0: BREAK
1: CEREMONY
2: MEETING
3: PRESENTATION
4: RECRUITMENT
5: SESSION
6: SOCIAL
7: TALK
8: TUTORIAL
9: WELCOME
10: WORKSHOP