-
Notifications
You must be signed in to change notification settings - Fork 26
Using the APIs
ReCiter ships with a set of microservices, each of which accomplishes function. For example, the /reciter/identity/
API allows you to update identity information in the Identity DynamoDB table.
Most experienced developers will choose to interact with ReCiter's APIs through the command line. To understand what the APIs are and how they function, developers can refer to this article and to the Swagger-based user interfaces.
- Using Swagger
-
Identity controller
- /reciter/find/identity/by/uid/ - retrieve identity info for a user
- /reciter/find/identity/by/uids/ - retrieve identity info for multiple users
- /reciter/identity/ - update identity information in DynamoDB
-
ReCiter controller
- /reciter/feature-generator/by/uid - full-featured API; returns suggestions and corresponding evidence
- /reciter/article-retrieval/by/uid - intended for departments and others who are interested in publishing publication data on public-facing webpages; does not include evidence
ReCiter comes with Swagger, a toolset that provides a user interface with helpful cues for how to interact with the application's RESTful APIs.
Upon navigating to the Swagger webpages, administrators can:
- browse through the different APIs
- review the data model associated with the API
- select different parameters
- input different values
- click execute and see the resulting output in JSON format
- view how the different selected parameters and values can be put together in the form of a Curl command or URL request
The following APIs come with the main ReCiter codebase.
- Purpose: retrieve identity information from the Identity table in DynamoDB for a single identity
-
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html#/identity-controller/findByUidUsingGET
- Key parameters: uid (primary identifier for the user)
-
Step-by-step instructions:
-
- Go to the Swagger interface for ReCiter.
-
- Go to
/reciter/find/identity/by/uid/
- Go to
-
- Click "Try it out."
-
- Enter person's "uid" or user ID.
-
- Click execute.
-
- Purpose: retrieve identity information from DynamoDB for a single identity
-
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html#/identity-controller/findByUidsUsingGET
- Key parameters: uids (primary identifier for the user) separated by comma
-
Step-by-step instructions:
-
- Go to the Swagger interface for ReCiter.
-
- Go to
/reciter/find/identity/by/uid/
- Go to
-
- Click "Try it out."
-
- Enter person's "uid" or user ID.
-
- Click on the dash button to enter a second person.
-
- Enter that second person's uid.
-
- Click execute.
-
- Purpose: update identity information in DynamoDB
-
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html#/identity-controller/addIdentityUsingPOST
- Key parameters: all fields in the Identity table
- Purpose: update identity information in DynamoDB
-
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html#operations-identity-controller-saveIdentitiesUsingPUT
- Key parameters: all fields in the Identity table
The following APIs come with the main ReCiter codebase.
-
Purpose: The
/reciter/feature-generator/by/uid
API is full-featured, intended for use by admins for testing accuracy of ReCiter or as a system-level integration with a user interface that displays evidence. It will optionally take into account any existing accepted or rejected articles to improve the accuracy of scoring. -
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html#operations-re-citer-controller-runFeatureGeneratorUsingGET
-
Key parameters: The following options that can be passed in as parameters at runtime.
- uid - unique institutional identifier associated with your target person; no default
- totalStandardizedArticleScore - final standardized score on a scale of 1-10 for each candidate article for your target author; a score of 5 would only return articles that had a score of 5 or greater; the raw score (totalArticleScoreNonStandardized) is mapped to this score using the thresholds defined in the standardizedScoreMapping parameter in application.properties. If you do not select a score, the system defaults to only suggest articles that have a standardized score of greater than or equal to totalArticleScore-standardized-default.
-
useGoldStandard - assertions that your target author did or did not write an article are store in the GoldStandard table in DynamoDB. You have two options for electing how such assertions are used:
- Option #1: AS_EVIDENCE - assertions are used during cluster scoring (as opposed to clustering); in cases where we know a candidate article was written by an author, the score of every other article in that cluster increases; in cases where we know a candidate article was not written by an author, the score of every other article in that cluster decreases
- Option #2: FOR_TESTING_ONLY - assertions are not used during cluster scoring; they only come into play once it's time to determine whether an article is a true positive, false positive, true negative, or false negative
- filterByFeedback - allows you to specify articles by the type of feedback you have on record in the GoldStandard table; you have the option to return varying combinations of articles that are accepted, rejected, and/or null
-
analysisRefreshFlag
- Option #1: if "TRUE", ReCiter will re-compute analyses; this is useful if you're changing settings in application.properties
- Option #2: if "FALSE", ReCiter will not re-compute its suggested publications unless there are no existing analyses as stored in DynamoDB's Analysis table and/or S3
-
retrievalRefreshFlag
- Option #1: "ALL_PUBLICATIONS" reruns the search returning all publications
- Option #2: "ONLY_NEWLY_ADDED_PUBLICATIONS" runs the search but only for publications that returned since the last time the search has been run; this option was put in place to allow institutions to easily run ReCiter on a daily basis for thousands of users without having re-retrieve all the existing articles
- Option #3: "FALSE" does not do any new search
-
Step-by-step instructions:
- Go to the Swagger interface for ReCiter.
- Go to
/reciter/feature-generator/by/uid
- Click "Try it out."
- Enter person's "uid" or user ID.
- Optional: enter totalStandardizedArticleScore. This is the minimum score. The default is set to 7.
- Optional: select option in useGoldStandard. AS_EVIDENCE means that the API uses accepted articles to increase the score of articles in the same cluster and rejected articles to decrease the score of articles in the same cluster. The default selection is AS_EVIDENCE.
- Optional: select option in filterByFeedback. The options are: ALL, ACCEPTED_ONLY, ACCEPTED_AND_NULL, etc. The default is set to ALL.
- Optional: select option in analysisRefreshFlag. The options are: TRUE and FALSE. If TRUE is selected, the scoring (as opposed to the article retrieval) is recomputed.
- Optional: under retrievalRefreshFlag, you may choose if you want a complete, partial, or no refresh of existing articles for your user. The options are: ALL_PUBLCATIONS, ONLY_NEWLY_ADDED_PUBLICATIONS, and FALSE. The default is FALSE.
- Click execute.
-
Purpose: The
/reciter/article-retrieval/by/uid
API is intended for departments and others who are interested in publishing publication data on public-facing webpages. This API does not provide confidential information such as personal email or names of student mentees output by the feature generator API (see below). It will always take into account any existing accepted or rejected articles to improve the accuracy of scoring. Additionally, this API does not allow its user to request a retrieval or analysis refresh. -
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html#operations-re-citer-controller-runArticleRetrievalUsingGET
-
Key parameters: The following options that can be passed in as parameters at runtime.
- uid - unique institutional identifier associated with your target person; no default
- totalStandardizedArticleScore - final standardized score on a scale of 1-10 for each candidate article for your target author; a score of 5 would only return articles that had a score of 5 or greater; the raw score (totalArticleScoreNonStandardized) is mapped to this score using the thresholds defined in the standardizedScoreMapping parameter in application.properties. If you do not select a score, the system defaults to only suggest articles that have a standardized score of greater than or equal to totalArticleScore-standardized-default.
- filterByFeedback - allows you to specify articles by the type of feedback you have on record in the GoldStandard table; you have the option to return varying combinations of articles that are accepted, rejected, and/or null
-
Step-by-step instructions:
- Go to the Swagger interface for ReCiter.
- Go to
/reciter/article-retrieval/by/uid
- Click "Try it out."
- Enter person's "uid" or user ID.
- Optional: enter totalStandardizedArticleScore. This is the minimum score. The default is set to 7.
- Optional: select option in filterByFeedback. The options are: ALL, ACCEPTED_ONLY, ACCEPTED_AND_NULL, etc. The default is set to ALL.
- Click execute.
- Purpose:
-
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html
- Key parameters:
- Purpose:
-
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html
- Key parameters:
- Purpose:
-
URL:
https://[application-subdomain].[Amazon-region].elasticbeanstalk.com/swagger-ui.html
- Key parameters:
/reciter/feature-generator/by/uid This api generates all the suggestion for a given uid along with its relevant evidence.
/reciter/goldstandard/ Update the goldstandard by passing GoldStandard model(uid, knownPmids, rejectedPmids)
/reciter/goldstandard/ Update the goldstandard by passing a list of GoldStandard model(uid, knownPmids, rejectedPmids) This api updates the goldstandard by passing list of GoldStandard model(uid, knownPmids, rejectedPmids).
/reciter/goldstandard/{uid} Get the goldStandard by passing an uid This api gets the goldStandard by passing an uid.
/reciter/retrieve/articles/ Retrieve Articles for all UID in Identity Table This API retrieves candidate articles for all uid in Identity Table from pubmed and its complementing articles from scopus
/reciter/retrieve/articles/by/uid Retrieve Articles for an UID. This API retrieves candidate articles for a given uid from pubmed and its complementing articles from scopus