This document lists discrepancies between the Kotlin SDK documentation and the actual implementation.
Documented but missing:
pb.collections.setListRule(collectionIdOrName, rule)pb.collections.setViewRule(collectionIdOrName, rule)pb.collections.setCreateRule(collectionIdOrName, rule)pb.collections.setUpdateRule(collectionIdOrName, rule)pb.collections.setDeleteRule(collectionIdOrName, rule)pb.collections.setRules(collectionIdOrName, rules)pb.collections.getRules(collectionIdOrName)pb.collections.setManageRule(collectionIdOrName, rule)pb.collections.setAuthRule(collectionIdOrName, rule)
Actual Implementation:
Rules must be set via collection update using pb.collections.update():
val collection = pb.collections.getOne("articles")
val updated = pb.collections.update("articles", body = mapOf(
"listRule" to "@request.auth.id != ''",
"viewRule" to "@request.auth.id != ''",
// etc.
))Backend Support: Rules are stored as part of the collection model and can be updated via PATCH /api/collections/{collection}.
Documented but missing:
pb.collections.addIndex(collectionIdOrName, columns, unique, indexName)pb.collections.removeIndex(collectionIdOrName, columns)pb.collections.getIndexes(collectionIdOrName)
Actual Implementation:
Indexes must be managed via collection update using pb.collections.update():
val collection = pb.collections.getOne("articles")
val indexes = (collection["indexes"] as? JsonArray)?.toMutableList() ?: mutableListOf()
indexes.add("CREATE INDEX idx_title ON articles(title)")
val updated = pb.collections.update("articles", body = mapOf(
"indexes" to indexes
))Backend Support: Indexes are stored as part of the collection model and can be updated via PATCH /api/collections/{collection}.
Documented but missing:
pb.collection("users").listExternalAuths(recordId)pb.collection("users").unlinkExternalAuth(recordId, provider)
Backend Support: Need to verify if these endpoints exist in the Go backend. They may need to be implemented or the documentation should be removed.
Documentation shows:
val schemas = pb.collections.getSchemas()Actual Implementation:
val schemas = pb.collections.getAllSchemas()The method is named getAllSchemas(), not getSchemas().
Documentation shows:
pb.collection("users").confirmPasswordReset(
resetToken = "token_from_email",
newPassword = "new_password",
newPasswordConfirm = "new_password"
)Actual Implementation:
fun confirmPasswordReset(
token: String,
password: String,
passwordConfirm: String,
...
)The parameter is token, not resetToken.
Documentation shows:
pb.collection("users").confirmVerification(
verificationToken = "token_from_email"
)Actual Implementation:
fun confirmVerification(
token: String,
...
)The parameter is token, not verificationToken.
Documentation shows:
pb.collection("users").confirmEmailChange(
emailChangeToken = "token_from_email",
userPassword = "current_password"
)Actual Implementation:
fun confirmEmailChange(
token: String,
password: String? = null,
...
)The parameters are token and optional password, not emailChangeToken and userPassword.
Documentation shows:
val oauthData = pb.collection("users").authWithOAuth2(
provider = "google",
urlCallback = "myapp://oauth-callback"
)
// Redirect user to oauthData["authURL"]Actual Implementation:
fun authWithOAuth2(
provider: String,
urlCallback: (String) -> Unit, // Function, not string
...
): JsonObjectThe urlCallback parameter is a function that receives the OAuth URL, not a string URL to return. The method is synchronous and uses realtime subscriptions.
Documentation may reference: authWithOTP but implementation uses authWithOtp (lowercase 'p' in 'otp').
Actual Implementation:
fun authWithOtp(
otpId: String,
otp: String,
...
)- Remove or update API Rules Management section in COLLECTIONS.md to reflect that rules must be set via collection update
- Remove or update Index Management section in COLLECTIONS.md to reflect that indexes must be managed via collection update
- Fix method name
getSchemas()→getAllSchemas()in SCHEMA_QUERY_API.md - Fix parameter names in AUTHENTICATION.md for
confirmPasswordReset,confirmVerification, andconfirmEmailChange - Fix
authWithOAuth2documentation to show it uses a callback function, not a return value - Verify and fix/remove
listExternalAuthsandunlinkExternalAuthdocumentation
- ✅ Authentication methods (password, OTP, OAuth2, refresh)
- ✅ CRUD operations (getList, getOne, create, update, delete)
- ✅ Collection management (create, update, delete, truncate)
- ✅ Field management (addField, updateField, removeField, getField)
- ✅ Schema query (getSchema, getAllSchemas)
- ✅ Vector API operations
- ✅ LLM Documents API operations
- ✅ File uploads
- ✅ Realtime subscriptions
- ✅ Backups, Crons, Logs, Cache, Health APIs