Import dashboard

Prev Next
Post
/v1alpha/dashboards/import

Creates a dashboard from a template returned by Export dashboard, or replaces an existing dashboard with it. If the template refers to custom fields, SLAs, tags, or assignees that do not exist in this workspace, the import still succeeds, and the widgets that use them may show no data. Returns RESOURCE_EXHAUSTED when the workspace has reached its dashboard limit or the template has more widgets than a dashboard allows.

Security
HTTP
Type bearer
Body parameters
Expand All
object
template
object (v1alphaDashboardTemplate) Required

A dashboard exported as a portable template, ready to import into a workspace. It contains the dashboard's title, description, and widgets with their layout, and no identifiers, timestamps, creator and updater, or access list.

api_version
string

The template format version. Import dashboard accepts only versions it supports.

Exampletorq.io/v1alpha
kind
string

The kind of template. Always Dashboard.

ExampleDashboard
definition
object (v1alphaDashboardDefinition)

Contains the title, description, and widgets of an exported dashboard.

title
string

The dashboard title.

ExampleSOC overview
description
string

The dashboard description.

ExampleOpen cases by severity and assignee
widgets
Array of object

The dashboard widgets, in order. Each widget carries its full definition, including its position on the dashboard and its filters, without identifiers or timestamps. Widgets use Torq's internal dashboard format, which can change. Pass them to Import dashboard unchanged.

object
title
string

The title of the imported dashboard. If empty, the template's title is used. When creating a new dashboard, if another dashboard in the workspace already uses the title, it is numbered, as when duplicating a dashboard: "SOC overview" becomes "SOC overview 1", and "SOC overview 1" becomes "SOC overview 2".

ExampleSOC overview
description
string

The description of the imported dashboard. If empty, the template's description is used.

ExampleOpen cases by severity and assignee
conflict_mode
string

What to do with the template. The possible values are: create_new to create a new dashboard, which is the default, and override to replace the dashboard in dashboard_id. Overriding keeps the dashboard's access settings and replaces its widgets, title, and description, and every widget gets a new ID. The widgets are replaced first: if the title cannot be set, for example because another dashboard already uses it, the new widgets are kept.

Examplecreate_new
dashboard_id
string

The ID of the dashboard to override. Required when conflict_mode is override, and not allowed otherwise.

Example0f8fad5b-d9cb-469f-a165-70867728950e
owner
string

The email address of the user the new dashboard is private to, matched case-insensitively. A new dashboard is private, even if the template came from a dashboard shared with all users. To share it, call Update dashboard access afterwards. If omitted, the dashboard is private to the owner of the API key used. Required when the request is not made with an API key, such as from a workflow step. Not allowed when conflict_mode is override, or on a workspace where dashboard access control is off, where a new dashboard is visible to all users.

Exampledana@example.com
Responses
200

A successful response.

object
id
string

The ID of the created or overridden dashboard.

Example0f8fad5b-d9cb-469f-a165-70867728950e
outcome
string

What the import did. The possible values are: created, updated.

Examplecreated
url
string

A link that opens the dashboard in Torq.

Examplehttps://app.torq.io/v3/dashboards/0f8fad5b-d9cb-469f-a165-70867728950e?account=my-account
warnings
Array of string

Warnings about the import. Reserved for future use: currently always empty.

string
401

Invalid bearer token. If you receive this message more than once try creating a new Client ID/Client Secret or generating a new bearer token.

object
403

You don't have permission to access this resource.

object