
de.citec.scie.web.templates.public.api.ftl Maven / Gradle / Ivy
Show all versions of webservice Show documentation
<#assign header_step3_class="inactive">
<#include "../header.ftl">
SCIE – API
About
For large-scale analysis of PDF files, we provide a simple application
programmers interface (API) which allows you to integrate this webservice
into your own applications.
By using our API you confirm to have the permission to upload the documents
and agree to our the terms and conditions. Both requirements are elaborated on
the upload page.
In case you cannot share your documents with others or are
constrained by the rate limit (three concurrent requests), note that the full
source code of the application can be downloaded at
http://opensource.cit-ec.de/projects/scie.
API
You can use the API by sending an HTTP POST-request to ${host}api/
. The
request must be encoded as multipart/form-data
.
There are two form data fields: The document
field and the format
field:
document
contains the actual document data. It may either be a
plain text file with UTF-8 encoding or a PDF document. The document type is
determined automatically by the server. The document
field is mandatory.
format
may be one of json
(the result in a simple
JSON format) or html_plain
(plain HTML). If not given, the
format
field defaults to json
.
JSON Format
The returned JSON
data consists of three major sections:
annotations
, groups
and text
.
annotations
lists all annotations. Annotations consist of
arbitrary data given in the data
section, the name
of
the annotation, a numeric group
identifier, as well as
begin
and end
offsets in the text
.
groups
is a mapping between group identifiers and
group description, where the latter primarily contains the name
of the group.
text
contains the input text. All begin
and
end
offsets are relative to this text.
Examples
curl
This example uses the curl command line program to issue a request
curl -F "format=json" -F "[email protected]" ${host}api/
<#include "../footer.ftl">