Profiles
========

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

get\_\ *profiles*
-----------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/pem/api/v17/profiles/ \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   const headers = {
     Accept: "application/json",
     "X-Auth-Token": "string",
   };

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

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

``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’. Supports optional name-based filtering via
``name`` (exact match) or ``name_contains`` (substring search) query
parameters.

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  X-Auth-Token,header,string,true,Token for authentication purpose
  name,query,string,false,Filter profiles by exact name match (case-sensitive). Mutually exclusive with name_contains.
  name_contains,query,string,false,Filter profiles by substring match (case-insensitive). Mutually exclusive with name.

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

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

.. raw:: html

   </Details>

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline
  400, `Bad Request <https://tools.ietf.org/html/rfc7231#section-6.5.1>`__ ,Mutual-exclusivity violation: `name` (or analogous exact-match filter) and `name_contains` (or analogous substring filter) were both supplied in the same request. Filtering accepts only one of the pair.,Inline

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  _anonymous_,\ :ref:`Platform Compatibility <Managing monitoring settings using profiles>` ],false,none,[A trimmed profile representation for list operations (no probe/alert config arrays).]
  » id,integer,false,none,none
  » name,string,false,none,none
  » description,string,false,none,none
  » target_kind,string,false,none,"Target type for the profile: 's' for server, 'a' for agent."
  » published,boolean,false,none,Convenience flag: true when status is 'published'.
  » active_assignments,integer,false,none,Count of active servers/agents assigned to this profile.

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  target_kind,s
  target_kind,a

Status Code **400**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » success,integer,false,none,none
  » errormsg,string,false,none,none

..  Note::
   This operation does not require authentication

post\_\ *profiles*
------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/pem/api/v17/profiles/ \
     -H Content-Type: application/json \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     Accept: application/json,
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   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/v17/profiles/,
   {
     method: POST,
     body: inputBody,
     headers: headers
   })
   .then(function(res) {
       return res.json();
   }).then(function(body) {
       console.log(body);
   });

``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**

.. code:: json

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

.. _parameters-1:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  X-Auth-Token,header,string,true,Token for authorization
  body,body,object,false,none
  » name,body,string,true,Profile name (required)
  » description,body,string,false,Profile description (optional)
  » target_kind,body,string,false,"Target kind: 's' for server, 'a' for agent (optional, defaults to 's')"

.. _enumerated-values-1:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Parameter,Value
  :widths: 25,25
  :align: left
  :class: longtable

  » target_kind,s
  » target_kind,a

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

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

.. raw:: html

   </Details>

.. _responses-1:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Profile created successfully,Inline
  400, `Bad Request <https://tools.ietf.org/html/rfc7231#section-6.5.1>`__ ,Bad request - missing required field 'name',None
  500, `Internal Server Error <https://tools.ietf.org/html/rfc7231#section-6.6.1>`__ ,Internal server error,None

.. _response-schema-1:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » success,integer,false,none,none
  » data,string,false,none,none

..  Note::
   This operation does not require authentication

get\_\ *profiles*\ {profile_id}
-------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id} \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   const headers = {
     Accept: "application/json",
     "X-Auth-Token": "string",
   };

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

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

``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-2:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  profile_id,path,integer,true,none
  X-Auth-Token,header,string,true,Token for authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

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

.. code:: json

   {
     "message": "Not found"
   }

.. raw:: html

   </Details>

.. _responses-2:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`Upgrading SQL Profiler<Upgrading SQL Profiler>` 
  404, `Not Found <https://tools.ietf.org/html/rfc7231#section-6.5.4>`__ ,Profile not found,Inline

.. _response-schema-2:

Response Schema
^^^^^^^^^^^^^^^

Status Code **404**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » message,string,false,none,none

..  Note::
   This operation does not require authentication

put\_\ *profiles*\ {profile_id}
-------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X PUT https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id} \
     -H Content-Type: application/json \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     Accept: application/json,
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   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/v17/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}``

*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**

