## v0.23.0 > [!NOTE] > You don't have to upgrade to PocketBase v0.23.0 if you are not planning further developing > your existing app and/or are satisfied with the v0.22.x features set. There are no identified critical issues > with PocketBase v0.22.x yet and in the case of critical bugs and security vulnerabilities, the fixes > will be backported for at least until Q1 of 2025 (_if not longer_). > > **If you don't plan upgrading make sure to pin the SDKs version to their latest PocketBase v0.22.x compatible:** > - JS SDK: `<0.22.0` > - Dart SDK: `<0.19.0` > [!CAUTION] > This release introduces many Go/JSVM and Web APIs breaking changes! > > Existing `pb_data` will be automatically upgraded with the start of the new executable, > but custom Go or JSVM (`pb_hooks`, `pb_migrations`) and JS/Dart SDK code will have to be migrated manually. > Please refer to the below upgrade guides: > - Go: https://pocketbase.io/v023upgrade/go/. > - JSVM: https://pocketbase.io/v023upgrade/jsvm/. > > If you had already switched to some of the earlier ` - Go: https://pocketbase.io/v023upgrade/go/. > - JSVM: https://pocketbase.io/v023upgrade/jsvm/. #### SDKs changes - [JS SDK v0.22.0](https://github.com/pocketbase/js-sdk/blob/develop/CHANGELOG.md) - [Dart SDK v0.19.0](https://github.com/pocketbase/dart-sdk/blob/develop/CHANGELOG.md) #### Web APIs changes - New `POST /api/batch` endpoint. - New `GET /api/collections/meta/scaffolds` endpoint. - New `DELETE /api/collections/{collection}/truncate` endpoint. - New `POST /api/collections/{collection}/request-otp` endpoint. - New `POST /api/collections/{collection}/auth-with-otp` endpoint. - New `POST /api/collections/{collection}/impersonate/{id}` endpoint. - ⚠️ Removed `/api/admins/*` endpoints because admins are converted to `_superusers` auth collection records. - ⚠️ Previously when uploading new files to a multiple `file` field, new files were automatically appended to the existing field values. This behaviour has changed with v0.23+ and for consistency with the other multi-valued fields when uploading new files they will replace the old ones. If you want to prepend or append new files to an existing multiple `file` field value you can use the `+` prefix or suffix: ```js "documents": [file1, file2] // => [file1_name, file2_name] "+documents": [file1, file2] // => [file1_name, file2_name, old1_name, old2_name] "documents+": [file1, file2] // => [old1_name, old2_name, file1_name, file2_name] ``` - ⚠️ Removed `GET /records/{id}/external-auths` and `DELETE /records/{id}/external-auths/{provider}` endpoints because this is now handled by sending list and delete requests to the `_externalAuths` collection. - ⚠️ Changes to the app settings model fields and response (+new options such as `trustedProxy`, `rateLimits`, `batch`, etc.). The app settings Web APIs are mostly used by the Dashboard UI and rarely by the end users, but if you want to check all settings changes please refer to the [Settings Go struct](https://github.com/pocketbase/pocketbase/blob/develop/core/settings_model.go#L121). - ⚠️ New flatten Collection model and fields structure. The Collection model Web APIs are mostly used by the Dashboard UI and rarely by the end users, but if you want to check all changes please refer to the [Collection Go struct](https://github.com/pocketbase/pocketbase/blob/develop/core/collection_model.go#L308). - ⚠️ The top level error response `code` key was renamed to `status` for consistency with the Go APIs. The error field key remains `code`: ```js { "status": 400, // <-- old: "code" "message": "Failed to create record.", "data": { "title": { "code": "validation_required", "message": "Missing required value." } } } ``` - ⚠️ New fields in the `GET /api/collections/{collection}/auth-methods` response. _The old `authProviders`, `usernamePassword`, `emailPassword` fields are still returned in the response but are considered deprecated and will be removed in the future._ ```js { "mfa": { "duration": 100, "enabled": true }, "otp": { "duration": 0, "enabled": false }, "password": { "enabled": true, "identityFields": ["email", "username"] }, "oauth2": { "enabled": true, "providers": [{"name": "gitlab", ...}, {"name": "google", ...}] }, // old fields... } ``` - ⚠️ Soft-deprecated the OAuth2 auth success `meta.avatarUrl` field in favour of `meta.avatarURL`.