Profiles#

Manage Profiles API ドラフトを作成、リスト、更新、公開/ロールバック、およびサーバーとエージェントのプロファイルの再割り当て/削除を行います。

get_profiles#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/pem/api/v16/profiles/ \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.get(https://PEM-SERVER-IP/pem/api/v16/profiles/, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/,
{
  method: GET,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /profiles/

リストプロファイル

公開されたプロファイルのみの概要リストを返します。公開されたプロファイルの下書きが存在する場合、項目にはそのプロファイルのIDが示され、 ’published’はfalseです。応答には、’target_probe_configs’または’target_alert_configs’は含まれません。

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

認証用のトークン

応答例

[
  {
    "id": 34,
    "name": "Production Agents",
    "description": "Monitoring production agents",
    "target_kind": "a",
    "active_assignments": 0,
    "published": true
  }
]

応答#

Status

Meaning

Description

Schema

200

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

成功した応答

Inline

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

anonymous

Query information ]

false

none

[リスト操作のトリミングされたプロファイル表現形式プローブ/アラート構成配列なし。

» id

integer

false

none

なし

» name

string

false

none

なし

» description

string

false

none

なし

» target_kind

string

false

none

プロファイルのターゲットタイプサーバーの場合は's'、エージェントの場合は'a'。

» published

boolean

false

none

コンビニエンスフラグ ステータスが'published'の場合にtrue。

» active_assignments

integer

false

none

このプロファイルに割り当てられたアクティブなサーバー/エージェントの数。

列挙値#

Property

Value

target_kind

s

target_kind

a

注釈

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

post_profiles#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/pem/api/v16/profiles/ \
  -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/pem/api/v16/profiles/, headers = headers)

print(r.json())
const inputBody = {
  "name": "Production Servers",
  "description": "Monitoring production database servers",
  "target_kind": "s"
};
const headers = {
  Content-Type:application/json,
  Accept:application/json,
  X-Auth-Token:string
};

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

POST /profiles/

新しいプロファイルを作成します

指定された名前必須、説明オプショナル、およびtarget_kindオプショナル、サーバーのデフォルト’s’を使用して新しいプロファイルを作成します。プローブと自動作成アラートは、target_kindに基づいて自動的に作成されます。

ボディパラメーター

{
  "name": "Production Servers",
  "description": "Monitoring production database servers",
  "target_kind": "s"
}

パラメーター#

Name

In

Type

Required

Description

X-Auth-Token

header

string

true

承認用トークン

body

body

object

false

なし

» name

body

string

true

プロフィール名 必須

» description

body

string

false

プロファイルの説明オプショナル

» target_kind

body

string

false

ターゲット種類 サーバーの場合は's'、エージェントの場合は'a'オプショナル、デフォルトは's'

列挙値#

Parameter

Value

» target_kind

s

» target_kind

a

応答例

{
  "success": 0,
  "data": "string"
}

応答#

Status

Meaning

Description

Schema

200

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

プロファイルが正常に作成されました

Inline

400

Bad Request

悪い要求-必須フィールド'name'が欠落しています

None

500

Internal Server Error

内部サーバーエラー

None

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

» success

integer

false

none

なし

» data

string

false

none

なし

注釈

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

