# Troubleshooting

Troubleshooting of PBX system.

## List audit logs

> Retrieve a collection of audit logs.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"Troubleshooting","description":"Troubleshooting of PBX system.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/audit_logs":{"get":{"tags":["Troubleshooting"],"operationId":"listAuditLogs","summary":"List audit logs","description":"Retrieve a collection of audit logs.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of audit log.\n"},"created_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The creation time of the audit log.\n"},"source":{"type":"string","description":"The source of the audit log.\n"},"ip":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The IP address of the audit log.\n"},"action":{"type":"string","enum":["CREATE","UPDATE","DELETE","LOGIN","LOGOUT","RECHARGE"],"description":"The audit log actions.   \nCan be either:  \n- `CREATE` created some resources.\n- `UPDATE` updated some resources.\n- `DELETE` deleted some resources.\n- `LOGIN` user logged in.\n- `LOGOUT` user logged out.\n- `RECHARGE` user account balance changed.\n"},"object_type":{"type":"string","enum":["ALLOWED_COUNTRY_CODES","AUTOMATIC_CALLBACK","BILLING","BLACKLISTED_NUMBER","BLOCK_CODE","CALL_PARK_GROUP","CALL_PARK_SERVER","CALL_PICKUP_GROUP","CALL_QUEUE","CALL_QUEUE_BLACKLISTED_NUM","CALL_QUEUE_SERVER","CALL_RECORDING","CALL_REPORT","CONFERENCE_ROOM","CONFERENCE_SERVER","CONTACT","CONTACT_GROUP","CUSTOM_EMAIL_TEMPLATE","DEALER","EMERGENCY_NUMBER","EXCLUSIVE_NUMBER","FEATURE_ACCESS_CODE","HOLIDAY","HOT_DESKING","INBOUND_RULE","IP_BLACKLIST","IVR","IVR_SERVER","LOGIN","MEDIA_SERVER","MICROSOFT_365_INTEGRATION","MOBILE_PUSH","MOH","MONITOR_GROUP","MONITOR_SERVER","OUTBOUND_RULE","PHONE_TEMPLATE","PROVIDER","RATING","RING_GROUP","ROLE","SHARED_VOICEMAIL","SYSTEM","TENANT","TRANSPORT","USER","USER_GROUP","VIP_NUMBER","VOICEMAIL_SERVER"],"description":"The audit log type.\n"},"user_name":{"type":"string","description":"The user name of the audit log.\n"},"object_name":{"type":"string","description":"The object name of the audit log.\n"},"old_state":{"type":"string","description":"The old state of the audit log.\n"},"new_state":{"type":"string","description":"The new state of the audit log.\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```

## List event logs

> Retrieve a collection of event logs.<br>

```json
{"openapi":"3.1.0","info":{"title":"PortSIP PBX Rest API","version":"22.3"},"tags":[{"name":"Troubleshooting","description":"Troubleshooting of PBX system.\n"}],"servers":[{"url":"{protocol}://{hostname}:{port}/api","variables":{"protocol":{"description":"Self-hosted Enterprise Server protocol.","default":"https"},"hostname":{"description":"Self-hosted Enterprise Server hostname.","default":"HOSTNAME"},"port":{"description":"Self-hosted Enterprise Server port.","default":"8887"}}}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer"}}},"paths":{"/event_logs":{"get":{"tags":["Troubleshooting"],"operationId":"listEventLogs","summary":"List event logs","description":"Retrieve a collection of event logs.\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"count":{"type":"integer","format":"int64","minimum":0,"description":"Total number of resource.\n"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"allOf":[{"type":"string","description":"The unique ID of the resource.\n"}],"description":"The unique ID of event log.\n"},"created_at":{"allOf":[{"type":"string","format":"date_time","description":"The RFC 3339 format is defined by\nThe date_time notation as defined by [RFC 3339, section 5.6](https://datatracker.ietf.org/doc/html/rfc3339#section-5.6), \nfor example, 2017-07-21T17:32:28Z\n"}],"description":"The creation time of the event log.\n"},"level":{"type":"string","enum":["DEBUG","INFO","WARN","ERROR"],"description":"The level of event log:  \nCan be either:  \n- `DEBUG`:\n- `INFO`:\n- `WARN`:\n- `ERROR`:\n"},"source":{"type":"string","description":"The source of event log\n"},"message":{"type":"string","description":"The content of event log\n"}}}}}}}}},"4XX":{"description":"Error"}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.portsip.com/development-portsip/rest-apis/version-22.3/troubleshooting.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
