EDB Postgres Enterprise Manager REST APIs v16.0: Profiles v10.4

Manage Profiles API: create, list, update, publish/rollback drafts, and reassign/delete profiles for servers and agents.

get__profiles_

Code samples

GET /profiles/

List profiles

Returns a summary list of published profiles only. If a draft exists for a published profile, the item shows that profile's ID and 'published' is false. The response does not include 'target_probe_configs' or 'target_alert_configs'.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken for authentication purpose

Example responses

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

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[ProfileSummary]falsenone[A trimmed profile representation for list operations (no probe/alert config arrays).]
» idintegerfalsenonenone
» namestringfalsenonenone
» descriptionstringfalsenonenone
» target_kindstringfalsenoneTarget type for the profile: 's' for server, 'a' for agent.
» publishedbooleanfalsenoneConvenience flag: true when status is 'published'.
» active_assignmentsintegerfalsenoneCount of active servers/agents assigned to this profile.
Enumerated Values
PropertyValue
target_kinds
target_kinda
Info

This operation does not require authentication

post__profiles_

Code samples

POST /profiles/

Create a new profile

Creates a new profile with the specified name (required), description (optional), and target_kind (optional, defaults to 's' for server). Probes and auto-created alerts will be automatically created based on target_kind.

Body parameter

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

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken for authorization
bodybodyobjectfalsenone
» namebodystringtrueProfile name (required)
» descriptionbodystringfalseProfile description (optional)
» target_kindbodystringfalseTarget kind: 's' for server, 'a' for agent (optional, defaults to 's')
Enumerated Values
ParameterValue
» target_kinds
» target_kinda

Example responses

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

Responses

StatusMeaningDescriptionSchema
200OKProfile created successfullyInline
400Bad RequestBad request - missing required field 'name'None
500Internal Server ErrorInternal server errorNone

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» successintegerfalsenonenone
» datastringfalsenonenone
Info

This operation does not require authentication

get__profiles_{profile_id}

Code samples

GET /profiles/{profile_id}

Get a profile by id

Returns a single profile with full probe and alert configurations. The response includes a boolean 'published' field (true when the profile is published).

Parameters

NameInTypeRequiredDescription
profile_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken for authorization

Example responses

200 Response
{
  "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
      ]
    }
  ]
}

Profile not found

{
  "message": "Not found"
}

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseProfile
404Not FoundProfile not foundInline

Response Schema

Status Code 404

NameTypeRequiredRestrictionsDescription
» messagestringfalsenonenone
Info

This operation does not require authentication

put__profiles_{profile_id}

Code samples

PUT /profiles/{profile_id}

Update a profile by id

Update a single profile identified by 'profile_id'. Use 'name'/'description' for metadata. For probes, use 'target_probe_configs.changed' to modify existing probe configs only (keys: probe_id, enabled?, enabled_by_default?, execution_frequency?, lifetime?; also accepts legacy 'use_default_enabled' and 'interval'). Adding probes via this endpoint is not supported. For alerts, use 'target_alert_configs' with changed/added/deleted (deleted accepts objects with only 'id').

Body parameter

{
  "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
      }
    ]
  }
}

Parameters

NameInTypeRequiredDescription
profile_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken for authorization
bodybodyobjecttruenone
» namebodystringfalseNew name for the profile (optional).
» descriptionbodystringfalseNew description/notes for the profile (optional).
» target_probe_configsbodyProbeConfigsUpdateOnlyfalseDelta for probe configs when updating by profile id: only modify existing probes using 'changed'. Adding probes is not supported via this endpoint.
»» changedbody[ProbeConfigUpsert]falseExisting probe configs to modify (identified by probe_id).
»»» probe_idbodyintegertrueProbe identifier to add/update.
»»» enabledbodybooleanfalseEnable/disable this probe in the profile.
»»» enabled_by_defaultbodybooleanfalseWhether the probe follows default enablement. Alias: 'use_default_enabled' accepted.
»»» execution_frequencybodyintegerfalseProbe execution frequency in minutes. Alias: 'interval' accepted.
»»» lifetimebodyintegerfalseHistory retention (days).
» target_alert_configsbodyAlertConfigsDeltafalseDelta for alert configs within a profile.
»» changedbody[allOf]falseModify existing alerts.
»»» idbodyintegerfalseAlert ID to modify.
»»» namebodystringfalseAlert name.
»»» enabledbodybooleanfalsenone
»»» history_retentionbodyintegerfalsenone
»»» frequency_minbodyintegerfalsenone
»»» operatorbodystringfalsenone
»»» low_threshold_valuebodynumberfalsenone
»»» medium_threshold_valuebodynumberfalsenone
»»» high_threshold_valuebodynumberfalsenone
»»» all_alert_enablebodybooleanfalsenone
»»» email_group_idbodyintegerfalsenone
»»» low_alert_enablebodybooleanfalsenone
»»» low_email_group_idbodyintegerfalsenone
»»» med_alert_enablebodybooleanfalsenone
»»» med_email_group_idbodyintegerfalsenone
»»» high_alert_enablebodybooleanfalsenone
»»» high_email_group_idbodyintegerfalsenone
»» addedbody[AlertPayload]falseAdd new alerts. See AlertPayload for required fields.
»»» alert_namebodystringfalseName of the alert. NOTE: This property is a mandatory parameter for a POST request.
»»» alert_templatebodyintegerfalseID of the alert template. The ID must be a positive integer value. NOTE: This property is a mandatory parameter for a POST request.
»»» descriptionbodystringfalsenone
»»» enabledbodybooleanfalseDefines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
»»» history_retentionbodyintegerfalseSpecifies how many days to keep the history of this alert. Possible values are from 1 to 99999. NOTE: This property is a mandatory parameter for a POST request.
»»» frequency_minbodyintegerfalseDefines how frequently (in minutes) the alert must be checked on PEM database server. Possible values are 1 to 65534. NOTE: This property is a mandatory parameter for a POST request.
»»» operatorbodystringfalseDefines the operator for checking threshold values. Valid string are ">" and "<". NOTE: This property is a mandatory parameter for the POST request.
»»» low_threshold_valuebodynumberfalseThreshold value for triggering the low alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for a POST request.
»»» medium_threshold_valuebodynumberfalseThreshold value for triggering the medium alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for a POST request.
»»» high_threshold_valuebodynumberfalseThreshold value for triggering the high alert. This property can be any valid integer/float value. NOTE: It is a mandatory parameter for a POST request.
»»» all_alert_enablebodybooleanfalseDetermines whether to send an email notification to the group specified by the parameter 'email_group_id' when the state of the alert changes.
»»» email_group_idbodyintegerfalseDefines the email group to which email notification are sent, when the state of the alert changes.
»»» low_alert_enablebodybooleanfalseDetermines whether to send an email notification to the group specified by the parameter 'low_email_group_id' when the state of the alert is set to LOW.
»»» low_email_group_idbodyintegerfalseDefines the email group to which email notifications are sent when the state of the alert changes to LOW.
»»» med_alert_enablebodybooleanfalseDetermines whether to send an email notification to the group specified by the parameter 'medium_email_group_id' when the state of the alert is set to MEDIUM.
»»» med_email_group_idbodyintegerfalseDefines the email group to which email notifications are sent when the state of the alert changes to MEDIUM.
»»» high_alert_enablebodybooleanfalseDetermines whether to send an email notification to the group specified by the parameter 'high_email_group_id' when the state of the alert is set to HIGH.
»»» high_email_group_idbodyintegerfalseDefines the email group to which email notification are sent when the state of the alert changes to HIGH.
»»» send_trapbodybooleanfalseDetermines whether to send an SNMP trap notification when the state of the alert changes.
»»» snmp_trap_versionbodyintegerfalseDefines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3.
»»» low_send_trapbodybooleanfalseDetermines whether to send SNMP trap notifications when the state of the alert changes to LOW.
»»» med_send_trapbodybooleanfalseDetermines whether to send SNMP trap notifications when the state of the alert changes to MEDIUM.
»»» high_send_trapbodybooleanfalseDetermines whether to send SNMP trap notifications when the state of the alert chagnes to HIGH.
»»» cleared_alert_enablebodybooleanfalseDetermines whether to mute the notification for 'clear alert'.
»»» paramsbody[AlertParams]falseList of parameter/value pairs to be used by the alert template for checking alerts. NOTE: The alert template requires the all parameter to be defined.
»»»» paramnamebodystringfalseName of the parameter. NOTE: This property must present on the alert template parameter list.Example:
»»»» paramvaluebodystringfalseValue for the given parameter
»»» execute_scriptbodybooleanfalseDetermines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
»»» execute_script_on_clearbodybooleanfalseDetermines whether to execute the provided script if the state of the alert clears.
»»» execute_script_on_pem_serverbodybooleanfalseDetermines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
»»» script_codebodystringfalseThe shell or batch script to be executed. Please read the documentation for detailed information.
»»» submit_to_nagiosbodybooleanfalseDefines whether to send notification to the nagios, when state of the alert is chagned.
»»» override_default_configbodybooleanfalseDetermines whether to override the default webhook configuration.
»»» send_notificationbodybooleanfalseDetermines whether the webhook send notification is enabled.
»»» low_webhook_idsbody[integer]falseDefines webhook IDs for which low alerts can be configured.
»»» med_webhook_idsbody[integer]falseDefines webhook IDs for which medium alerts can be configured.
»»» high_webhook_idsbody[integer]falseDefines webhook IDs for which high alerts can be configured.
»»» cleared_webhook_idsbody[integer]falseDefines webhook IDs for which cleared alerts can be configured.
»» deletedbody[AlertDeleteRef]falseDelete existing alerts by id.
»»» idbodyintegertrueAlert config id to delete.
Enumerated Values
ParameterValue
»»» operator>
»»» operator<
»»»» paramnameExclude tables smaller than
»»»» paramnamemount point
»»»» paramnameHost IP Address
»»»» paramnameTime interval to monitor
»»»» paramnameTime since idle
»»»» paramnamePer CPU utilization (K%)

