-
Notifications
You must be signed in to change notification settings - Fork 1
Using the data2paper api to create data papers
Try the data2paper API at demo.data2paper.org
-
Register as a new user in the demo site
-
Authenticate using the api and if successful you will be given a json web token
POST to https://demo.data2paper.org/api/authenticate PARAMS: email and passwordIf authenticated successfully will receive 200 OK and the body will contain the token
{ "auth_token": "some_long_jwt_auth_token_string_returned_on_successful_authentication" }Save the JSON web token to make all future requests with the data2paper API. You would need to get the token again, if you change your password.
-
Add dataset to data2paper
POST to https://demo.data2paper.org/api/data_paper PARAMS: doi and orcid Header: Authorization = JWT some_long_jwt_auth_token_string_returned_on_successful_authenticationIf the dataset was imported successfully to create a data paper, you should receive a 201 response with location header containing the url of the data paper record created. The body of the response has the metadata associated with the data paper
Response: 201 Header: location = http://demo.data2paper.org/concern/data_papers/79407x16z?locale=en
Now that you have added the data paper on behalf of the author, the author can login to data2paperusing their ORCID credentials, and view the data paper in the dashboard. Also, the URL of the data paper is in the location header of the response received in step 2.
An example postman collection is added to the docs to try these two commands in postman