The Layouts APIs manage saved table layouts for CVT report tables. Layouts are scoped to the authenticated user and the specified table page. Responses can include both system-defined layouts and the current user's personal layouts.
Get Layouts
-
Description – Gets the predefined layouts and the authenticated user's personal layouts for a table.
-
Request URL –
GET /cablevalidation/report/layouts/{page} -
Path Parameters
-
page– Table identifier. See Supported Page Values.-
Type: string
-
Required: true
-
-
-
Response Content Type –
application/json -
Status Codes
-
200– OK
-
-
Response Example
[
{
"name": "Summary",
"is_predefined": true,
"is_default": false
},
{
"name": "rx_errors_debug",
"is_predefined": false,
"is_default": false
}
]
Predefined layouts are returned first. Personal layouts follow in alphabetical order.
Create Layout
-
Description – Creates a personal layout for the authenticated user and table.
-
Request URL –
POST /cablevalidation/report/layouts/{page} -
Path Parameters
-
page– Table identifier. See Supported Page Values.-
Type: string
-
Required: true
-
-
-
Request Content Type –
application/json -
Request Data
-
layout_name– Unique name for the personal layout within the table.-
Type: string
-
Required: true
-
-
columns_state– Changed column properties, keyed by column identifier. Only properties that differ from the table's initial state need to be supplied.-
Type: object
-
Required: true
-
-
-
Request Example
{
"layout_name": "rx_errors_debug",
"columns_state": {
"source_port": {
"colId": "source_port",
"width": 180,
"hide": false,
"pinned": "left",
"order": 0,
"sort": "asc",
"sortIndex": 0
}
}
}
-
Status Codes
-
201– CREATED -
400– BAD REQUEST -
409– CONFLICT; a predefined or personal layout with this name already exists -
500– INTERNAL SERVER ERROR; the layout could not be stored
-
-
Response – No response body.
Get Layout
-
Description – Gets one predefined or personal layout snapshot.
-
Request URL –
GET /cablevalidation/report/layouts/{page}/{layout_name} -
Path Parameters
-
page– Table identifier. See Supported Page Values.-
Type: string
-
Required: true
-
-
layout_name– Name of the requested layout.-
Type: string
-
Required: true
-
-
-
Response Content Type –
application/json -
Status Codes
-
200– OK -
400– BAD REQUEST; the layout name is invalid -
404– NOT FOUND -
500– INTERNAL SERVER ERROR; the stored layout is malformed
-
-
Response Example
{
"layout_name": "rx_errors_debug",
"columns_state": {
"source_port": {
"colId": "source_port",
"width": 180,
"hide": false,
"pinned": "left",
"order": 0,
"sort": "asc",
"sortIndex": 0
}
}
}
Update Layout
-
Description – Replaces the saved column state of an existing personal layout. Predefined layouts cannot be updated.
-
Request URL –
PUT /cablevalidation/report/layouts/{page}/{layout_name} -
Path Parameters
-
page– Table identifier. See Supported Page Values.-
Type: string
-
Required: true
-
-
layout_name– Name of the personal layout to update.-
Type: string
-
Required: true
-
-
-
Request Content Type –
application/json -
Request Example
{
"columns_state": {
"source_port": {
"colId": "source_port",
"width": 220,
"hide": false,
"pinned": "left",
"order": 0
}
}
}
-
Status Codes
-
200– OK -
400– BAD REQUEST -
403– FORBIDDEN; predefined layouts cannot be updated -
404– NOT FOUND -
500– INTERNAL SERVER ERROR; the layout could not be stored
-
-
Response – No response body.
Delete Layout
-
Description – Deletes a personal layout. Predefined layouts cannot be deleted.
-
Request URL –
DELETE /cablevalidation/report/layouts/{page}/{layout_name} -
Path Parameters
-
page– Table identifier. See Supported Page Values.-
Type: string
-
Required: true
-
-
layout_name– Name of the personal layout to delete.-
Type: string
-
Required: true
-
-
-
Status Codes
-
204– NO CONTENT -
400– BAD REQUEST; the layout name is invalid -
403– FORBIDDEN; predefined layouts cannot be deleted -
404– NOT FOUND
-
-
Response – No response body.
Layout Name Requirements
A layout name must:
-
Start with a letter or number.
-
Contain only letters, numbers, hyphens (
-), underscores (_), or periods (.). -
Not contain
..,/, or\.
Examples of invalid names include ../secret, secret/child, secret\child, layout..name, names containing spaces, and an empty name.
Layout Snapshot Fields
The columns_state object is sparse: it stores only changed column settings. When a layout is applied, CVT merges these settings with the table's initial column state.
Common column properties include:
|
Field |
Description |
|---|---|
|
|
Column identifier. |
|
|
Column width in pixels. |
|
|
Whether the column is hidden. |
|
|
Pinned position, such as |
|
|
Visible display order. |
|
|
Sort direction, such as |
|
|
Position in multi-column sorting. |
Last updated: