Use case
Online, fire-and-forget. Called by DeviceRegistrationViewModel.removeDeviceBinding (remarks=BINDING_REMOVED) when a blocked user removes the old binding, after which registration restarts; and by AppUtils.clearAppData on logout (remarks=USER_LOGOUT) when the remove-binding-on-logout config is on. The response body is not read; on logout any exception is swallowed and local data is cleared anyway.
Headers
| Header | Value | Notes |
|---|
X-SESSIONID | <session token> | Added by AuthInterceptor (data/net/AuthInterceptor.kt) when the call does not set it; on HTTP 401 or 400 the interceptor invalidates the token, fetches a new one and retries the request once. |
Parameters
| Param | In | Required | Example | Notes |
|---|
userId | path | Yes | 12345 | Bridge user id. |
remarks | query | Yes | USER_LOGOUT | BINDING_REMOVED or USER_LOGOUT. |
Request
No body. userId, remarks
Response
| Field | Type | Required | Notes |
|---|
(none) | - | | Only isSuccessful is checked (binding removal path). |
Errors
| Status | When | What the app does |
|---|
401 / 400 | Session token expired | AuthInterceptor invalidates the token, gets a fresh session id and retries the request once. |
any non-2xx | Other failures | Binding removal: Error state 'Something Went Wrong'. Logout: ignored. |
Source
- app/src/main/java/org/platformcommons/urvi/view/deviceregistration/DeviceSessionApi.kt
- app/src/main/java/org/platformcommons/urvi/view/deviceregistration/DeviceRegistrationViewModel.kt
- app/src/main/java/org/platformcommons/urvi/utility/AppUtils.kt