# Web Application Endpoints

BugSplat provides RESTful web services to access data on our backend. The BugSplat database should be selected using the "database" URL parameter. Data is returned in JSON format. Authentication is required for all endpoints. See the curl example at the end of this page for an illustration of this process.

Want to see our API in action? Open your web browser inspector to see how our web application uses the endpoints below!

Most API endpoints support a "database={name}" parameter to specify which BugSplat database to use. Without this parameter, the current (default) database will be selected.

{% content-ref url="api/charting" %}
[charting](https://docs.bugsplat.com/introduction/development/web-services/api/charting)
{% endcontent-ref %}

{% content-ref url="api/company" %}
[company](https://docs.bugsplat.com/introduction/development/web-services/api/company)
{% endcontent-ref %}

{% content-ref url="api/crash" %}
[crash](https://docs.bugsplat.com/introduction/development/web-services/api/crash)
{% endcontent-ref %}

{% content-ref url="api/crashes" %}
[crashes](https://docs.bugsplat.com/introduction/development/web-services/api/crashes)
{% endcontent-ref %}

{% content-ref url="api/crash-groups" %}
[crash-groups](https://docs.bugsplat.com/introduction/development/web-services/api/crash-groups)
{% endcontent-ref %}

{% content-ref url="api/databases" %}
[databases](https://docs.bugsplat.com/introduction/development/web-services/api/databases)
{% endcontent-ref %}

{% content-ref url="api/defect" %}
[defect](https://docs.bugsplat.com/introduction/development/web-services/api/defect)
{% endcontent-ref %}

{% content-ref url="api/events" %}
[events](https://docs.bugsplat.com/introduction/development/web-services/api/events)
{% endcontent-ref %}

{% content-ref url="api/support-response" %}
[support-response](https://docs.bugsplat.com/introduction/development/web-services/api/support-response)
{% endcontent-ref %}

{% content-ref url="api/user-gdpr" %}
[user-gdpr](https://docs.bugsplat.com/introduction/development/web-services/api/user-gdpr)
{% endcontent-ref %}

{% content-ref url="api/users" %}
[users](https://docs.bugsplat.com/introduction/development/web-services/api/users)
{% endcontent-ref %}

{% content-ref url="api/versions" %}
[versions](https://docs.bugsplat.com/introduction/development/web-services/api/versions)
{% endcontent-ref %}

### Curl Example

You can access the web services with a variety of tools. Here’s an example using Curl to connect to the Fred database:

```
rm cookies.txt
curl -b cookies.txt -c cookies.txt --data "email=fred@bugsplat.com&password=Flintstone" https://app.bugsplat.com/api/authenticatev3
curl -b cookies.txt -c cookies.txt "https://app.bugsplat.com/allCrash?database=Fred"
curl -b cookies.txt -c cookies.txt "https://app.bugsplat.com/api/crash/data?id=58464&database=Fred"
```

Escaping special characters in email and password fields can be challenging. If your authentication isn't working, try posting to [httpbin.org/post](https://httpbin.org/post) and check the parameters that are returned. You may need to URL-encode the email and password values. For example:

```
curl --data "email=test+app@bugsplat.com&password=ABCHi&898S$QQ" https://httpbin.org/post
```

### Postman Collection

Several of our API endpoints can be tested via our public [Postman collection](https://www.postman.com/bugsplat/bugsplat-public-workspace/overview).

First, click the top-level `BugSplat` collection folder, select the `Variables` tab, and input variables as necessary. You can make most requests automatically by providing values for `client_id`and `client_secret` generated on our Integrations page.

For requests requiring additional permissions, you'll need to run the `Admin/Authenticate` request. Clear your Postman cookies before switching from OAuth2 to Admin/Authenticate.

## Special Rules for POST Requests

When POSTing data to BugSplat endpoints, additional steps are required to meet our Cross-Site Request Forgery (XSRF) safety checks. After authenticating, you will receive a cookie named `xsrf-token`. Send the xsrf-token key/value as a **header** in all POST requests.


---

# 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://docs.bugsplat.com/introduction/development/web-services/api.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.
