Skip to content
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

Body of Works Rest API Endpoint to Get All Body of Works Data #66

Open
sprintell opened this issue Sep 20, 2024 · 0 comments
Open

Body of Works Rest API Endpoint to Get All Body of Works Data #66

sprintell opened this issue Sep 20, 2024 · 0 comments

Comments

@sprintell
Copy link
Member

sprintell commented Sep 20, 2024

As developer I want an API endpoint such that when I send a GET request to the URL, hateoas compliant, paginated list of all body of works in the database is returned in JSON Format.

{
   "body_of_work_id": 786767,
   "journal":null,
   "title":"Analysis of Genetic Host Response Risk Factors in Severe COVID-19 Patients",
   "doi":"https://doi.org/10.1101/2020.06.17.20134015",
   "publication_id":"GCP000027",
   "pubmed_id":null,
   "first_author":"Krystyna Taylor",
   "publication_date":null,
   "_links":{
  	"self":{
     	"href":"{base_url}/rest/api/v2/body-of-works/{bodyOfWorkId}"
  	},
  	"unpublished-studies":{
     	"href":"{base_url}/rest/api/v2/body-of-works/{bodyOfWorkId}/studies"
  	}
   }
}

Management Rules

  • Rule 1: Endpoint - /rest/api/v2//body-of-works
  • Rule 2: HTTP Request Method - GET
  • Rule 3: Endpoint should accept search page and sort parameters as in /rest/api/v2/body-of-works?page=0&size=20
  • Rule 4: HATEOAS, sorting, pagination

Also: As developer I want a BodyOfWork details API endpoint such that when I send a GET request to the URL I can get full details of a single BodyOfWork data in JSON Format

14.1 - Management Rules
Rule 1: Endpoint - /rest/api/v2/body-of-works/{bodyOfWorkId}
Rule 2: HTTP Request Method - GET
Rule 3: Endpoint should accept bodyOfWorkId
Rule 4: Endpoint should return full attributes of the bodyOfWork
Rule 5: Endpoint should be accessible to all

Additional details here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants