ga4gh / ga4gh-starter-kit-drs

Open, extensible server implementation of the GA4GH Data Repository Service (DRS) specification
Apache License 2.0
4 stars 7 forks source link

Please describe the POST methods to create the new DRS objects to the DRS database. #59

Open polarbear127 opened 2 years ago

polarbear127 commented 2 years ago

Dear @jb-adams,

Thanks for providing this repo to help us to implement the DRS in our institute much easier.

However, a detailed description of POST methods is lacking. It would be great if the POST methods can be documented as well as GET methods.

Currently, I can only call the admin UI APIs to create a new object to DRS.

referenced issue: https://github.com/ga4gh/data-repository-service-schemas/issues/383

Thanks,

jb-adams commented 2 years ago

Thanks for raising this @polarbear127 , we really do need to get a swagger UI associated with the API.

We have the following endpoints for DRS object admin:

POST /admin/ga4gh/drs/v1/objects
PUT /admin/ga4gh/drs/v1/objects/{object_id}
DELETE /admin/ga4gh/drs/v1/objects/{object_id}

To hit these endpoints successfully, you will have to use the administrative API port, which is different from the public API port (defaults: public port: 4500, admin port: 4501)

But there are custom fields for storing information about the DRS Object that can't be inferred from the public API, so you'll need the Swagger UI to see how a DRS object is formatted when creating one in our implementation.

polarbear127 commented 2 years ago

Thanks for raising this @polarbear127 , we really do need to get a swagger UI associated with the API.

We have the following endpoints for DRS object admin:

POST /admin/ga4gh/drs/v1/objects
PUT /admin/ga4gh/drs/v1/objects/{object_id}
DELETE /admin/ga4gh/drs/v1/objects/{object_id}

To hit these endpoints successfully, you will have to use the administrative API port, which is different from the public API port (defaults: public port: 4500, admin port: 4501)

But there are custom fields for storing information about the DRS Object that can't be inferred from the public API, so you'll need the Swagger UI to see how a DRS object is formatted when creating one in our implementation.

Thanks a lot! I've gotten these APIs through developer tools in the web browser. But it's helpful that I can confirm they are correct!