Dashboards

POST /plugins/Dantis/dashboards/create #

Create a dashboard

Creates a dashboard in a visible project. The name must be unique in the project, title is limited to 64 characters, and every definition section must contain at least one widget supported by the selected layout.

Request body required

name string required Unique project-local dashboard name; `home` is reserved.
title string Display title. Required for non-default dashboards.
project_id integer · int32 required Project that owns the dashboard.
definition object[] required Non-empty ordered sections; each section must contain at least one widget.
layout string required Section layout; widgets must support it. 1-col 2-col 4-col
widgets string[] required

Responses

  • 201 Dashboard created.
    id string required
    name string required
    {
        "id": "string",
        "name": "string"
    }
  • 400 Invalid project, dashboard ID/name, widget, filter, or dashboard definition.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 401 Authentication is required or the API token is invalid.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 403 The authenticated user lacks the required project or dashboard permission.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
cURL
curl -X POST \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  -H "Content-Type: application/json" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Dantis/dashboards/create \
  -d '{
    "name": "string",
    "title": "string",
    "project_id": 1,
    "definition": [
        {
            "layout": "1-col",
            "widgets": [
                "string"
            ]
        }
    ]
}'
Request body · application/json
{
    "name": "string",
    "title": "string",
    "project_id": 1,
    "definition": [
        {
            "layout": "1-col",
            "widgets": [
                "string"
            ]
        }
    ]
}
PATCH /plugins/Dantis/dashboards/{id} #

Update a dashboard

Updates the supplied fields of a dashboard owned by the caller. The default home dashboard may also be updated by users with project management permission. The response is the edit-page representation.

Parameters

Name In Type Description
id required path string 32-character dashboard identifier returned by the create endpoint.

Request body required

name string New project-local name; it cannot be the reserved `home` name.
title string New display title; the default dashboard always uses the project name.
definition object[]
layout string required Section layout; widgets must support it. 1-col 2-col 4-col
widgets string[] required

Responses

  • 200 Dashboard updated.
    dashboard object required
    id string required Persisted dashboard ID; generated default dashboards may use an empty or synthetic ID.
    name string required
    title string required
    project object required
    id integer required
    name string required
    owner object required
    id integer required
    name string
    real_name string
    email string
    avatar string · uri
    definition object[] required
    layout string required Section layout; widgets must support it. 1-col 2-col 4-col
    widgets string[] required
    enabled boolean required
    favorite boolean required Whether the current user favorited it; generated `home` dashboards are true.
    created_at string · date-time required
    updated_at string · date-time required
    {
        "dashboard": {
            "id": "string",
            "name": "string",
            "title": "string",
            "project": {
                "id": 1,
                "name": "string"
            },
            "owner": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "avatar": "string"
            },
            "definition": [
                {
                    "layout": "1-col",
                    "widgets": [
                        "string"
                    ]
                }
            ],
            "enabled": true,
            "favorite": true,
            "created_at": "string",
            "updated_at": "string"
        }
    }
  • 400 Invalid project, dashboard ID/name, widget, filter, or dashboard definition.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 401 Authentication is required or the API token is invalid.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 403 The authenticated user lacks the required project or dashboard permission.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 404 The dashboard or project does not exist.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
cURL
curl -X PATCH \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  -H "Content-Type: application/json" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Dantis/dashboards/value \
  -d '{
    "name": "string",
    "title": "string",
    "definition": [
        {
            "layout": "1-col",
            "widgets": [
                "string"
            ]
        }
    ]
}'
Request body · application/json
{
    "name": "string",
    "title": "string",
    "definition": [
        {
            "layout": "1-col",
            "widgets": [
                "string"
            ]
        }
    ]
}
DELETE /plugins/Dantis/dashboards/{id} #

Delete a dashboard

Deletes the dashboard and all of its favorite records. Only its owner can delete it.

Parameters

Name In Type Description
id required path string 32-character dashboard identifier returned by the create endpoint.

Responses

  • 200 Dashboard deleted; the response object is empty.
    []
  • 400 Invalid project, dashboard ID/name, widget, filter, or dashboard definition.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 401 Authentication is required or the API token is invalid.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 403 The authenticated user lacks the required project or dashboard permission.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 404 The dashboard or project does not exist.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
