Profiles#
Manage Profiles API: create, list, update, publish/rollback drafts, and reassign/delete profiles for servers and agents.
get_profiles#
Code samples
# You can also use wget
curl -X GET https://PEM-SERVER-IP/pem/api/v16/profiles/ \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Accept: application/json,
X-Auth-Token: string
}
r = requests.get(https://PEM-SERVER-IP/pem/api/v16/profiles/, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/,
{
method: GET,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /profiles/
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#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
X-Auth-Token |
header |
string |
true |
Token for authentication purpose |
Example responses
[
{
"id": 34,
"name": "Production Agents",
"description": "Monitoring production agents",
"target_kind": "a",
"active_assignments": 0,
"published": true
}
]
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful response |
Inline |
Response Schema#
Status Code 200
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
anonymous |
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#
Property |
Value |
|---|---|
target_kind |
s |
target_kind |
a |
Note
This operation does not require authentication
post_profiles#
Code samples
# You can also use wget
curl -X POST https://PEM-SERVER-IP/pem/api/v16/profiles/ \
-H Content-Type: application/json \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Content-Type: application/json,
Accept: application/json,
X-Auth-Token: string
}
r = requests.post(https://PEM-SERVER-IP/pem/api/v16/profiles/, headers = headers)
print(r.json())
const inputBody = {
"name": "Production Servers",
"description": "Monitoring production database servers",
"target_kind": "s"
};
const headers = {
Content-Type:application/json,
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/,
{
method: POST,
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /profiles/
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#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
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#
Parameter |
Value |
|---|---|
» target_kind |
s |
» target_kind |
a |
Example responses
{
"success": 0,
"data": "string"
}
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Profile created successfully |
Inline |
|
400 |
Bad request - missing required field 'name' |
None |
|
500 |
Internal server error |
None |
Response Schema#
Status Code 200
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» success |
integer |
false |
none |
none |
» data |
string |
false |
none |
none |
Note
This operation does not require authentication
get_profiles{profile_id}#
Code samples
# You can also use wget
curl -X GET https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id} \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Accept: application/json,
X-Auth-Token: string
}
r = requests.get(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id},
{
method: GET,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /profiles/{profile_id}
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#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
profile_id |
path |
integer |
true |
none |
X-Auth-Token |
header |
string |
true |
Token for authorization |
Example responses
{
"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#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful response |
||
404 |
Profile not found |
Inline |
Response Schema#
Status Code 404
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» message |
string |
false |
none |
none |
Note
This operation does not require authentication
put_profiles{profile_id}#
Code samples
# You can also use wget
curl -X PUT https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id} \
-H Content-Type: application/json \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Content-Type: application/json,
Accept: application/json,
X-Auth-Token: string
}
r = requests.put(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}, headers = headers)
print(r.json())
const inputBody = {
"name": "Production Servers (v2)",
"description": "Tightened thresholds and probe intervals.",
"target_probe_configs": {
"changed": [
{
"probe_id": 7,
"execution_frequency": 5,
"lifetime": 60
},
{
"probe_id": 15,
"enabled": true,
"execution_frequency": 10,
"lifetime": 30
}
]
},
"target_alert_configs": {
"changed": [
{
"id": 101,
"enabled": true,
"frequency_min": 2
},
{
"id": 102,
"operator": ">",
"low_threshold_value": 70,
"medium_threshold_value": 85,
"high_threshold_value": 95
}
],
"added": [
{
"alert_name": "Replication Lag",
"alert_template": 18,
"enabled": true,
"history_retention": 30,
"frequency_min": 5,
"operator": ">",
"medium_threshold_value": 60,
"high_threshold_value": 120
}
],
"deleted": [
{
"id": 103
}
]
}
};
const headers = {
Content-Type:application/json,
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id},
{
method: PUT,
body: inputBody,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
PUT /profiles/{profile_id}
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#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
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 |
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 |
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 |
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 |
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 "<". 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 |
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 |
false |
Delete existing alerts by id. |
|
»»» id |
body |
integer |
true |
Alert config id to delete. |
Enumerated Values#
Parameter |
Value |
|---|---|
»»» operator |
> |
»»» operator |
< |
»»»» paramname |
Exclude tables smaller than |
»»»» paramname |
mount point |
»»»» paramname |
Host IP Address |
»»»» paramname |
Time interval to monitor |
»»»» paramname |
Time since idle |
»»»» paramname |
Per CPU utilization (K%) |
Example responses
{
"message": "Invalid JSON body"
}
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Profile updated successfully |
None |
|
400 |
Invalid JSON body |
None |
Response Schema#
Note
This operation does not require authentication
delete_profiles{profile_id}#
Code samples
# You can also use wget
curl -X DELETE https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id} \
-H X-Auth-Token: string
import requests
headers = {
X-Auth-Token: string
}
r = requests.delete(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}, headers = headers)
print(r.json())
const headers = {
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id},
{
method: DELETE,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
DELETE /profiles/{profile_id}
Delete a profile*
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
profile_id |
path |
integer |
true |
none |
X-Auth-Token |
header |
string |
true |
Token for authorization |
Example responses
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Profile deleted successfully |
None |
Response Schema#
Note
This operation does not require authentication
get_profiles{profile_id}_assigned#
Code samples
# You can also use wget
curl -X GET https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/assigned \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Accept: application/json,
X-Auth-Token: string
}
r = requests.get(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/assigned, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/assigned,
{
method: GET,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /profiles/{profile_id}/assigned
Get servers and agents assigned to a profile*
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
profile_id |
path |
integer |
true |
none |
X-Auth-Token |
header |
string |
true |
Token for authorization |
Example responses
{
"servers": [
"string"
],
"agents": [
"string"
]
}
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful response |
Inline |
Response Schema#
Status Code 200
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» servers |
[string] |
false |
none |
none |
» agents |
[string] |
false |
none |
none |
Note
This operation does not require authentication
get_profiles{profile_id}_draft#
Code samples
# You can also use wget
curl -X GET https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/draft \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Accept: application/json,
X-Auth-Token: string
}
r = requests.get(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/draft, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/draft,
{
method: GET,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
GET /profiles/{profile_id}/draft
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#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
profile_id |
path |
integer |
true |
none |
X-Auth-Token |
header |
string |
true |
Token for authorization |
Example responses
{
"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#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Successful response |
||
404 |
Draft not found for profile |
Inline |
Response Schema#
Status Code 404
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» message |
string |
false |
none |
none |
Note
This operation does not require authentication
delete_profiles{profile_id}_rollback#
Code samples
# You can also use wget
curl -X DELETE https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/rollback \
-H X-Auth-Token: string
import requests
headers = {
X-Auth-Token: string
}
r = requests.delete(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/rollback, headers = headers)
print(r.json())
const headers = {
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/rollback,
{
method: DELETE,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
DELETE /profiles/{profile_id}/rollback
Rollback draft for a profile*
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
profile_id |
path |
integer |
true |
none |
X-Auth-Token |
header |
string |
true |
Token for authorization |
Example responses
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Draft deleted or no draft available |
None |
Response Schema#
Note
This operation does not require authentication
post_profiles{profile_id}_publish#
Code samples
# You can also use wget
curl -X POST https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/publish \
-H Accept: application/json \
-H X-Auth-Token: string
import requests
headers = {
Accept: application/json,
X-Auth-Token: string
}
r = requests.post(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/publish, headers = headers)
print(r.json())
const headers = {
Accept:application/json,
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/publish,
{
method: POST,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
POST /profiles/{profile_id}/publish
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#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
profile_id |
path |
integer |
true |
none |
X-Auth-Token |
header |
string |
true |
Token for authorization |
Example responses
{
"message": "Not found"
}
Responses#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Profile published successfully or already published |
None |
|
404 |
Profile not found |
Inline |
Response Schema#
Status Code 404
Name |
Type |
Required |
Restrictions |
Description |
|---|---|---|---|---|
» message |
string |
false |
none |
none |
Note
This operation does not require authentication
delete_profiles{profile_id}_{new_profile_id}#
Code samples
# You can also use wget
curl -X DELETE https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/{new_profile_id} \
-H X-Auth-Token: string
import requests
headers = {
X-Auth-Token: string
}
r = requests.delete(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/{new_profile_id}, headers = headers)
print(r.json())
const headers = {
X-Auth-Token:string
};
fetch(https://PEM-SERVER-IP/pem/api/v16/profiles/{profile_id}/{new_profile_id},
{
method: DELETE,
headers: headers
})
.then(function(res) {
return res.json();
}).then(function(body) {
console.log(body);
});
DELETE /profiles/{profile_id}/{new_profile_id}
Delete a profile and reassign to new profile*
Parameters#
Name |
In |
Type |
Required |
Description |
|---|---|---|---|---|
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#
Status |
Meaning |
Description |
Schema |
|---|---|---|---|
200 |
Profile deleted and reassigned successfully |
None |
Response Schema#
Note
This operation does not require authentication