Import Custom Dashboards#

post_dashboard_custom_import#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/api/v14/dashboard/custom/import/ \
  -H Content-Type: application/json \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Content-Type: application/json,
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/api/v14/dashboard/custom/import/, headers = headers)

print(r.json())
const inputBody = {
  "version": 1,
  "skip_overwrite": true,
  "skip_overwrite_probe": true,
  "skip_overwrite_chart": true,
  "dashboards": [
    {
      "name": "string",
      "descp": "string",
      "reference_id": "string",
      "font": "string",
      "font_size": 0,
      "level": 0,
      "is_ops": true,
      "show_title": true,
      "design_layout": [
        {}
      ],
      "c_charts": [
        {}
      ],
      "shared": [
        0
      ],
      "shared_all": true
    }
  ]
};
const headers = {
  Content-Type:application/json,
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/api/v14/dashboard/custom/import/,
{
  method: POST,
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /dashboard/custom/import/

エクスポートされたダッシュボードを使用して、カスタムアラートテンプレートをインポートします。

ボディパラメーター

{
  "version": 1,
  "skip_overwrite": true,
  "skip_overwrite_probe": true,
  "skip_overwrite_chart": true,
  "dashboards": [
    {
      "name": "string",
      "descp": "string",
      "reference_id": "string",
      "font": "string",
      "font_size": 0,
      "level": 0,
      "is_ops": true,
      "show_title": true,
      "design_layout": [
        {}
      ],
      "c_charts": [
        {}
      ],
      "shared": [
        0
      ],
      "shared_all": true
    }
  ]
}

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

承認トークン

body

body

CustomDashboardImportPostData

true

なし

応答例

[
  {
    "name": "string",
    "status": "string",
    "msg": "string"
  }
]

応答#

Status

Meaning

Description

Schema

200

コマンドラインからのサーバーインストーラーの呼び出し

ステータス200

Inline

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

» name

string

true

none

なし

» status

string

true

none

なし

» msg

string

true

none

なし

注釈

この操作には認証が必要ありません