---
description: Fetch all tickets based on the current status.
---

# \[GET] Status

#### Base URL:

```javascript
{YOUR-DOMAIN}/upload/ost_wbs/
```

#### \[ Header ] Authentication

| Field    |   Type   | Mandatory |
| -------- | :------: | --------- |
| `apikey` | `string` | ✔️        |

#### \[ Body ] parameters

<table><thead><tr><th>Option</th><th>Type</th><th width="150" align="center">Mandatory</th></tr></thead><tbody><tr><td><code>query</code></td><td><code>string</code></td><td align="center">✔️</td></tr><tr><td><code>condition</code></td><td><code>string</code></td><td align="center">✔️</td></tr><tr><td><code>sort</code></td><td><code>string</code></td><td align="center">✔️</td></tr><tr><td><code>status</code></td><td><code>int</code></td><td align="center">✔️</td></tr></tbody></table>

#### Body request example:

```json
{
"query":"ticket",
"condition":"all",
"sort": "status",
"parameters":{
    "status":1
    }
}
```

#### Available Ticket Status

<table><thead><tr><th width="150">Option</th><th>Name</th></tr></thead><tbody><tr><td><code>0</code></td><td><code>All</code> not necessarily a "state" but returns all tickets in the DB regardless of state</td></tr><tr><td><code>1</code></td><td><code>Open</code></td></tr><tr><td><code>2</code></td><td><code>Resolved</code></td></tr><tr><td><code>3</code></td><td><code>Closed</code></td></tr><tr><td><code>4</code></td><td><code>Archived</code></td></tr><tr><td><code>5</code></td><td><code>Deleted</code></td></tr><tr><td><code>6</code></td><td><code>On Going</code></td></tr><tr><td><code>7</code></td><td><code>Pending</code></td></tr></tbody></table>

#### Status Code

{% tabs %}
{% tab title="200 OK" %}
```json
{
    "status": "Success",
    "time": 0.02513885498046875,
    "data": {
        "total": 5,
        "tickets": [
            [
                {
                    "ticket_id": "1",
                    "ticket_pid": null,
                    "number": "254937",
                    "user_id": "1",
                    "user_email_id": "0",
                    "status_id": "1",
                    "dept_id": "1",
                    "sla_id": "1",
                    "topic_id": "1",
                    "staff_id": "0",
                    "team_id": "0",
                    "email_id": "0",
                    "lock_id": "0",
                    "flags": "65",
                    "sort": "0",
                    "subject": "osTicket Installed!",
                    "title": "osTicket Installed!",
                    "body": " <p>Thank you for choosing osTicket. </p> <p>Please make sure you join the <a href=\"https://forum.osticket.com\">osTicket forums</a> and our <a href=\"https://osticket.com\">mailing list</a> to stay up to date on the latest news, security alerts and updates. The osTicket forums are also a great place to get assistance, guidance, tips, and help from other osTicket users. In addition to the forums, the osTicket wiki provides a useful collection of educational materials, documentation, and notes from the community. We welcome your contributions to the osTicket community. </p> <p>If you are looking for a greater level of support, we provide professional services and commercial support with guaranteed response times, and access to the core development team. We can also help customize osTicket or even add new features to the system to meet your unique needs. </p> <p>If the idea of managing and upgrading this osTicket installation is daunting, you can try osTicket as a hosted service at <a href=\"https://supportsystem.com\">https://supportsystem.com/</a> -- no installation required and we can import your data! With SupportSystem's turnkey infrastructure, you get osTicket at its best, leaving you free to focus on your customers without the burden of making sure the application is stable, maintained, and secure. </p> <p>Cheers, </p> <p>-<br /> osTicket Team https://osticket.com/ </p> <p><strong>PS.</strong> Don't just make customers happy, make happy customers! </p>",
                    "ip_address": "127.0.0.1",
                    "source": "Web",
                    "source_extra": null,
                    "isoverdue": "1",
                    "isanswered": "0",
                    "duedate": null,
                    "est_duedate": "2022-06-17 11:04:29",
                    "reopened": null,
                    "closed": null,
                    "lastupdate": "2022-06-15 11:04:29",
                    "created": "2022-06-15 11:04:29",
                    "updated": "0000-00-00 00:00:00"
                }
            ]...
        ]
    }
}
```
{% endtab %}

{% tab title="204 No Content" %}
```json
{
    "status": "Error",
    "data": "No items found."
}
```
{% endtab %}
{% endtabs %}
