-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PLAT-931] Add External Identities endpoints to docs #25
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
get: | ||
summary: Retrieve user's external identities | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency, would suggest "Retrieve an external identity" |
||
description: >- | ||
Retrieves a JSON object of a user's external identity, currently this only includes their ORCID account. | ||
|
||
The returned information includes the external identity's name, status and id. | ||
|
||
#### Returns | ||
|
||
Returns a JSON object with a `data` key containing the representation of the requested | ||
external identities, if the request is successful. | ||
|
||
If the request is unsuccessful, an `errors` key containing | ||
information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) | ||
to understand why this request may have failed. | ||
|
||
|
||
parameters: | ||
- in: path | ||
type: string | ||
name: user_id | ||
required: true | ||
description: 'The unique identifier of the user.' | ||
- in: path | ||
type: string | ||
name: identities_id | ||
required: true | ||
description: "The unique identifier of a user's external identity." | ||
tags: | ||
- Users | ||
operationId: external_identities_detail | ||
responses: | ||
'200': | ||
description: 'OK' | ||
schema: | ||
$ref: definition.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
examples: | ||
application/json: | ||
data: | ||
links: | ||
self: https://api.osf.io/v2/users/q7fts/settings/identities/ORCID/ | ||
attributes: | ||
status: VERFIED | ||
external_id: '0000-0001-9143-4652' | ||
id: ORCID | ||
type: users | ||
id: q7fts | ||
|
||
delete: | ||
summary: Delete user's external identities | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency, would suggest "Remove an external identity" |
||
description: >- | ||
Deletes a user's external identity. | ||
|
||
The returns deleted information including the external identity's name, status and id. | ||
|
||
#### Returns | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See other delete request sections, I think this should be:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Like other sections, please add a "Permissions" section to explain that users can only delete their own identities. |
||
|
||
Returns a JSON object with a `data` key containing the representation of the requested | ||
external identities, if the request is successful. | ||
|
||
If the request is unsuccessful, an `errors` key containing | ||
information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) | ||
to understand why this request may have failed. | ||
|
||
|
||
parameters: | ||
- in: path | ||
type: string | ||
name: user_id | ||
required: true | ||
description: 'The unique identifier of the user.' | ||
- in: path | ||
type: string | ||
name: identities_id | ||
required: true | ||
description: "The unique identifier of a user's external identity." | ||
tags: | ||
- Users | ||
operationId: external_identities_detail | ||
responses: | ||
'200': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this return 200? Shouldn't a delete request return |
||
description: 'OK' | ||
schema: | ||
$ref: definition.yaml | ||
examples: | ||
application/json: | ||
data: | ||
links: | ||
self: https://api.osf.io/v2/users/q7fts/settings/identities/ORCID/ | ||
attributes: | ||
status: VERFIED | ||
external_id: '0000-0001-9143-4652' | ||
id: ORCID | ||
type: users | ||
id: q7fts | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
get: | ||
summary: List all user's external identities | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For consistency, would suggest "List all external identities" (the summary for listing user preprints, for example, is "List all preprints") |
||
description: >- | ||
Retrieves a list of a user's external identities, currently this only includes their ORCID accounts. | ||
|
||
The returned information includes the external identity's name, status and id. | ||
|
||
#### Returns | ||
|
||
Returns a JSON object with a `data` key containing the representation of the requested | ||
external identities, if the request is successful. | ||
|
||
If the request is unsuccessful, an `errors` key containing | ||
information about the failure will be returned. Refer to the [list of error codes](#tag/Errors-and-Error-Codes) | ||
to understand why this request may have failed. | ||
|
||
|
||
parameters: | ||
- in: path | ||
type: string | ||
name: user_id | ||
required: true | ||
description: 'The unique identifier of the user.' | ||
tags: | ||
- Users | ||
operationId: external_identities_list | ||
responses: | ||
'200': | ||
description: 'OK' | ||
schema: | ||
$ref: definition.yaml | ||
examples: | ||
application/json: | ||
data: | ||
- links: | ||
self: https://api.osf.io/v2/users/q7fts/settings/identities/ORCID/ | ||
attributes: | ||
status: VERFIED | ||
external_id: '0000-0001-9143-4652' | ||
id: ORCID | ||
type: users | ||
id: q7fts | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the OSF PR, it looks like this URL is
/users/{uid}/settings/identities/