EDB Postgres Enterprise Manager REST APIs v8.0: Import Custom Charts v10.2

post__chart_custom_import_

Code samples

# You can also use wget
curl -X POST https://PEM-SERVER-IP/api/v8/chart/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/v8/chart/custom/import/', headers = headers)
print(r.json())
const inputBody = '{
 "version": 1,
 "skip_overwrite": true,
 "skip_overwrite_probe": true,
 "charts": [
 {
 "chart_title": "string",
 "chart_type": "string",
 "chart_category": "string",
 "chart_description": "string",
 "reference_id": "string",
 "chart_level": 0,
 "chart_line_ext": [
 0
 ],
 "chart_line_ext_metric": "string",
 "chart_line_ext_metric_options": [
 0
 ],
 "chart_line_ext_opt": "string",
 "chart_line_ext_val": "string",
 "chart_line_extrapolated_type": "string",
 "chart_line_points": 0,
 "chart_line_span": [
 0
 ],
 "chart_refresh": 0,
 "espan": 0,
 "line_span": 0,
 "sel_metrics_L": [
 {}
 ],
 "sel_metrics_T": [
 {}
 ],
 "sel_metrics_C": [
 {}
 ],
 "shared": [
 0
 ],
 "shared_all": true
 }
 ]
}';
const headers = {
 'Content-Type':'application/json',
 'Accept':'application/json',
 'X-Auth-Token':'string'
};
fetch('https://PEM-SERVER-IP/api/v8/chart/custom/import/',
{
 method: 'POST',
 body: inputBody,
 headers: headers
})
.then(function(res) {
 return res.json();
}).then(function(body) {
 console.log(body);
});

POST /chart/custom/import/

Imports custom alert templates using exported charts.

Body parameter

{
 "version": 1,
 "skip_overwrite": true,
 "skip_overwrite_probe": true,
 "charts": [
 {
 "chart_title": "string",
 "chart_type": "string",
 "chart_category": "string",
 "chart_description": "string",
 "reference_id": "string",
 "chart_level": 0,
 "chart_line_ext": [
 0
 ],
 "chart_line_ext_metric": "string",
 "chart_line_ext_metric_options": [
 0
 ],
 "chart_line_ext_opt": "string",
 "chart_line_ext_val": "string",
 "chart_line_extrapolated_type": "string",
 "chart_line_points": 0,
 "chart_line_span": [
 0
 ],
 "chart_refresh": 0,
 "espan": 0,
 "line_span": 0,
 "sel_metrics_L": [
 {}
 ],
 "sel_metrics_T": [
 {}
 ],
 "sel_metrics_C": [
 {}
 ],
 "shared": [
 0
 ],
 "shared_all": true
 }
 ]
}

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyCustomChartImportPostData truenone

Example responses

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

Responses

StatusMeaningDescriptionSchema
200OK Status 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» namestringtruenonenone
» statusstringtruenonenone
» msgstringtruenonenone
Info

This operation does not require authentication