Example responses

Invalid JSON body
{
  "message": "Invalid JSON body"
}

Responses

StatusMeaningDescriptionSchema
200OKProfile updated successfullyNone
400Bad RequestInvalid JSON bodyNone

Response Schema

Info

This operation does not require authentication

delete__profiles_{profile_id}

Code samples

DELETE /profiles/{profile_id}

Delete a profile

Parameters

NameInTypeRequiredDescription
profile_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken for authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKProfile deleted successfullyNone

Response Schema

Info

This operation does not require authentication

get__profiles_{profile_id}_assigned

Code samples

GET /profiles/{profile_id}/assigned

Get servers and agents assigned to a profile

Parameters

NameInTypeRequiredDescription
profile_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken for authorization

Example responses

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

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseInline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
» servers[string]falsenonenone
» agents[string]falsenonenone
Info

This operation does not require authentication

get__profiles_{profile_id}_draft

Code samples

GET /profiles/{profile_id}/draft

Get a draft by profile id

Returns the draft profile associated with the given published profile id, including full probe and alert configurations. The response does not include parent_id or draft_id fields.

Parameters

NameInTypeRequiredDescription
profile_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken for authorization

Example responses

200 Response
{
  "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
      ]
    }
  ]
}

Draft not found for profile

{
  "message": "Not found"
}

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseProfileDraft
404Not FoundDraft not found for profileInline

Response Schema

Status Code 404

NameTypeRequiredRestrictionsDescription
» messagestringfalsenonenone
Info

This operation does not require authentication

delete__profiles_{profile_id}_rollback

Code samples

DELETE /profiles/{profile_id}/rollback

Rollback draft for a profile

Parameters

NameInTypeRequiredDescription
profile_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken for authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKDraft deleted or no draft availableNone

Response Schema

Info

This operation does not require authentication

post__profiles_{profile_id}_publish

Code samples

POST /profiles/{profile_id}/publish

Publish a profile

Publishes the draft for the given profile if present. Returns a message indicating the profile is already published when no draft exists.

Parameters

NameInTypeRequiredDescription
profile_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken for authorization

Example responses

Profile not found
{
  "message": "Not found"
}

Responses

StatusMeaningDescriptionSchema
200OKProfile published successfully or already publishedNone
404Not FoundProfile not foundInline

Response Schema

Status Code 404

NameTypeRequiredRestrictionsDescription
» messagestringfalsenonenone
Info

This operation does not require authentication

delete__profiles_{profile_id}_{new_profile_id}

Code samples

DELETE /profiles/{profile_id}/{new_profile_id}

Delete a profile and reassign to new profile

Parameters

NameInTypeRequiredDescription
profile_idpathintegertruenone
new_profile_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken for authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKProfile deleted and reassigned successfullyNone

Response Schema

Info

This operation does not require authentication