Created
June 24, 2024 12:08
-
-
Save Johnetordoff/83383f8db50b673cf5725bb99fc33208 to your computer and use it in GitHub Desktop.
Prototype API contract
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
**GET v2/preprints/(?P<preprint_id>\w+)/institutions/$** | |
---- | |
Returns all institutional affiliations available on a Preprint. | |
* **URL Params** | |
TBD filter/sort params? | |
* **Data Params** | |
None | |
# **Headers** | |
Content-Type: application/json | |
Authorization: Bearer `<OAuth Token>` | |
* **Success Response:** | |
* **Code:** 200 | |
**Content:** | |
``` | |
{ | |
"data":[ | |
{ | |
"type":"institutions", | |
"id":"667958a7e4031d007dbbc77e" | |
} | |
], | |
"links":{ | |
"self":"http://localhost:8000/v2/preprints/bha7g/institutions/", | |
"html":"http://localhost:8000/v2/preprints/bha7g/" | |
}, | |
"meta":{ | |
"version":"2.0" | |
} | |
} | |
``` | |
**PUT v2/preprints/(?P<preprint_id>\w+)/institutions/$** | |
---- | |
Updates the institution affiliations information for a given preprint. | |
* **URL Params** | |
None | |
* **Data Params** | |
``` | |
{ | |
"data": [ | |
{ | |
"type":"institutions", | |
"id":"667958a7e4031d007dbbc77e" | |
} | |
] | |
} | |
``` | |
* **Headers** | |
Content-Type: application/json | |
Authorization: Bearer `<OAuth Token>` | |
* **Success Response:** | |
* **Code:** 200 | |
**Content:** | |
``` | |
{ | |
"data":[ | |
{ | |
"type":"institutions", | |
"id":"66795a72e4031d007ff02c53" | |
} | |
], | |
"links":{ | |
"self":"http://localhost:8000/v2/preprints/fkq8t/institutions/", | |
"html":"http://localhost:8000/v2/preprints/fkq8t/" | |
}, | |
"meta":{ | |
"version":"2.0" | |
} | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment