EDB Postgres Enterprise Manager REST APIs v2.0: Object v10.2

Object can be an pem-agent, a monitored server, or a database object (i.e. database, schema, table, index, sequence, function, view).

get__agent_

Code samples

GET /agent/

Retrieve of the pem-agent information

It returns the list of the information, and status for the pem-agents visible to the user (represented by the token).

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken for authentication purpose

Example responses

200 Response
[
  {
    "id": 0,
    "name": "string",
    "version": "string",
    "active": true,
    "heartbeat_int": 0,
    "alert_blackout": true,
    "owner": "string",
    "team": "string",
    "group": 0
  }
]

Responses

StatusMeaningDescriptionSchema
200OKReturns the list of information, and status about the pem-agents.Agent
Info

This operation does not require authentication

get__agent_{agent_id}

Code samples

GET /agent/{agent_id}

Retrieve the information for the agent, identified by the agent_id.

Parameters

NameInTypeRequiredDescription
agent_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
[
  {
    "id": 0,
    "name": "string",
    "version": "string",
    "active": true,
    "heartbeat_int": 0,
    "alert_blackout": true,
    "owner": "string",
    "team": "string",
    "group": 0
  }
]

Responses

StatusMeaningDescriptionSchema
200OKSuccessful responseAgent
Info

This operation does not require authentication

put__agent_{agent_id}

Code samples

PUT /agent/{agent_id}

Update the agent information

Body parameter

[
  {
    "id": 0,
    "name": "string",
    "version": "string",
    "active": true,
    "heartbeat_int": 0,
    "alert_blackout": true,
    "owner": "string",
    "team": "string",
    "group": 0
  }
]

Parameters

NameInTypeRequiredDescription
agent_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyAgenttruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKUpdated successfully.None

Response Schema

Info

This operation does not require authentication

delete__agent_{agent_id}

Code samples

DELETE /agent/{agent_id}

Stop mananging the agent by PEM.

Parameters

NameInTypeRequiredDescription
agent_idpathintegertruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKStatus 200None

Response Schema

Info

This operation does not require authentication

get__server_

Code samples

GET /server/