get_profiles{profile_id}#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id} \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.get(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id},
{
  method: GET,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /profiles/{profile_id}

IDでプロフィールを取得します

完全なプローブとアラート構成を含む単一のプロファイルを結果ます。応答には、ブール値の’published’フィールドプロフィールが公開された場合にtrueが含まれます。

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

{
  "id": 0,
  "name": "string",
  "description": "string",
  "target_kind": "s",
  "published": true,
  "parent_id": 0,
  "draft_id": 0,
  "target_probe_configs": [
    {
      "probe_id": 0,
      "probe_name": "string",
      "enabled": true,
      "interval": 0,
      "lifetime": 0,
      "default_enabled": true,
      "default_interval": 0,
      "default_lifetime": 0,
      "target_type": 0,
      "force_enabled": true
    }
  ],
  "target_alert_configs": [
    {
      "id": 0,
      "alert_name": "string",
      "alert_template": 0,
      "description": "string",
      "enabled": true,
      "history_retention": 0,
      "frequency_min": 0,
      "auto_created": true,
      "template_id": "string",
      "params": [],
      "param_names": [
        "string"
      ],
      "param_types": "string",
      "params_units": [
        "string"
      ],
      "threshold_unit": "string",
      "operator": "string",
      "low_threshold_value": 0,
      "medium_threshold_value": 0,
      "high_threshold_value": 0,
      "send_email": true,
      "all_alert_enable": true,
      "email_group_id": 0,
      "low_alert_enable": true,
      "low_email_group_id": 0,
      "med_alert_enable": true,
      "med_email_group_id": 0,
      "high_alert_enable": true,
      "high_email_group_id": 0,
      "send_trap": true,
      "snmp_trap_version": 0,
      "low_send_trap": true,
      "med_send_trap": true,
      "high_send_trap": true,
      "cleared_alert_enable": true,
      "execute_script": true,
      "execute_script_on_clear": true,
      "execute_script_on_pem_server": true,
      "script_code": "string",
      "submit_to_nagios": true,
      "override_default_config": true,
      "send_notification": true,
      "low_webhook_ids": [
        0
      ],
      "med_webhook_ids": [
        0
      ],
      "high_webhook_ids": [
        0
      ],
      "cleared_webhook_ids": [
        0
      ]
    }
  ]
}

プロファイルが見つかりません

{
  "message": "Not found"
}

応答#

Status

Meaning

Description

Schema

200

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

成功した応答

Upgrading SQL Profiler

404

Not Found

プロファイルが見つかりません

Inline

レスポンススキーマ#

ステータスコード 404

Name

Type

Required

Restrictions

Description

» message

string

false

none

なし

注釈

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

put_profiles{profile_id}#

コードサンプル

#  You can also use wget

curl -X PUT https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id} \
  -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.put(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}, headers = headers)

print(r.json())
const inputBody = {
  "name": "Production Servers (v2)",
  "description": "Tightened thresholds and probe intervals.",
  "target_probe_configs": {
    "changed": [
      {
        "probe_id": 7,
        "execution_frequency": 5,
        "lifetime": 60
      },
      {
        "probe_id": 15,
        "enabled": true,
        "execution_frequency": 10,
        "lifetime": 30
      }
    ]
  },
  "target_alert_configs": {
    "changed": [
      {
        "id": 101,
        "enabled": true,
        "frequency_min": 2
      },
      {
        "id": 102,
        "operator": ">",
        "low_threshold_value": 70,
        "medium_threshold_value": 85,
        "high_threshold_value": 95
      }
    ],
    "added": [
      {
        "alert_name": "Replication Lag",
        "alert_template": 18,
        "enabled": true,
        "history_retention": 30,
        "frequency_min": 5,
        "operator": ">",
        "medium_threshold_value": 60,
        "high_threshold_value": 120
      }
    ],
    "deleted": [
      {
        "id": 103
      }
    ]
  }
};
const headers = {
  Content-Type:application/json,
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id},
{
  method: PUT,
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

PUT /profiles/{profile_id}

IDでプロフィールを更新します

‘profile_id’で指定される単一のプロファイルを更新します。メタデータには’name’/’description’を使用します。プローブの場合、 ’target_probe_configs.changed’を使用して、既存のプローブ構成のみを変更しますキーはprobe_id、 enabled?、 enabled_by_default?、execute_frequency?、lifetime?。従来の ’use_default_enabled’および’interval’も受け入れます。このエンドポイントを介したプローブの追加はサポートされていません。アラートの場合、変更/追加/削除とともに’target_alert_configs’を使用します削除は、’id’のみを持つオブジェクトを受け入れます。

ボディパラメーター

{
  "name": "Production Servers (v2)",
  "description": "Tightened thresholds and probe intervals.",
  "target_probe_configs": {
    "changed": [
      {
        "probe_id": 7,
        "execution_frequency": 5,
        "lifetime": 60
      },
      {
        "probe_id": 15,
        "enabled": true,
        "execution_frequency": 10,
        "lifetime": 30
      }
    ]
  },
  "target_alert_configs": {
    "changed": [
      {
        "id": 101,
        "enabled": true,
        "frequency_min": 2
      },
      {
        "id": 102,
        "operator": ">",
        "low_threshold_value": 70,
        "medium_threshold_value": 85,
        "high_threshold_value": 95
      }
    ],
    "added": [
      {
        "alert_name": "Replication Lag",
        "alert_template": 18,
        "enabled": true,
        "history_retention": 30,
        "frequency_min": 5,
        "operator": ">",
        "medium_threshold_value": 60,
        "high_threshold_value": 120
      }
    ],
    "deleted": [
      {
        "id": 103
      }
    ]
  }
}

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

body

body

object

true

なし

» name

body

string

false

プロファイルの新しい名前オプショナル。

» description

body

string

false

プロファイルの新しい説明/注意事項オプショナル。

» target_probe_configs

body

ProbeConfigsUpdateOnly

false

プロファイルIDで更新する場合のプローブ構成のデルタ 'changed'を使用して既存のプローブのみを変更します。このエンドポイントを介したプローブの追加はサポートされていません。

»» changed

body

Query information ]

