Skip to content

Commit

Permalink
Move API to v2
Browse files Browse the repository at this point in the history
Signed-off-by: Jonas Rittershofer <[email protected]>
  • Loading branch information
jotoeri committed May 23, 2022
1 parent e9fe8e3 commit e65bafc
Show file tree
Hide file tree
Showing 18 changed files with 222 additions and 166 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [v3.0 0]
### Breaking
- Moving completely from API v1 to v2. With this, we fundamentally change the way how the forms sharing works, now much more flexible and closer to how it is done in server.

### Deprecated


## [v2.5.0](https://github.com/nextcloud/forms/tree/v2.5.0) (2022-04-08)

[Full Changelog](https://github.com/nextcloud/forms/compare/v2.4.0...v2.5.0)
Expand Down
40 changes: 20 additions & 20 deletions appinfo/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,47 +59,47 @@
'url' => '/api/{apiVersion}/forms',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#newForm',
'url' => '/api/{apiVersion}/form',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#getForm',
'url' => '/api/{apiVersion}/form/{id}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#cloneForm',
'url' => '/api/{apiVersion}/form/clone/{id}',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#updateForm',
'url' => '/api/{apiVersion}/form/update',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#deleteForm',
'url' => '/api/{apiVersion}/form/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
Expand All @@ -115,7 +115,7 @@
'url' => '/api/{apiVersion}/shared_forms',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],

Expand All @@ -125,31 +125,31 @@
'url' => '/api/{apiVersion}/question',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#updateQuestion',
'url' => '/api/{apiVersion}/question/update',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#reorderQuestions',
'url' => '/api/{apiVersion}/question/reorder',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#deleteQuestion',
'url' => '/api/{apiVersion}/question/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],

Expand All @@ -159,23 +159,23 @@
'url' => '/api/{apiVersion}/option',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#updateOption',
'url' => '/api/{apiVersion}/option/update',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#deleteOption',
'url' => '/api/{apiVersion}/option/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],

Expand Down Expand Up @@ -203,47 +203,47 @@
'url' => '/api/{apiVersion}/submissions/{hash}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#exportSubmissions',
'url' => '/api/{apiVersion}/submissions/export/{hash}',
'verb' => 'GET',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#exportSubmissionsToCloud',
'url' => '/api/{apiVersion}/submissions/export',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#deleteAllSubmissions',
'url' => '/api/{apiVersion}/submissions/{formId}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#insertSubmission',
'url' => '/api/{apiVersion}/submission/insert',
'verb' => 'POST',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
[
'name' => 'api#deleteSubmission',
'url' => '/api/{apiVersion}/submission/{id}',
'verb' => 'DELETE',
'requirements' => [
'apiVersion' => 'v1(\.1)?'
'apiVersion' => 'v2'
]
],
]
Expand Down
Loading

0 comments on commit e65bafc

Please sign in to comment.