datajoint / datajoint-labbook

DataJoint LabBook is a graphical user interface built using React to facilitate working with DataJoint computational pipelines.
https://datajoint.com/docs/core/datajoint-labbook
MIT License
11 stars 14 forks source link

Api route change #137

Closed Synicix closed 3 years ago

Synicix commented 3 years ago

Depends on Pharus getting updated to the newest version. Please wait for the git submodule reference to be updated.

guzman-raphael commented 3 years ago

@Synicix Pushed the last commit that will complete the resource naming changes on the pharus side in datajoint/pharus#99. Still need to clean up things, update tests, and update docs but the interface should be locked in. Would you review each endpoint and update things here to match? Notable changes since we met are:

Synicix commented 3 years ago

@Synicix Pushed the last commit that will complete the resource naming changes on the pharus side in datajoint/pharus#99. Still need to clean up things, update tests, and update docs but the interface should be locked in. Would you review each endpoint and update things here to match? Notable changes since we met are:

  • Consolidated /get_table_attributes and /get_table_definition -> GET /attribute
  • Update the naming of the keys in returned objects to follow typical naming convention e.g. lowerUpperUpper

cool

guzman-raphael commented 3 years ago

@Synicix I have just pushed an update that addresses the new API design we discussed. The discussed design was:

- /version: GET=API version
- /login: POST=generate access token
- /schema: GET=list scheams, POST=create schema
  - {schemaName}: GET=verify exists and available methods, PATCH=rename schema, DELETE=drop schema
    - /table: GET=list tables, POST=create table
      - {tableName}: GET=verify exists and available methods, PATCH=rename table, DELETE=drop table
        - /attribute: GET=list parsed attributes, PATCH=alter table attributes
        - /definition: GET=get table definition
        - /record: GET=list records (paging, restriction), POST=insert many records, PATCH=update many records, DELETE=delete many records (restriction)
        - /dependency: GET=list child records (restriction)

Aside from the above, also note:

Synicix commented 3 years ago

Depends on https://github.com/datajoint/pharus/pull/100 now

Synicix commented 3 years ago

@Synicix Now merging datajoint/pharus#100, we should update the submodule ref to match.

Submodule should be updated now