Contents
On this page

Delete View - Plugixa Activity Log

DELETE /plugixa-activity-log/v1/views/{id}

Delete a saved view. The view goes; the events it showed are untouched.

Needs the view access level (who can call what). Your own views are yours to delete; somebody else’s shared view needs settings access.

Request

DELETE https://your-site.example/wp-json/plugixa-activity-log/v1/views/4

Path parameters

Name Type Description
id integer The view’s id

Responses

200 OK. data is your list of views after the deletion.

{
  "success": true,
  "data": []
}

The fields of each view are as in List Views. A user’s views are also deleted when the user is.

Errors

Status Code When
404 plugixa_activity_log_not_found No view with that id, or a view of somebody else that is not shared.
403 plugixa_activity_log_forbidden Somebody else’s shared view without settings access.

Plus the errors every endpoint can return.

Examples

curl -s -X DELETE "https://your-site.example/wp-json/plugixa-activity-log/v1/views/4" \
  -u "admin:$WP_APP_PASSWORD"
<?php
$ch = curl_init('https://your-site.example/wp-json/plugixa-activity-log/v1/views/4');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST  => 'DELETE',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_USERPWD        => 'admin:' . getenv('WP_APP_PASSWORD'),
]);
$response = json_decode(curl_exec($ch), true);
curl_close($ch);
const auth = Buffer.from(`admin:${process.env.WP_APP_PASSWORD}`).toString('base64');
const response = await fetch('https://your-site.example/wp-json/plugixa-activity-log/v1/views/4', {
  method: 'DELETE',
  headers: {
    'Authorization': `Basic ${auth}`,
  },
});
const { data } = await response.json();

Quick Links

Share