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. You can use the API to read and create mirror columns, but you cannot filter by, update, or clear them. You may see some unexpected and inconsistent results if you try to set up filter rules for mirrored content.
Read the 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 the
display_value
field 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 also specify what fields to query back from the new column when you run the mutation.
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 ID! | The unique identifier of the board where the new column should be created. |
column_type ColumnType! | The type of column to create. |
defaults JSON | The new column's defaults. Accepts JSON objects and JSON strings. For JSON objects, query get_column_type_schema to see available properties. |
description String | The new column's description. |
id String | The column's user-specified unique identifier. The mutation will fail if it does not meet any of the following requirements: - [1-20] characters in length (inclusive) - Only lowercase letters (a-z) and underscores (_) - Must be unique (no other column on the board can have the same ID) - Can't reuse column IDs, even if the column has been deleted from the board - Can't be null, blank, or an empty string |
title String! | The new column's title. |