false

変更する既存のプローブ構成probe_idで識別されます。

»»» probe_id

body

integer

true

追加/更新するプローブ識別子。

»»» enabled

body

boolean

false

プロファイルでこのプローブを有効/無効にします。

»»» enabled_by_default

body

boolean

false

プローブがデフォルトの有効化に従うかどうか。エイリアス 'use_default_enabled'が受け入れられます。

»»» execution_frequency

body

integer

false

分単位のプローブ実行頻度。エイリアス'interval'が受け入れられます。

»»» lifetime

body

integer

false

履歴の保持日数。

» target_alert_configs

body

AlertConfigsDelta

false

プロファイル内のアラート構成のデルタ。

»» changed

body

[allOf]

false

既存のアラートを変更します。

»»» id

body

integer

false

変更するアラートID。

»»» name

body

string

false

アラート名。

»»» enabled

body

boolean

false

なし

»»» history_retention

body

integer

false

なし

»»» frequency_min

body

integer

false

なし

»»» operator

body

string

false

なし

»»» low_threshold_value

body

number

false

なし

»»» medium_threshold_value

body

number

false

なし

»»» high_threshold_value

body

number

false

なし

»»» all_alert_enable

body

boolean

false

なし

»»» email_group_id

body

integer

false

なし

»»» low_alert_enable

body

boolean

false

なし

»»» low_email_group_id

body

integer

false

なし

»»» med_alert_enable

body

boolean

false

なし

»»» med_email_group_id

body

integer

false

なし

»»» high_alert_enable

body

boolean

false

なし

»»» high_email_group_id

body

integer

false

なし

»» added

body

Query information ]

false

新しいアラートを追加します。必須フィールドについては、AlertPayloadを参照してください。

»»» alert_name

body

string

false

アラートの名前。注 このプロパティは、POST要求の必須パラメーターです。

»»» alert_template

body

integer

false

アラートテンプレートのID。 IDは正の整数値である必要があります。注 このプロパティは、POST要求の必須パラメーターです。

»»» description

body

string

false

なし

»»» enabled

body

boolean

false

このアラートを有効/無効にするかどうかを定義します。注 このプロパティは、POST要求の必須パラメーターです。

»»» history_retention

body

integer

false

このアラートの履歴を保持する日数を指定します。指定できる値は1〜99999です。 注このプロパティは、POST要求の必須パラメーターです。

»»» frequency_min

body

integer

false

PEMデータベースサーバーでアラートを確認する頻度を分単位で定義します。指定できる値は1〜65534です。 注このプロパティは、POST要求の必須パラメーターです。

»»» operator

body

string

false

しきい値をチェックするための演算子を定義します。有効な文字列は>"および"<"です。注 このプロパティは、POST要求の必須パラメーターです。

»»» low_threshold_value

body

number

false

低アラートをトリガーするためのしきい値。このプロパティには、有効な整数/浮動小数点値を指定できます。注これはPOST要求の必須パラメーターです。

»»» medium_threshold_value

body

number

false

中アラートをトリガーするためのしきい値。このプロパティには、有効な整数/浮動小数点値を指定できます。注これはPOST要求の必須パラメーターです。

»»» high_threshold_value

body

number

false

高度なアラートをトリガーするためのしきい値。このプロパティには、有効な整数/浮動小数点値を指定できます。注これはPOST要求の必須パラメーターです。

»»» all_alert_enable

body

boolean

false

アラートの状態が変更されたときに、パラメーター 'email_group_id'で指定されたグループにメール通知を送信するかどうかを決定します。

»»» email_group_id

body

integer

false

アラートの状態が変更されたときに、メール通知の送信先のメールグループを定義します。

»»» low_alert_enable

body

boolean

false

アラートの状態がLOWに設定されているときに、パラメーター'low_email_group_id'で指定されたグループにメール通知を送信するかどうかを決定します。

»»» low_email_group_id

body

integer

false

アラートの状態がLOWに変更されたときにメール通知の送信先の電子メールグループを定義します。

»»» med_alert_enable

body

boolean

false

アラートの状態がMEDIUMに設定されている場合、パラメーター'medium_email_group_id'で指定されたグループにメール通知を送信するかどうかを決定します。

»»» med_email_group_id

body

integer

false

アラートの状態がMEDIUMに変更されたときにメール通知の送信先のメールグループを定義します。

»»» high_alert_enable

body

boolean

false

アラートの状態がHIGHに設定されているときに、パラメーター'high_email_group_id'で指定されたグループに電子メール通知を送信するかどうかを決定します。

»»» high_email_group_id

body

integer

false

アラートの状態がHIGHに変更されたときに電子メール通知の送信先の電子メールグループを定義します。

»»» send_trap

body

boolean

false

アラートの状態が変更されたときにSNMPトラップ通知を送信するかどうかを決定します。

»»» snmp_trap_version

body

integer

false

SNMPトラップバージョンを定義します。サポートされているSNMPトラップバージョンは1、2、または3です。

»»» low_send_trap

body

boolean

false

アラートの状態がLOWに変更されたときにSNMPトラップ通知を送信するかどうかを決定します。

»»» med_send_trap

body

boolean

false

アラートの状態がMEDIUMに変更されたときにSNMPトラップ通知を送信するかどうかを決定します。

»»» high_send_trap

body

boolean

false

アラートの状態がHIGHに変化したときにSNMPトラップ通知を送信するかどうかを決定します。

»»» cleared_alert_enable

body

boolean

false

'クリアアラート'の通知をミュートするかどうかを決定します。

»»» params

body

Query information ]

false

アラートを確認するためにアラートテンプレートが使用するパラメーター/値のペアのリスト。注 アラートテンプレートには、 allパラメーターを定義する必要があります。

»»»» paramname

body

string

false

パラメーターの名前。注このプロパティは、アラートテンプレートパラメーターリストに存在する必要があります。例

»»»» paramvalue

body

string

false

指定されたパラメーターの値

»»» execute_script

body

boolean

false

アラートの状態がLOW/MEDIUM/HIGHに変更された場合に、提供されたスクリプトを実行するかどうかを決定します。

»»» execute_script_on_clear

body

boolean

false

アラートの状態がクリアされた場合、提供されたスクリプトを実行するかどうかを決定します。

»»» execute_script_on_pem_server

body

boolean

false

提供されたスクリプトをPEMホストまたはエージェントがオブジェクトを監視しているホストで実行するかどうかを決定します。

»»» script_code

body

string

false