.. code:: json

   {
     "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-3:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  profile_id,path,integer,true,none
  X-Auth-Token,header,string,true,Token for authorization
  body,body,object,true,none
  » name,body,string,false,New name for the profile (optional).
  » description,body,string,false,New description/notes for the profile (optional).
  » target_probe_configs,body,:ref:`ProbeConfigsUpdateOnly<ProbeConfigsUpdateOnly>` ,false,Delta for probe configs when updating by profile id: only modify existing probes using 'changed'. Adding probes is not supported via this endpoint.
  »» changed,body,\ :ref:`Platform Compatibility <Schemas>` ],false,Existing probe configs to modify (identified by probe_id).
  »»» probe_id,body,integer,true,Probe identifier to add/update.
  »»» enabled,body,boolean,false,Enable/disable this probe in the profile.
  »»» enabled_by_default,body,boolean,false,Whether the probe follows default enablement. Alias: 'use_default_enabled' accepted.
  »»» execution_frequency,body,integer,false,Probe execution frequency in minutes. Alias: 'interval' accepted.
  »»» lifetime,body,integer,false,History retention (days).
  » target_alert_configs,body,:ref:`AlertConfigsDelta<AlertConfigsDelta>` ,false,Delta for alert configs within a profile.
  »» changed,body,[allOf],false,Modify existing alerts.
  »»» id,body,integer,false,Alert ID to modify.
  »»» name,body,string,false,Alert name.
  »»» enabled,body,boolean,false,none
  »»» history_retention,body,integer,false,none
  »»» frequency_min,body,integer,false,none
  »»» operator,body,string,false,none
  »»» low_threshold_value,body,number,false,none
  »»» medium_threshold_value,body,number,false,none
  »»» high_threshold_value,body,number,false,none
  »»» all_alert_enable,body,boolean,false,none
  »»» email_group_id,body,integer,false,none
  »»» low_alert_enable,body,boolean,false,none
  »»» low_email_group_id,body,integer,false,none
  »»» med_alert_enable,body,boolean,false,none
  »»» med_email_group_id,body,integer,false,none
  »»» high_alert_enable,body,boolean,false,none
  »»» high_email_group_id,body,integer,false,none
  »» added,body,\ :ref:`Platform Compatibility <Schemas>` ],false,Add new alerts. See AlertPayload for required fields.
  »»» alert_name,body,string,false,Name of the alert. NOTE: This property is a mandatory parameter for a POST request.
  »»» alert_template,body,integer,false,ID of the alert template. The ID must be a positive integer value. NOTE: This property is a mandatory parameter for a POST request.
  »»» description,body,string,false,none
  »»» enabled,body,boolean,false,Defines whether this alert is enabled/disabled. NOTE: This property is a mandatory parameter for a POST request.
  »»» history_retention,body,integer,false,Specifies 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_min,body,integer,false,Defines 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.
  »»» operator,body,string,false,"Defines the operator for checking threshold values. Valid string are "">"" and ""&lt;"". NOTE: This property is a mandatory parameter for the POST request."
  »»» low_threshold_value,body,number,false,Threshold 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_value,body,number,false,Threshold 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_value,body,number,false,Threshold 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_enable,body,boolean,false,Determines 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_id,body,integer,false,"Defines the email group to which email notification are sent, when the state of the alert changes."
  »»» low_alert_enable,body,boolean,false,Determines 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_id,body,integer,false,Defines the email group to which email notifications are sent when the state of the alert changes to LOW.
  »»» med_alert_enable,body,boolean,false,Determines 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_id,body,integer,false,Defines the email group to which email notifications are sent when the state of the alert changes to MEDIUM.
  »»» high_alert_enable,body,boolean,false,Determines 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_id,body,integer,false,Defines the email group to which email notification are sent when the state of the alert changes to HIGH.
  »»» send_trap,body,boolean,false,Determines whether to send an SNMP trap notification when the state of the alert changes.
  »»» snmp_trap_version,body,integer,false,"Defines the SNMP trap version. Supported SNMP trap versions are 1, 2 or 3."
  »»» low_send_trap,body,boolean,false,Determines whether to send SNMP trap notifications when the state of the alert changes to LOW.
  »»» med_send_trap,body,boolean,false,Determines whether to send SNMP trap notifications when the state of the alert changes to MEDIUM.
  »»» high_send_trap,body,boolean,false,Determines whether to send SNMP trap notifications when the state of the alert chagnes to HIGH.
  »»» cleared_alert_enable,body,boolean,false,Determines whether to mute the notification for 'clear alert'.
  »»» params,body,\ :ref:`Platform Compatibility <Schemas>` ],false,List 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.
  »»»» paramname,body,string,false,Name of the parameter. NOTE: This property must present on the alert template parameter list.Example:
  »»»» paramvalue,body,string,false,Value for the given parameter
  »»» execute_script,body,boolean,false,Determines whether to execute the provided script if the state of the alert changes to LOW/MEDIUM/HIGH.
  »»» execute_script_on_clear,body,boolean,false,Determines whether to execute the provided script if the state of the alert clears.
  »»» execute_script_on_pem_server,body,boolean,false,Determines whether to execute the provided script on the PEM host or the host where the agent is monitoring the object.
  »»» script_code,body,string,false,The shell or batch script to be executed. Please read the documentation for detailed information.
  »»» submit_to_nagios,body,boolean,false,"Defines whether to send notification to the nagios, when state of the alert is chagned."
  »»» override_default_config,body,boolean,false,Determines whether to override the default webhook configuration.
  »»» send_notification,body,boolean,false,Determines whether the webhook send notification is enabled.
  »»» low_webhook_ids,body,[integer],false,Defines webhook IDs for which low alerts can be configured.
  »»» med_webhook_ids,body,[integer],false,Defines webhook IDs for which medium alerts can be configured.
  »»» high_webhook_ids,body,[integer],false,Defines webhook IDs for which high alerts can be configured.
  »»» cleared_webhook_ids,body,[integer],false,Defines webhook IDs for which cleared alerts can be configured.
  »» deleted,body,\ :ref:`Platform Compatibility <Schemas>` ],false,Delete existing alerts by id.
  »»» id,body,integer,true,Alert config id to delete.

.. _enumerated-values-2:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Parameter,Value
  :widths: 25,25
  :align: left
  :class: longtable

  »»» operator,>
  »»» operator,&lt;
  »»»» 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%)

**Example responses**

.. raw:: html

   <Details summary="Invalid JSON body">

.. code:: json

   {
     "message": "Invalid JSON body"
   }

.. raw:: html

   </Details>

.. _responses-3:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Profile updated successfully,None
  400, `Bad Request <https://tools.ietf.org/html/rfc7231#section-6.5.1>`__ ,Invalid JSON body,None

.. _response-schema-3:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

delete\_\ *profiles*\ {profile_id}
----------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   const headers = {
     "X-Auth-Token": "string",
   };

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

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

``DELETE /profiles/{profile_id}``

*Delete a profile*

.. _parameters-4:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  profile_id,path,integer,true,none
  X-Auth-Token,header,string,true,Token for authorization

**Example responses**

.. _responses-4:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Profile deleted successfully,None

.. _response-schema-4:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

get\_\ *profiles*\ {profile_id}_assigned
----------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/assigned \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   const headers = {
     Accept: "application/json",
     "X-Auth-Token": "string",
   };

   fetch("https://PEM-SERVER-IP/pem/api/v17/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``

*Get servers and agents assigned to a profile*

.. _parameters-5:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  profile_id,path,integer,true,none
  X-Auth-Token,header,string,true,Token for authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

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

.. raw:: html

   </Details>

.. _responses-5:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,Inline

.. _response-schema-5:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » servers,[string],false,none,none
  » agents,[string],false,none,none

..  Note::
   This operation does not require authentication

get\_\ *profiles*\ {profile_id}_draft
-------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X GET https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/draft \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   const headers = {
     Accept: "application/json",
     "X-Auth-Token": "string",
   };

   fetch("https://PEM-SERVER-IP/pem/api/v17/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``

*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-6:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  profile_id,path,integer,true,none
  X-Auth-Token,header,string,true,Token for authorization

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

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

.. code:: json

   {
     "message": "Not found"
   }

.. raw:: html

   </Details>

.. _responses-6:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Successful response,:ref:`ProfileDraft<ProfileDraft>` 
  404, `Not Found <https://tools.ietf.org/html/rfc7231#section-6.5.4>`__ ,Draft not found for profile,Inline

.. _response-schema-6:

Response Schema
^^^^^^^^^^^^^^^

Status Code **404**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » message,string,false,none,none

..  Note::
   This operation does not require authentication

delete\_\ *profiles*\ {profile_id}_rollback
-------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/rollback \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   const headers = {
     "X-Auth-Token": "string",
   };

   fetch("https://PEM-SERVER-IP/pem/api/v17/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``

*Rollback draft for a profile*

.. _parameters-7:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  profile_id,path,integer,true,none
  X-Auth-Token,header,string,true,Token for authorization

**Example responses**

.. _responses-7:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Draft deleted or no draft available,None

.. _response-schema-7:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

post\_\ *profiles*\ {profile_id}_publish
----------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/publish \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Accept: application/json,
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   const headers = {
     Accept: "application/json",
     "X-Auth-Token": "string",
   };

   fetch("https://PEM-SERVER-IP/pem/api/v17/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``

*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-8:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  profile_id,path,integer,true,none
  X-Auth-Token,header,string,true,Token for authorization

**Example responses**

.. raw:: html

   <Details summary="Profile not found">

.. code:: json

   {
     "message": "Not found"
   }

.. raw:: html

   </Details>

.. _responses-8:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Profile published successfully or already published,None
  404, `Not Found <https://tools.ietf.org/html/rfc7231#section-6.5.4>`__ ,Profile not found,Inline

.. _response-schema-8:

Response Schema
^^^^^^^^^^^^^^^

Status Code **404**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » message,string,false,none,none

..  Note::
   This operation does not require authentication

post\_\ *profiles*\ {source_id}_clone
-------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/pem/api/v17/profiles/{source_id}/clone \
     -H Content-Type: application/json \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/pem/api/v17/profiles/{source_id}/clone, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = "{}";
   const headers = {
     "Content-Type": "application/json",
     Accept: "application/json",
     "X-Auth-Token": "string",
   };

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

``POST /profiles/{source_id}/clone``

*Clone an existing profile*

Creates a new published profile by copying every probe and alert
configuration from the source. The source must be a published profile;
cloning a draft is rejected with 400. The clone is independent of the
source (parent_id is NULL, status is ‘published’, no active
assignments). All notification-channel IDs (email groups, webhook IDs,
SNMP trap fields) are copied verbatim because clone happens inside one
PEM instance. Auto-created alerts are copied and remain non-deletable on
the clone. When ‘name’ is omitted, the server generates ‘Copy of ’ and
appends ’ (2)‘,’ (3)’, … until the name is unique among published
profiles.

**Body parameter**

.. code:: json

   {}

.. _parameters-9:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  source_id,path,integer,true,Id of the published profile to clone.
  X-Auth-Token,header,string,true,Token for authorization
  body,body,object,false,none
  » name,body,string,false,"Optional. Name for the clone. Must be unique among published profiles or the request returns 409. If omitted, the server generates 'Copy of <source />' with conflict-avoidance."
  » description,body,string,false,"Optional. Description for the clone. If omitted, the source's description is copied. An explicit empty string clears the description."

**Example responses**

.. raw:: html

   <Details summary="Profile cloned successfully.">

.. code:: json

   {
     "success": 1,
     "data": {
       "id": 42,
       "name": "Copy of Production Servers",
       "target_kind": "s",
       "description": "Monitoring production database servers"
     }
   }

..

   Bad request. The source is a draft (cannot be cloned), the supplied
   name is empty, the auto-generated name has been exhausted, or
   ‘name’/‘description’ is not a string.

.. code:: json

   {
     "errormsg": "Cannot clone a draft profile. Publish or rollback the draft first."
   }

..

   Source profile not found.

.. code:: json

   {
     "message": "Profile 999 does not exist."
   }

..

   409 Response

.. code:: json

   {
     "message": "string"
   }

.. raw:: html

   </Details>

.. _responses-9:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Profile cloned successfully.,Inline
  400, `Bad Request <https://tools.ietf.org/html/rfc7231#section-6.5.1>`__ ,"Bad request. The source is a draft (cannot be cloned), the supplied name is empty, the auto-generated name has been exhausted, or 'name'/'description' is not a string.",Inline
  404, `Not Found <https://tools.ietf.org/html/rfc7231#section-6.5.4>`__ ,Source profile not found.,Inline
  409,:ref:`Conflict with existing mod_wsgi<Conflict with existing mod_wsgi>` ,The user-supplied 'name' conflicts with an existing published profile.,Inline
  500, `Internal Server Error <https://tools.ietf.org/html/rfc7231#section-6.6.1>`__ ,Internal server error.,None

.. _response-schema-9:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » success,integer,false,none,none
  » data,object,false,none,none
  »» id,integer,false,none,Id of the new profile.
  »» name,string,false,none,none
  »» target_kind,string,false,none,Preserved from the source. Cannot be changed at clone time.
  »» description,string¦null,false,none,none

.. _enumerated-values-3:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  target_kind,s
  target_kind,a

Status Code **400**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » errormsg,string,false,none,none

Status Code **404**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » message,string,false,none,none

Status Code **409**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » message,string,false,none,none

..  Note::
   This operation does not require authentication

delete\_\ *profiles*\ {profile_id}\_{new_profile_id}
----------------------------------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X DELETE https://PEM-SERVER-IP/pem/api/v17/profiles/{profile_id}/{new_profile_id} \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     X-Auth-Token: string
   }

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

   print(r.json())

.. code:: javascript

   const headers = {
     "X-Auth-Token": "string",
   };

   fetch(
     "https://PEM-SERVER-IP/pem/api/v17/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}``

*Delete a profile and reassign to new profile*

.. _parameters-10:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  profile_id,path,integer,true,none
  new_profile_id,path,integer,true,none
  X-Auth-Token,header,string,true,Token for authorization

**Example responses**

.. _responses-10:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Profile deleted and reassigned successfully,None

.. _response-schema-10:

Response Schema
^^^^^^^^^^^^^^^

..  Note::
   This operation does not require authentication

post\_\ *profile_export*
------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/pem/api/v17/profile/export/ \
     -H Content-Type: application/json \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/pem/api/v17/profile/export/, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "profiles": [
       0
     ]
   };
   const headers = {
     Content-Type:application/json,
     Accept:application/json,
     X-Auth-Token:string
   };

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

``POST /profile/export/``

*Export profiles to a JSON bundle*

Returns the requested profiles serialised as a ``.pemprf`` JSON bundle.
Selecting a draft transparently resolves to its published parent. All
email / SNMP / webhook / Nagios channel configuration is stripped on
export — routing IDs (``email_group_id`` , ``*_email_group_id`` ,
``*_webhook_ids`` , ``snmp_trap_version`` , ``*_send_trap`` ) and enable
flags (``send_email`` , ``send_trap`` , ``submit_to_nagios`` ,
``cleared_alert_enable`` , ``send_notification`` ,
``override_default_config`` ) — the recipient instance opts in
per-channel via the UI post-import. Script execution (``execute_script``
, ``execute_script_on_clear`` , ``execute_script_on_pem_server`` , and
the ``script_code`` body) IS preserved; treat ``.pemprf`` files as
sensitive because ``script_code`` may contain credentials or
env-specific paths.

**Body parameter**

.. code:: json

   {
     "profiles": [0]
   }

.. _parameters-11:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  X-Auth-Token,header,string,true,Token for authorization
  body,body,object,true,none
  » profiles,body,[integer],true,Profile IDs to export.

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "version": 0,
     "profiles": [{}]
   }

.. raw:: html

   </Details>

.. _responses-11:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Export bundle (application/json).,Inline
  400, `Bad Request <https://tools.ietf.org/html/rfc7231#section-6.5.1>`__ ,"No profiles to export, profile id not found, orphan draft, or resolved profile is not published.",None
  401, `Unauthorized <https://tools.ietf.org/html/rfc7235#section-3.1>`__ ,User lacks `pem_manage_profile` role.,None

.. _response-schema-11:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » version,integer,false,none,Export file format version.
  » profiles,[object],false,none,none

..  Note::
   This operation does not require authentication

post\_\ *profile_import*
------------------------

**Code samples**

.. code:: shell


   #  You can also use wget

   curl -X POST https://PEM-SERVER-IP/pem/api/v17/profile/import/ \
     -H Content-Type: application/json \
     -H Accept: application/json \
     -H X-Auth-Token: string

.. code:: python

   import requests
   headers = {
     Content-Type: application/json,
     Accept: application/json,
     X-Auth-Token: string
   }

   r = requests.post(https://PEM-SERVER-IP/pem/api/v17/profile/import/, headers = headers)

   print(r.json())

.. code:: javascript

   const inputBody = {
     "version": 0,
     "profiles": [
       {}
     ],
     "skip_overwrite": true
   };
   const headers = {
     Content-Type:application/json,
     Accept:application/json,
     X-Auth-Token:string
   };

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

``POST /profile/import/``

*Import previously exported profiles*

Each profile in the file is processed independently. New names land as
published; name conflicts default to ``Skipped`` (skip_overwrite=true)
or replace the existing profile’s configs as a DRAFT
(skip_overwrite=false) — the user clicks Apply in the UI to publish. The
response carries one result per profile: status is ``Success`` ,
``Skipped`` , or ``Failed`` , with ``msg`` describing partial-skip
details (missing probe/template references).

**Body parameter**

.. code:: json

   {
     "version": 0,
     "profiles": [{}],
     "skip_overwrite": true
   }

.. _parameters-12:

Parameters
^^^^^^^^^^

.. csv-table::
  :header: Name,In,Type,Required,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  X-Auth-Token,header,string,true,Token for authorization
  body,body,object,true,none
  » version,body,integer,true,Export file format version. Must be supported by the target server.
  » profiles,body,[object],true,none
  » skip_overwrite,body,boolean,true,"When true, name conflicts produce `Skipped`. When false, the importer creates a draft on the existing profile (review and Apply to publish)."

**Example responses**

.. raw:: html

   <Details summary="200 Response">

.. code:: json

   {
     "success": 0,
     "result": [
       {
         "name": "string",
         "status": "Success",
         "msg": "string"
       }
     ]
   }

.. raw:: html

   </Details>

.. _responses-12:

Responses
^^^^^^^^^

.. csv-table::
  :header: Status,Meaning,Description,Schema
  :widths: 15,12,12,20
  :align: left
  :class: longtable

  200,:ref:`Invoking the server installer from the command line<Invoking the server installer from the command line>` ,Per-profile import results.,Inline
  400, `Bad Request <https://tools.ietf.org/html/rfc7231#section-6.5.1>`__ ,"Malformed payload, missing skip_overwrite, or unsupported version.",None
  401, `Unauthorized <https://tools.ietf.org/html/rfc7235#section-3.1>`__ ,User lacks `pem_manage_profile` role.,None

.. _response-schema-12:

Response Schema
^^^^^^^^^^^^^^^

Status Code **200**

.. csv-table::
  :header: Name,Type,Required,Restrictions,Description
  :widths: 12,8,8,8,12
  :align: left
  :class: longtable

  » success,integer,false,none,none
  » result,[object],false,none,none
  »» name,string,false,none,none
  »» status,string,false,none,none
  »» msg,string¦null,false,none,none

.. _enumerated-values-4:

Enumerated Values
'''''''''''''''''

.. csv-table::
  :header: Property,Value
  :widths: 25,25
  :align: left
  :class: longtable

  status,Success
  status,Skipped
  status,Failed

..  Note::
   This operation does not require authentication
