LayoutService
Resolve Layout Share Token
Resolve a share token to a view-only layout template snapshot.
Method
GET
Path
/v1/share/layout/{token}
Visibility
Public endpoint
GET
/v1/share/layout/{token} Request
Testnet
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/share/layout/share_01J5EXAMPLE000000000' \ --header 'Accept: */*'
Responses
{
"layout": {
"dockviewState": "AA==",
"isDefault": false,
"layoutId": "1",
"name": "BTC Trading",
"updatedAtMs": "1",
"viewerId": "1",
"widgets": [
{
"widgetConfig": "AA==",
"widgetId": "chart-main",
"widgetType": "CHART"
}
]
},
"ownerId": "1",
"templateId": "1",
"version": 1
} token string
Opaque share token from a layout share link.
7 fields
viewerId string (fixed64)
Viewer that owns the saved layout.
Example
1 layoutId string (fixed64)
Layout identifier unique within the viewer's saved layouts.
Example
1 name string
Human-readable layout name.
Example
BTC Trading isDefault boolean
True when this is the viewer's default layout.
Example
false dockviewState string (byte)
Serialized editor panel arrangement snapshot.
Example
AA== 3 fields
widgetId string
Stable widget identifier within the layout, such as "chart-1".
Example
chart-main widgetType enum
Widget kind that determines how widget_config is decoded.
CHART ORDERBOOK TRADES POSITIONS ORDERS
Example
CHART widgetConfig string (byte)
Serialized widget configuration bytes for the selected widget_type.
Example
AA== updatedAtMs string (fixed64)
Last update time in milliseconds since epoch (UTC).
Example
1 ownerId string (fixed64)
Viewer that owns the shared template.
Example
1 templateId string (fixed64)
Template identifier referenced by the share token.
Example
1 version integer (int32)
Immutable template version referenced by the share token.
Example
1| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |