/api/public/v1/sessions/{id}/renewsessions.renew
Extend your app hold by its ttl_seconds with the generation and holder_ref acquire returned; FENCED (with the reason superseded, detached, expired or session_ended) means acquire again before touching the browser.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
idpath | string (uuid) | Yes | Session id |
generationbody | integer | Yes | lease.generation from acquire (min 1, max 9007199254740991) |
holder_refbody | string | Yes | Your stable name for this holder (worker, job); renew and detach must send the same value (min length 1, max length 120) |
Examples
curl -X POST "https://browlix.com/api/public/v1/sessions/<id>/renew" \
-H "Authorization: Bearer $BROWLIX_API_KEY" \
-H "Content-Type: application/json" \
-d '{"generation":0,"holder_ref":"<holder_ref>"}'Response
200 with { data, correlation_id }.
| Field | Type | Always present | Description |
|---|---|---|---|
| data | object | Yes | |
| data.lease | object | Yes | |
| data.lease.session_id | string (uuid) | Yes | |
| data.lease.app_id | string | Yes | |
| data.lease.binding_id | string (uuid) | null | No | |
| data.lease.holder_ref | string | Yes | |
| data.lease.generation | integer | Yes | Send with renew and detach; an older generation is FENCED (min -9007199254740991, max 9007199254740991) |
| data.lease.state | "active" | "detached" | "lapsed" | "ended" | Yes | |
| data.lease.ttl_seconds | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.lease.keep_warm_seconds | integer | Yes | (min -9007199254740991, max 9007199254740991) |
| data.lease.acquired_at | string (date-time) | Yes | |
| data.lease.expires_at | string (date-time) | Yes | |
| data.lease.keep_warm_until | string (date-time) | No | |
| data.lease.ended_reason | string | No | |
| data.lifecycle | "queued" | "preflight" | "starting" | "ready" | "quiescing" | "stopping" | "closed" | "failed" | … | Yes | |
| correlation_id | string (uuid) | Yes |
Errors
| Code | HTTP | Retryable |
|---|---|---|
| UNAUTHENTICATED | 401 | No |
| FORBIDDEN | 403 | No |
| RATE_LIMITED | 429 | Yes |
| VALIDATION_FAILED | 422 | No |
| NOT_FOUND | 404 | No |
| FENCED | 409 | No |
| DEPENDENCY_UNAVAILABLE | 503 | Yes |
| UNKNOWN | 500 | No |
