> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/tposs/6.14/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/tposs/6.14/api-reference/events_api.md).

# Events API

The Events API allows to delete a bunch of events from TPOSS database.

## Methods

### Event.Delete

The Events API allows to delete a bunch of events from TPOSS database.

Following parameters could be passed:

| Name | Type | Requirement | Description |
---|---|---|---|
| AuthKey | AuthKey | required | Pre-shared authentication key.
| FeId | String | required | Static frontend identifier which should be unique  to the system.
| FeSId | String | required | Dynamic frontend session identifier which should be reset upon system startup.
| Events | array | required | List of IMEIs to delete from TPOSS |
| EventType | string | required | Type of the Events to be deleted |

Example of request:

```
      $ curl -H "Accept: application/json" -H "Content-Type: application/json" -X POST -d
        '{
           "id": "1", "jsonrpc": "2.0", "method":"Event.Delete",
           "params":
           {
             "AuthKey": "secret",
             "FeId":"TPUIBrowser",
             "FeSId": "TPUIBrowser",
             "Events": ["012345678901207", "012345678901217"],
             "EventType": "tposs/network/attachment/first"
           }
        }' http://127.0.0.1:12000
```

The API returns total amount of arrived Events in the request and amount of successfully
deleted the database.

Example of response:

```
      {
        "id": "101", "jsonrpc": "2.0",
        "result": {"Deleted" => 2, "Total" => 2}
      }
```
