Destroy Objects

Destroys objects of the specified type. This operation is similar to the DELETE database command. The HTTP method used to send the data is POST.

POST /destroy_objects.fcgi

Parameters

  • object (string): Type of object to be destroyed. See the topic List of Objects to consult the complete list of all types of objects available.
  • where (JSON objects): Please refer to load_objects reference to consult the complete description of the "where" parameter. Only the same object can be used as a filter.

Response

  • changes (int): Number of changes made.

Request example

This request will destroy all users named Walter White.

$.ajax({
  url: "/destroy_objects.fcgi?session=" + session,
  type: 'POST',
  contentType: 'application/json',
  data: JSON.stringify({
    object: "users",
    where: {
      users: {name: 'Walter White'}
    }
  })
});

Response example

{"changes":0}