sci.AI API returns machine-readable versions of the documents. You’ll have access to your papers or, if requested additionally, partner access to a bigger list of the literature. Sending plain text for semanticization will be implemented in the next versions.

Semanticized Papers API

sci.AI Version: v.0.39
Document Version: v.0.1
Date: 29.10.2017
Authors & Editors: Alexander Pashuk


Introduction

sci.AI API returns machine-readable versions of the documents. You'll have access to your papers or, if requested additionally, partner access to a bigger list of the literature.

Sending plain text for semanticization will be implemented in the next versions.

In order to use sci.AI API user must be registered in sci.AI Preprint as we use its email/password to authenticate user. It is necessary to restrict access to scientific papers: each user will have access only to papers he uploads or he was marked by someone as paper editor/author. This way user can be sure that no one can download, view or edit scientific content of his papers.

1. Authentication

We use token-based approach to authenticate user. In this approach user receives token and uses it to get access to restricted content. Please keep login, password and tokens in secret.

Sign up form

The auth workflow works as follows:

  • Client sends email and password to the server
  • Server verifies email and password and responds with an auth token
  • Client then sends the token with all subsequent requests to the API
  • Server decodes the token and validates it

Each token has expiration time (5 days) and when it expires client has to issue a new one.

URL

http://api.sci.ai/authenticate [POST]

Parameters

Name Description
email User email
password User password

Example

curl http://api.sci.ai/authenticate \
-X POST \
-H "Content-Type: application/json" \
--data '{"email":"user@example.com","password":"secure_pass"}'

2. Errors

We use conventional HTTP response codes to indicate the success or failure of an API request.

Code Description
200 - OK Everything worked as expected.
400 - Bad Request The request was unacceptable, often due to missing a required parameter.
401 - Unauthorized No valid API key provided.
402 - Request Failed The parameters were valid but the request failed.
404 - Not Found The requested resource doesn't exist.
409 - Conflict The request conflicts with another request (perhaps due to using the same idempotent key).
429 - Too Many Requests Too many requests hit the API too quickly. We recommend an exponential backoff of your requests.
500, 502, 503, 504 - Server Errors Something went wrong on sci.AI end.

3. List of papers

Use the following API method in order to retrieve list of paper you have access to:

http://api.sci.ai/papers [GET]

Parameters

Name Description
query Query string to filter papers

Example

curl http://api.sci.ai/papers?query= \
-X GET \
-H "Authorization: Bearer "

4. Semanticization

tbd

Automatic Semanticization

tbd

5. Retrieving Machine-Readable Version by URI

Use following API method in order to retrieve a paper:

http://api.sci.ai/papers/download [POST]

Parameters

Name Description
id Paper's URL, DOI URL, DOI code or sci.AI internal paper ID
format Format (rdfa, jats, json or xml are valid choices

NOTE: Different IDs will return different versions of the same paper. For example,

  • "id":"doi.org/10.7717/peerj.1198" or "id":"10.7717/peerj.1198" or "id":"peerj.com/articles/1198/" or sci.AI Internal ID will return PeerJ version of paper;
  • "id":"authorea.com/users/22661/articles/25846-orthostatic-stability-with-intravenous-levodopa" or sci.AI Internal ID (unique, different from the first case) will return Authorea version of paper.
curl http://api.sci.ai/papers/download \
-X POST \
-H "Authorization: Bearer <your_token>" \
-H "Content-Type: application/json" \
--data '{"id":"doi.org/10.7717/peerj.1198","format":"xml"}'

Cookie Settings