Retrieval of the managed server list

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
[
  {
    "id": 0,
    "name": "string",
    "host": "string",
    "port": 0,
    "database": "string",
    "ssl": 0,
    "serviceid": "string",
    "active": true,
    "alert_blackout": true,
    "owner": 0,
    "team": "string",
    "server_owner": "string",
    "is_remote_monitoring": true,
    "efm_cluster_name": "string",
    "efm_service_name": "string",
    "efm_installation_path": "string",
    "comment": "string",
    "username": "string",
    "gid": 0,
    "db_restriction": "string",
    "role": "string",
    "is_edb": true,
    "agent_id": 0,
    "asb_host": "string",
    "asb_port": 0,
    "asb_username": "string",
    "asb_database": "string",
    "asb_sslmode": "string",
    "asb_password": "string",
    "asb_allowtakeover": "string",
    "agent_capability_list": [
      "string"
    ],
    "agent_description": "string",
    "fgcolor": "string",
    "bgcolor": "string",
    "sslcompression": true
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[Server]falsenonenone
» idintegerfalsenoneServer id
» namestringfalsenoneServer name
» hoststringfalsenoneServer host
» portintegerfalsenoneServer port
» databasestringfalsenoneMaintenance databse
» sslintegerfalsenoneSSL mode
» serviceidstringfalsenoneServer service id
» activebooleanfalsenoneDefines whether the server is active, or not.
» alert_blackoutbooleanfalsenoneDefines whether the alerts on the server are blacked out, or not.
» ownerintegerfalsenoneID of the owner, who registered the server with PEM.
» teamstringfalsenoneDefines the role/username, who can see the server information.
» server_ownerstringfalsenoneName of the user, who registered the server on the PEM database server.
» is_remote_monitoringbooleanfalsenoneDefines whether this server is being monitored remotely (i.e. the monitoring pemAgent does not resides on the same host on the monitored server).
» efm_cluster_namestringfalsenoneCluster name of EFM
» efm_service_namestringfalsenoneService name of EFM
» efm_installation_pathstringfalsenoneInstallation Path of EFM
» commentstringfalsenoneDescription about the Server.
» usernamestringfalsenoneUsername for connecting the database server.
» gidintegerfalsenoneID of the Server group
» db_restrictionstringfalsenoneDatabase restriction SQL clause
» rolestringfalsenoneThe role the connection will use
» is_edbbooleanfalsenoneIs server an EDB Advanced Server?
» agent_idintegerfalsenoneAgent id bound to the server
» asb_hoststringfalsenonePEM database host used by agent while creating PEM connection.
» asb_portintegerfalsenonePEM database port used by agent while creating PEM connection.
» asb_usernamestringfalsenonePEM database user name used by agent while creating PEM connection.
» asb_databasestringfalsenonePEM database to which agent will connect.
» asb_sslmodestringfalsenonePEM database ssl mode.
» asb_passwordstringfalsenoneempty string.
» asb_allowtakeoverstringfalsenoneWhether server allowed to take over by another agent.
» agent_capability_list[string]falsenoneArray of capabilities the agent has
» agent_descriptionstringfalsenoneAgent description
» fgcolorstringfalsenoneForeground color of server node in browser tree
» bgcolorstringfalsenoneBackground color of server node in browser tree
» sslcompressionbooleanfalsenoneWhether data sent over ssl should be compressed or not.
Info

This operation does not require authentication

post__server_

Code samples

POST /server/

Add a new managed database server.

Body parameter

{
  "id": 0,
  "name": "string",
  "host": "string",
  "port": 0,
  "database": "string",
  "ssl": 0,
  "serviceid": "string",
  "active": true,
  "alert_blackout": true,
  "owner": 0,
  "team": "string",
  "server_owner": "string",
  "is_remote_monitoring": true,
  "efm_cluster_name": "string",
  "efm_service_name": "string",
  "efm_installation_path": "string",
  "comment": "string",
  "username": "string",
  "gid": 0,
  "db_restriction": "string",
  "role": "string",
  "is_edb": true,
  "agent_id": 0,
  "asb_host": "string",
  "asb_port": 0,
  "asb_username": "string",
  "asb_database": "string",
  "asb_sslmode": "string",
  "asb_password": "string",
  "asb_allowtakeover": "string",
  "agent_capability_list": [
    "string"
  ],
  "agent_description": "string",
  "fgcolor": "string",
  "bgcolor": "string",
  "sslcompression": true
}

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyServertruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKStatus 200None

Response Schema

Info

This operation does not require authentication

get__server_{server_id}

Code samples

GET /server/{server_id}

Retrieve the information for the server, identified by the server_id.

Parameters

NameInTypeRequiredDescription
server_idpathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "id": 0,
  "name": "string",
  "host": "string",
  "port": 0,
  "database": "string",
  "ssl": 0,
  "serviceid": "string",
  "active": true,
  "alert_blackout": true,
  "owner": 0,
  "team": "string",
  "server_owner": "string",
  "is_remote_monitoring": true,
  "efm_cluster_name": "string",
  "efm_service_name": "string",
  "efm_installation_path": "string",
  "comment": "string",
  "username": "string",
  "gid": 0,
  "db_restriction": "string",
  "role": "string",
  "is_edb": true,
  "agent_id": 0,
  "asb_host": "string",
  "asb_port": 0,
  "asb_username": "string",
  "asb_database": "string",
  "asb_sslmode": "string",
  "asb_password": "string",
  "asb_allowtakeover": "string",
  "agent_capability_list": [
    "string"
  ],
  "agent_description": "string",
  "fgcolor": "string",
  "bgcolor": "string",
  "sslcompression": true
}

Responses

StatusMeaningDescriptionSchema
200OKCreated successfullyServer
Info

This operation does not require authentication

put__server_{server_id}

Code samples

PUT /server/{server_id}

Update the server information

Body parameter

{
  "id": 0,
  "name": "string",
  "host": "string",
  "port": 0,
  "database": "string",
  "ssl": 0,
  "serviceid": "string",
  "active": true,
  "alert_blackout": true,
  "owner": 0,
  "team": "string",
  "server_owner": "string",
  "is_remote_monitoring": true,
  "efm_cluster_name": "string",
  "efm_service_name": "string",
  "efm_installation_path": "string",
  "comment": "string",
  "username": "string",
  "gid": 0,
  "db_restriction": "string",
  "role": "string",
  "is_edb": true,
  "agent_id": 0,
  "asb_host": "string",
  "asb_port": 0,
  "asb_username": "string",
  "asb_database": "string",
  "asb_sslmode": "string",
  "asb_password": "string",
  "asb_allowtakeover": "string",
  "agent_capability_list": [
    "string"
  ],
  "agent_description": "string",
  "fgcolor": "string",
  "bgcolor": "string",
  "sslcompression": true
}

Parameters

NameInTypeRequiredDescription
server_idpathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization
bodybodyServertruenone

Example responses

Responses

StatusMeaningDescriptionSchema
200OKUpdated successfully.None

Response Schema

Info

This operation does not require authentication

delete__server_{server_id}

Code samples

DELETE /server/{server_id}

Stop mananging the server by PEM.

Parameters

NameInTypeRequiredDescription
server_idpathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

Responses

StatusMeaningDescriptionSchema
200OKStatus 200None

Response Schema

Info

This operation does not require authentication

get__server_{sid}_database_

Code samples

GET /server/{sid}/database/

Retrieve the list of properties of database(s) for a managed server.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
sidpathintegertrueServer ID

Example responses

200 Response
[
  {
    "database_name": "string",
    "connections_allowed": true,
    "system_database": true,
    "recorded_time": "2019-08-24T14:15:22Z",
    "encoding": "string",
    "server_id": 0
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[Database]falsenonenone
» database_namestringfalsenoneDatabase name
» connections_allowedbooleanfalsenoneIs connection to database allowed
» system_databasebooleanfalsenoneIs database system database
» recorded_timestring(date-time)falsenoneWhen database was first detected by PEM agent
» encodingstringfalsenoneDatabase encoding
» server_idintegerfalsenoneServer id of database
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}

Code samples

GET /server/{sid}/database/{db_name}

Retrieve the properties of the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
sidpathintegertrueServer ID
db_namepathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "database_name": "string",
  "connections_allowed": true,
  "system_database": true,
  "recorded_time": "2019-08-24T14:15:22Z",
  "encoding": "string",
  "server_id": 0
}

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Database
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_

Code samples

GET /server/{sid}/database/{db_name}/schema/

Retrieve the list of properties of schema(s) for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name

Example responses

200 Response
[
  {
    "schema_name": "string",
    "database_name": "string",
    "server_id": 0,
    "recorded_time": "2019-08-24T14:15:22Z"
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[Schema]falsenonenone
» schema_namestringfalsenoneSchema name
» database_namestringfalsenoneDatabase name of schema
» server_idintegerfalsenoneServer id schmea
» recorded_timestring(date-time)falsenoneWhen schema was first detected by PEM agent
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}

Retrieve the properties of schema(s) for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "2019-08-24T14:15:22Z"
}

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Schema
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_table_

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/table/

Retrieve the list of properties of tables resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name

Example responses

200 Response
[
  {
    "table_name": "string",
    "schema_name": "string",
    "database_name": "string",
    "server_id": 0,
    "has_primary_key": true,
    "recorded_time": "string"
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[Table]falsenonenone
» table_namestringfalsenoneTable name
» schema_namestringfalsenoneschema name
» database_namestringfalsenoneDatabase name
» server_idintegerfalsenoneServer id
» has_primary_keybooleanfalsenoneWeather table has primary key
» recorded_timestringfalsenoneWhen table was first detected by PEM agent
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_table_{table_name}

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/table/{table_name}

Retrieve the properties of tables resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name
table_namepathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "table_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "has_primary_key": true,
  "recorded_time": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Table
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_index_

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/index/

Retrieve the list of properties of indexes resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name

Example responses

200 Response
[
  {
    "index_name": "string",
    "ind_keys": [
      0
    ],
    "table_name": "string",
    "schema_name": "string",
    "database_name": "string",
    "server_id": 0,
    "recorded_time": "string"
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[Index]falsenonenone
» index_namestringfalsenoneIndex name
» ind_keys[integer]falsenoneindexed column positions in table
» table_namestringfalsenoneTable name
» schema_namestringfalsenoneSchema
» database_namestringfalsenoneDatabase name
» server_idintegerfalsenoneServer id
» recorded_timestringfalsenoneWhen index was first detected by PEM agent
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_index_{index_name}

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/index/{index_name}

Retrieve the properties of indexes resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name
index_namepathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "index_name": "string",
  "ind_keys": [
    0
  ],
  "table_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Index
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_sequence_

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/sequence/

Retrieve the list of properties of sequences resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name

Example responses

200 Response
[
  {
    "sequence_name": "string",
    "schema_name": "string",
    "database_name": "string",
    "server_id": 0,
    "recorded_time": "2019-08-24T14:15:22Z"
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[Sequence]falsenonenone
» sequence_namestringfalsenoneSequence name
» schema_namestringfalsenoneSchema name
» database_namestringfalsenoneDatabase name
» server_idintegerfalsenoneServer id
» recorded_timestring(date-time)falsenoneWhen sequence was first detected by PEM agent
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_sequence_{sequence_name}

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/sequence/{sequence_name}

Retrieve the properties of sequences resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name
sequence_namepathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "sequence_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "2019-08-24T14:15:22Z"
}

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Sequence
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_view_

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/view/

Retrieve the list of properties of views resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name

Example responses

200 Response
[
  {
    "view_name": "string",
    "view_type": "string",
    "ispopulated": true,
    "view_owner": "string",
    "definition": "string",
    "tablespace_name": "string",
    "schema_name": "string",
    "database_name": "string",
    "server_id": 0,
    "recorded_time": "string"
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[View]falsenonenone
» view_namestringfalsenoneView name
» view_typestringfalsenoneView type
» ispopulatedbooleanfalsenoneIs view populated
» view_ownerstringfalsenoneView owner
» definitionstringfalsenoneView definition
» tablespace_namestringfalsenoneView tablespace
» schema_namestringfalsenoneView schema
» database_namestringfalsenoneView database
» server_idintegerfalsenoneView server id
» recorded_timestringfalsenoneWhen view was first detected by PEM agent
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_view_{view_name}

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/view/{view_name}

Retrieve the properties of views resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name
view_namepathstringtruenone
X-Auth-TokenheaderstringtrueToken of authorization

Example responses

200 Response
{
  "view_name": "string",
  "view_type": "string",
  "ispopulated": true,
  "view_owner": "string",
  "definition": "string",
  "tablespace_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "string"
}

Responses

StatusMeaningDescriptionSchema
200OKStatus 200View
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_function_

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/function/

Retrieve the list of properties of functions resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name

Example responses

200 Response
[
  {
    "function_name": "string",
    "function_type": "string",
    "return_type": "string",
    "arg_types": [
      "string"
    ],
    "function_binary": "string",
    "extension_name": "string",
    "package_name": "string",
    "schema_name": "string",
    "database_name": "string",
    "server_id": 0,
    "recorded_time": "2019-08-24T14:15:22Z"
  }
]

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Inline

Response Schema

Status Code 200

NameTypeRequiredRestrictionsDescription
anonymous[Function]falsenonenone
» function_namestringfalsenoneFunction name
» function_typestringfalsenoneFunction type
» return_typestringfalsenoneFunction return type
» arg_types[string]falsenoneFunction argument types
» function_binarystringfalsenonenone
» extension_namestringfalsenonenone
» package_namestringfalsenoneFunction package name
» schema_namestringfalsenoneFunction schema
» database_namestringfalsenoneFunction database name
» server_idintegerfalsenoneFunction server id
» recorded_timestring(date-time)falsenoneWhen function was first detected by PEM agent
Info

This operation does not require authentication

get__server_{sid}_database_{db_name}_schema_{schema_name}_function_{function_name}

Code samples

GET /server/{sid}/database/{db_name}/schema/{schema_name}/function/{function_name}

Retrieve the properties of function resides under a schema for the particular database of a managed server.

Parameters

NameInTypeRequiredDescription
X-Auth-TokenheaderstringtrueToken of authorization
sidpathintegertrueServer ID
db_namepathstringtrueDatabase name
schema_namepathstringtrueSchema name
function_namepathstringtruenone

Example responses

200 Response
{
  "function_name": "string",
  "function_type": "string",
  "return_type": "string",
  "arg_types": [
    "string"
  ],
  "function_binary": "string",
  "extension_name": "string",
  "package_name": "string",
  "schema_name": "string",
  "database_name": "string",
  "server_id": 0,
  "recorded_time": "2019-08-24T14:15:22Z"
}

Responses

StatusMeaningDescriptionSchema
200OKStatus 200Function
Info

This operation does not require authentication