実行するシェルまたはバッチスクリプト。詳細については、ドキュメントをご覧ください。

»»» submit_to_nagios

body

boolean

false

アラートの状態が変更されたときに、nagiosに通知を送信するかどうかを定義します。

»»» override_default_config

body

boolean

false

デフォルトのWebhook構成をオーバーライドするかどうかを決定します。

»»» send_notification

body

boolean

false

Webhook送信通知を有効にするかどうかを決定します。

»»» low_webhook_ids

body

[integer]

false

低アラートを構成できるWebhook IDを定義します。

»»» med_webhook_ids

body

[integer]

false

中程度のアラートを構成できるWebhook IDを定義します。

»»» high_webhook_ids

body

[integer]

false

高アラートを構成できるWebhook IDを定義します。

»»» cleared_webhook_ids

body

[integer]

false

クリアされたアラートを構成できるWebhook IDを定義します。

»» deleted

body

Query information ]

false

IDごとに既存のアラートを削除します。

»»» id

body

integer

true

削除するアラート構成ID。

列挙値#

Parameter

Value

»»» operator

>

»»» operator

<

»»»» paramname

Exclude tables smaller than

»»»» paramname

mount point

»»»» paramname

Host IP Address

»»»» paramname

Time interval to monitor

»»»» paramname

Time since idle

»»»» paramname

Per CPU utilization (K%)

応答例

{
  "message": "Invalid JSON body"
}

応答#

Status

Meaning

Description

Schema

200

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

プロファイルが正常に更新されました

None

400

Bad Request

無効なJSON本文

None

レスポンススキーマ#

注釈

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

delete_profiles{profile_id}#

コードサンプル

#  You can also use wget

curl -X DELETE https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id} \
  -H X-Auth-Token: string
import requests
headers = {
  X-Auth-Token: string
}

r = requests.delete(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}, headers = headers)

