version: 0.1.0 |
The ORCID Link Service provides an API to enable the linking of a KBase user account to an ORCID account. This "link" consists of a Link Record which contains a KBase username, ORCID id, ORCID access token, and a few other fields. This link record allows KBase to create tools and services which utilize the ORCID api to view or modify certain aspects of a users ORCID profile.
Once connected, ORCID Link enables certain integrations, including:
- syncing your KBase profile from your ORCID profile
- creating and managing KBase public Narratives within your ORCID profile
https://www.kbase.us/about/terms-and-conditions-v2/
KBase, Lawrence Berkeley National Laboratory, DOE
https://www.kbase.us/
engage@kbase.us
The MIT License https://github.com/kbase/kb_sdk/blob/develop/LICENSE.md
This document is primarily generated from the openapi
interface generated
by FastAPI.
The Endpoints section documents all REST endpoints, including the expected responses, input parameters and output JSON and type definitions.
The Types section defines all of the Pydantic models used in the codebase, most of which are in service of the input and output types mentioned above.
- Due to limitations of GitHub's markdown support, tables have two empty rows at the start of the header. This is due to the fact that GitHub does not allow any table formatting instructions, so we need to use the first two rows to establish the table and column widths.
n/a
none
Status Code | Description | Type |
---|---|---|
200 | Successful Response | _Response |
210 | [1010] Authorization Required | _ErrorResponse_AuthorizationRequiredError_ |
211 | [1011] Not Authorized | _ErrorResponse_NotAuthorizedError_ |
212 | [1020] Not Found | _ErrorResponse_NotFoundError_ |
213 | [-32602] Invalid params
Invalid method parameter(s) | ErrorResponse_InvalidParams |
214 | [-32601] Method not found
The method does not exist / is not available | ErrorResponse_MethodNotFound |
215 | [-32700] Parse error
Invalid JSON was received by the server | ErrorResponse_ParseError |
216 | [-32600] Invalid Request
The JSON sent is not a valid Request object | ErrorResponse_InvalidRequest |
217 | [-32603] Internal error
Internal JSON-RPC error | ErrorResponse_InternalError |
default | Default Response | none |
Get API Documentation
Provides a web interface to the auto-generated API docs.
none
Status Code | Description | Type |
---|---|---|
200 | Successfully returned the api docs | text/html |
404 | Not Found | none |
Access to and control over stored ORCID Links
OAuth integration and internal support for creating ORCID Links.
The common path element is /linking-sessions
.
Some of the endpoints are "browser interactive", meaning that the links are followed directly by the browser, rather than being used within Javascript code.
Start Linking Session
This endpoint is designed to be used directly by the browser. It is the "start" of the ORCID OAuth flow. If the provided session id is found and the associated session record is still in the initial state, it will initiate the OAuth flow by redirecting the browser to an endpoint at ORCID.
Starts a "linking session", an interactive OAuth flow the end result of which is an access_token stored at KBase for future use by the user.
Continue Linking Session
This endpoint implements the handoff from from the ORCID authorization step in the ORCID OAuth flow. That is, it serves as the redirection target after the user has successfully completed their interaction with ORCID, at which they may have logged in and provided their consent to issuing the linking token to KBase.
Note that this is an interstitional endpoint, which does not have its own user interface. Rather, it redirects to kbase-ui when finished. If an error is encountered, it redirects to an error viewing endpoint in kbase-ui.
Direct access to ORCID via ORCID Link
Add, remove, update 'works' records for a user's ORCID Account
This section presents all types defined via FastAPI (Pydantic). They are ordered alphabetically, which is fine for looking them up, but not for their relationships.
TODO: a better presentation of related types
Name | Type | Required |
---|---|---|
code | integer | |
message | string |
Name | Type | Required |
---|---|---|
code | integer | |
message | string |
Name | Type | Required |
---|---|---|
code | integer | |
message | string | |
data | Any Of null |
Name | Type | Required |
---|---|---|
code | integer | |
message | string | |
data | Any Of null |
Name | Type | Required |
---|---|---|
code | integer | |
message | string |
Name | Type | Required |
---|---|---|
code | integer | |
message | string |
Name | Type | Required |
---|---|---|
code | integer | |
message | string |
Name | Type | Required |
---|---|---|
code | integer | |
message | string |
Name | Type | Required |
---|---|---|
loc | array | ✓ |
msg | string | ✓ |
type | string | ✓ |
ctx | Any Of object null |
Name | Type | Required |
---|---|---|
errors | Any Of array null |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
error | AuthorizationRequiredError | ✓ |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
error | InternalError | ✓ |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
error | InvalidParams | ✓ |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
error | InvalidRequest | ✓ |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
error | MethodNotFound | ✓ |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
error | NotAuthorizedError | ✓ |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
error | NotFoundError | ✓ |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
error | ParseError | ✓ |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| |||||||||
id | Any Of string integer | |||||||||
method | string | ✓ | ||||||||
params | object |
Name | Type | Required | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
jsonrpc | Const
| ✓ | ||||||||
id | Any Of string integer | ✓ | ||||||||
result | object | ✓ |
- ORCID
- Open Researcher and Contributor ID
- Public link record
- The record used internally to associate a KBase User Account with an ORCID Account, with sensitive information such as tokens removed. Represented by the type LinkRecordPublic