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

chore: add API v3 #2222

Merged
merged 1 commit into from
Aug 30, 2024
Merged

chore: add API v3 #2222

merged 1 commit into from
Aug 30, 2024

Conversation

Chartman123
Copy link
Collaborator

@Chartman123 Chartman123 commented Jun 22, 2024

This closes #2079

Forms

  • Get forms GET /forms[?type=owned]
  • Get shared forms GET /forms?type=shared
  • New form POST /forms
  • Get form GET /forms/:form-id:
  • [x] Get partial form GET /forms/0?hash=:form-hash:
  • Clone form POST /forms?fromId=:form-id:
  • Update form PATCH /forms/:form-id:
  • Transfer ownership - (just use patch/update)
  • Delete form DELETE /forms/:form-id:
  • Link file to form - (just use patch/update)
  • Unlink file - (just use patch/update)

Questions

  • Get questions GET /forms/:form-id:/questions
  • New question POST /forms/:form-id:/questions
  • Get question GET /forms/:form-id:/questions/:question-id:
  • Update question PATCH /forms/:form-id:/questions/:question-id:
  • Reorder questions PATCH /forms/:form-id:/questions
  • Clone question POST /forms/:form-id:/questions?fromId=:question-id:
  • Delete question DELETE /forms/:form-id:/questions/:question-id:

Options

  • Get options GET /forms/:form-id:/questions/:question-id:/options (currently not used)
  • New option(s) POST /forms/:form-id:/questions/:question-id:/options
  • Get option GET /forms/:form-id:/questions/:question-id:/options/:option-id: (currently not used)
  • Update option PATCH /forms/:form-id:/questions/:question-id:/options/:option-id:
  • Reorder options PATCH /forms/:form-id:/questions/:question-id:/options (currently not used)
  • Clone option POST /forms/:form-id:/questions/:question-id:/options?fromId=:option-id: (currently not used)
  • Delete option DELETE /forms/:form-id:/questions/:question-id:/options/:option-id:

Sharing

  • Get user's shares GET /shares (currently not used)
  • Get shares of a form GET /forms/:form-id:/shares (currently not used)
  • New share POST /forms/:form-id:/shares
  • Get share GET /forms/:form-id:/shares/:share-id: (currently not used)
  • Update share PATCH /forms/:form-id:/shares/:share-id:
  • Delete share DELETE /forms/:form-id:/shares/:id:

Submissions

  • Get submissions GET /forms/:form-id:/submissions
  • Download submissions GET /forms/:form-id:/submissions?fileFormat=:file-format:
  • New submission POST /forms/:form-id:/submissions
  • Delete submissions DELETE /forms/:form-id:/submissions
  • Get submission GET /forms/:form-id:/submissions/:submission-id: (currently not used)
  • Update submission PATCH /forms/:form-id:/submissions/:submission-id: (currently not used)
  • Delete submission DELETE /forms/:form-id:/submissions/:submission-id:
  • Export submissions to cloud POST /forms/:form-id:/submissions/export
  • Upload files POST /forms/:form-id:/submissions/files/:question-id:

Documentation

  • Adjust documentation and mark old API v2 as deprecated

@Chartman123 Chartman123 added 2. developing Work in progress technical debt Technical issue labels Jun 22, 2024
@Chartman123 Chartman123 added this to the 4.3 milestone Jun 22, 2024
Copy link

codecov bot commented Jun 22, 2024

Codecov Report

Attention: Patch coverage is 30.63512% with 557 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@2faabe0). Learn more about missing BASE report.
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2222   +/-   ##
=======================================
  Coverage        ?   36.20%           
  Complexity      ?     1004           
=======================================
  Files           ?       68           
  Lines           ?     3798           
  Branches        ?        0           
=======================================
  Hits            ?     1375           
  Misses          ?     2423           
  Partials        ?        0           

@Chartman123 Chartman123 force-pushed the feat/api_v3 branch 2 times, most recently from 7f6cfc4 to f9a7cc3 Compare June 22, 2024 20:03
@Chartman123 Chartman123 self-assigned this Jun 22, 2024
@Chartman123 Chartman123 force-pushed the feat/api_v3 branch 23 times, most recently from b52972b to 5c0d7c9 Compare June 25, 2024 21:51
@Chartman123 Chartman123 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Aug 7, 2024
@Chartman123 Chartman123 force-pushed the feat/api_v3 branch 4 times, most recently from e0ffcb2 to 82ee911 Compare August 9, 2024 21:45
@Chartman123 Chartman123 changed the title WIP: add API v3 chore: add API v3 Aug 10, 2024
appinfo/routes.php Outdated Show resolved Hide resolved
@Chartman123 Chartman123 force-pushed the feat/api_v3 branch 4 times, most recently from 81cd5d4 to 2cb1b86 Compare August 14, 2024 21:26
Copy link
Collaborator

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good! Just the documentation :)

@Chartman123 Chartman123 force-pushed the feat/api_v3 branch 3 times, most recently from fab516b to 754c8c3 Compare August 19, 2024 21:17
@Chartman123 Chartman123 force-pushed the feat/api_v3 branch 2 times, most recently from ddba1fb to 5f34943 Compare August 21, 2024 18:20
Copy link
Collaborator

@susnux susnux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Signed-off-by: Christian Hartmann <[email protected]>
@Chartman123 Chartman123 merged commit 9ab7ddc into main Aug 30, 2024
50 checks passed
@Chartman123 Chartman123 deleted the feat/api_v3 branch August 30, 2024 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews technical debt Technical issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reorganize API endpoints and deprecate current endpoints
2 participants