print(r.json())
const headers = {
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id},
{
  method: DELETE,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /profiles/{profile_id}

プロファイルの削除

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

応答#

Status

Meaning

Description

Schema

200

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

プロファイルは正常に削除されました

None

レスポンススキーマ#

注釈

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

get_profiles{profile_id}_assigned#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/assigned \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.get(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/assigned, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/assigned,
{
  method: GET,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /profiles/{profile_id}/assigned

プロファイルに割り当てられたサーバーとエージェントを取得します

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

{
  "servers": [
    "string"
  ],
  "agents": [
    "string"
  ]
}

応答#

Status

Meaning

Description

Schema

200

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

成功した応答

Inline

レスポンススキーマ#

ステータスコード 200

Name

Type

Required

Restrictions

Description

» servers

[string]

false

none

なし

» agents

[string]

false

none

なし

注釈

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

get_profiles{profile_id}_draft#

コードサンプル

#  You can also use wget

curl -X GET https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/draft \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.get(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/draft, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/draft,
{
  method: GET,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

GET /profiles/{profile_id}/draft

プロフィールIDでドラフトを取得します

完全なプローブとアラート構成を含む、指定された公開プロファイルIDに関連付けられているドラフトプロファイルを結果ます。応答には、parent_idまたはdraft_idフィールドは含まれません。

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

{
  "id": 0,
  "name": "string",
  "description": "string",
  "target_kind": "s",
  "published": true,
  "target_probe_configs": [
    {
      "probe_id": 0,
      "probe_name": "string",
      "enabled": true,
      "interval": 0,
      "lifetime": 0,
      "default_enabled": true,
      "default_interval": 0,
      "default_lifetime": 0,
      "target_type": 0,
      "force_enabled": true
    }
  ],
  "target_alert_configs": [
    {
      "id": 0,
      "alert_name": "string",
      "alert_template": 0,
      "description": "string",
      "enabled": true,
      "history_retention": 0,
      "frequency_min": 0,
      "auto_created": true,
      "template_id": "string",
      "params": [],
      "param_names": [
        "string"
      ],
      "param_types": "string",
      "params_units": [
        "string"
      ],
      "threshold_unit": "string",
      "operator": "string",
      "low_threshold_value": 0,
      "medium_threshold_value": 0,
      "high_threshold_value": 0,
      "send_email": true,
      "all_alert_enable": true,
      "email_group_id": 0,
      "low_alert_enable": true,
      "low_email_group_id": 0,
      "med_alert_enable": true,
      "med_email_group_id": 0,
      "high_alert_enable": true,
      "high_email_group_id": 0,
      "send_trap": true,
      "snmp_trap_version": 0,
      "low_send_trap": true,
      "med_send_trap": true,
      "high_send_trap": true,
      "cleared_alert_enable": true,
      "execute_script": true,
      "execute_script_on_clear": true,
      "execute_script_on_pem_server": true,
      "script_code": "string",
      "submit_to_nagios": true,
      "override_default_config": true,
      "send_notification": true,
      "low_webhook_ids": [
        0
      ],
      "med_webhook_ids": [
        0
      ],
      "high_webhook_ids": [
        0
      ],
      "cleared_webhook_ids": [
        0
      ]
    }
  ]
}

プロファイルのドラフトが見つかりません

{
  "message": "Not found"
}

応答#

Status

Meaning

Description

Schema

200

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

成功した応答

プロフィールドラフト

404

Not Found

プロファイルのドラフトが見つかりませんでした

Inline

レスポンススキーマ#

ステータスコード 404

Name

Type

Required

Restrictions

Description

» message

string

false

none

なし

注釈

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

delete_profiles{profile_id}_rollback#

コードサンプル

#  You can also use wget

curl -X DELETE https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/rollback \
  -H X-Auth-Token: string
import requests
headers = {
  X-Auth-Token: string
}

r = requests.delete(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/rollback, headers = headers)

print(r.json())
const headers = {
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/rollback,
{
  method: DELETE,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /profiles/{profile_id}/rollback

プロファイルのロールバックドラフト

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

応答#

Status

Meaning

Description

Schema

200

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

下書きが削除されたか、使用可能なドラフトがありません

None

レスポンススキーマ#

注釈

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

post_profiles{profile_id}_publish#

コードサンプル

#  You can also use wget

curl -X POST https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/publish \
  -H Accept: application/json \
  -H X-Auth-Token: string
import requests
headers = {
  Accept: application/json,
  X-Auth-Token: string
}

r = requests.post(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/publish, headers = headers)

print(r.json())
const headers = {
  Accept:application/json,
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/publish,
{
  method: POST,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

POST /profiles/{profile_id}/publish

プロフィールを公開する

指定されたプロファイルが存在する場合、そのドラフトを公開します。ドラフトが存在しない場合、プロファイルが既に公開されていることを示すメッセージを返します。

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

{
  "message": "Not found"
}

応答#

Status

Meaning

Description

Schema

200

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

プロファイルは正常に公開されたか、既に公開されました

None

404

Not Found

プロファイルが見つかりません

Inline

レスポンススキーマ#

ステータスコード 404

Name

Type

Required

Restrictions

Description

» message

string

false

none

なし

注釈

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

delete_profiles{profile_id}_{new_profile_id}#

コードサンプル

#  You can also use wget

curl -X DELETE https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/{new_profile_id} \
  -H X-Auth-Token: string
import requests
headers = {
  X-Auth-Token: string
}

r = requests.delete(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/{new_profile_id}, headers = headers)

print(r.json())
const headers = {
  X-Auth-Token:string
};

fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/{new_profile_id},
{
  method: DELETE,

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

DELETE /profiles/{profile_id}/{new_profile_id}

プロファイルを削除し、新しいプロファイルに再割り当てします

パラメーター#

Name

In

Type

Required

Description

profile_id

path

integer

true

なし

new_profile_id

path

integer

true

なし

X-Auth-Token

header

string

true

承認用トークン

応答例

応答#

Status

Meaning

Description

Schema

200

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

プロファイルは正常に削除および再割り当てされました

None

レスポンススキーマ#

注釈

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