Learn how to read and create mirror columns using the platform API
The mirror column shows a column value from another board through a linked item, allowing you to make changes to multiple boards simultaneously. The API allows you to read and create a mirror column. You may see some unexpected and inconsistent results if you try to set up filter rules for mirrored content.
Read a mirror column
You can query the mirror column using the column_values object, or use the MirrorValue type to return column-specific fields.
If you want to get mirrored column values, use the display_value field on the MirrorValue type. The text field will always return null.
query {
items (ids:[1234567890, 9876543210]) {
column_values {
... on MirrorValue {
display_value
id
}
}
}
}
Use thedisplay_valuefield to read mirror columnsIf you want to read values from mirrored columns, you must add the following fragment to your query:
...on MirrorValue { display_value }
Fields
| Field | Description |
|---|---|
column Column! | The column the value belongs to. |
display_value String! | The content of the mirrored column, in text format. |
id ID! | The column's unique identifier. |
mirrored_items [MirroredItem!]! | The mirrored items. |
text String | The column's long text. This field will always return null, use display_value instead. |
type ColumnType! | The column's type. |
value JSON | The column's JSON-formatted raw value. This field always returns null, use linked_items and linked_item_ids instead. |
Create a mirror column
Required scope:boards:write
The create_column mutation creates a mirror column via the API. You can specify which fields to return in the mutation response.
mutation {
create_column(
board_id: 1234567890
title: "Test Column"
column_type: mirror
defaults: {
relation_column: {
board_relation: true
}
displayed_linked_columns: [
{
board_id: "9876543210"
column_ids: ["status"]
}
]
}
) {
id
title
type
}
}{
"data": {
"create_column": {
"id": "YOUR_COLUMN_ID",
"title": "Test Column",
"type": "mirror"
}
},
"extensions": {
"request_id": "YOUR_REQUEST_ID"
}
}Arguments
You can use the following arguments to define the new column's characteristics.
Argument | Description |
|---|---|
board_id | The unique identifier of the board where the new column should be created. |
column_type | The type of column to create. |
defaults | The new column's defaults. Accepts JSON objects and JSON strings. For JSON objects, query |
description | The new column's description. |
id | The column's user-specified unique identifier. The mutation will fail if it does not meet any of the following requirements:
|
title | The new column's title. |