cURL
curl -X DELETE \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Dantis/dashboards/value
POST /plugins/Dantis/dashboards/{id}/favorite #

Favorite a dashboard

Adds the dashboard to the authenticated user's favorites; repeating the request is harmless.

Parameters

Name In Type Description
id required path string 32-character dashboard identifier returned by the create endpoint.

Responses

  • 200 Favorite added or already present.
    []
  • 400 Invalid project, dashboard ID/name, widget, filter, or dashboard definition.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 401 Authentication is required or the API token is invalid.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 403 The authenticated user lacks the required project or dashboard permission.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 404 The dashboard or project does not exist.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
cURL
curl -X POST \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Dantis/dashboards/value/favorite
DELETE /plugins/Dantis/dashboards/{id}/favorite #

Remove a dashboard from favorites

Removes the dashboard from the authenticated user's favorites; repeating the request is harmless.

Parameters

Name In Type Description
id required path string 32-character dashboard identifier returned by the create endpoint.

Responses

  • 200 Favorite removed.
    []
  • 400 Invalid project, dashboard ID/name, widget, filter, or dashboard definition.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 401 Authentication is required or the API token is invalid.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 403 The authenticated user lacks the required project or dashboard permission.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 404 The dashboard or project does not exist.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
cURL
curl -X DELETE \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Dantis/dashboards/value/favorite
PATCH /plugins/Dantis/projects/{project_id}/dashboards/{name} #

Update a dashboard by project and name

Updates a named dashboard. For the reserved home name, Dantis creates the project default dashboard when it does not yet exist; other missing dashboards return not found.

Parameters

Name In Type Description
project_id required path integer · int32 Numeric MantisBT project ID.
name required path string Dashboard name within the project. The reserved default name is `home`.

Request body required

name string New project-local name; it cannot be the reserved `home` name.
title string New display title; the default dashboard always uses the project name.
definition object[]
layout string required Section layout; widgets must support it. 1-col 2-col 4-col
widgets string[] required

Responses

  • 200 Dashboard updated or the missing default dashboard created.
    dashboard object required
    id string required Persisted dashboard ID; generated default dashboards may use an empty or synthetic ID.
    name string required
    title string required
    project object required
    id integer required
    name string required
    owner object required
    id integer required
    name string
    real_name string
    email string
    avatar string · uri
    definition object[] required
    layout string required Section layout; widgets must support it. 1-col 2-col 4-col
    widgets string[] required
    enabled boolean required
    favorite boolean required Whether the current user favorited it; generated `home` dashboards are true.
    created_at string · date-time required
    updated_at string · date-time required
    {
        "dashboard": {
            "id": "string",
            "name": "string",
            "title": "string",
            "project": {
                "id": 1,
                "name": "string"
            },
            "owner": {
                "id": 1,
                "name": "string",
                "real_name": "string",
                "email": "string",
                "avatar": "string"
            },
            "definition": [
                {
                    "layout": "1-col",
                    "widgets": [
                        "string"
                    ]
                }
            ],
            "enabled": true,
            "favorite": true,
            "created_at": "string",
            "updated_at": "string"
        }
    }
  • 400 Invalid project, dashboard ID/name, widget, filter, or dashboard definition.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 401 Authentication is required or the API token is invalid.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 403 The authenticated user lacks the required project or dashboard permission.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
  • 404 The dashboard or project does not exist.
    message string required
    code integer
    localized string
    {
        "message": "string",
        "code": 1,
        "localized": "string"
    }
cURL
curl -X PATCH \
  -H "Authorization: Bearer $MANTIS_TOKEN" \
  -H "Content-Type: application/json" \
  https://yourmantishubname.mantishub.io/api/rest/plugins/Dantis/projects/1/dashboards/value \
  -d '{
    "name": "string",
    "title": "string",
    "definition": [
        {
            "layout": "1-col",
            "widgets": [
                "string"
            ]
        }
    ]
}'
Request body · application/json
{
    "name": "string",
    "title": "string",
    "definition": [
        {
            "layout": "1-col",
            "widgets": [
                "string"
            ]
        }
    ]
}