> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.awork.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.awork.com/_mcp/server.

# Returns the current user's filters.

GET https://api.awork.com/api/v1/filters

Returns the union of filters owned by the requesting user and filters explicitly shared with the requesting user.
Use the specialized created-by-me and shared-with-me endpoints when only one category is needed.Any authenticated user.

Reference: https://developers.awork.com/apiv1/filters/get-filters

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Query parameters

- `page` (integer, optional, default: 1) — Page number for pagination
- `pageSize` (integer, optional, default: 10) — Number of items per page
- `orderby` (string, optional) — The properties to order by
- `filterby` (string, optional) — The filter expression to filter by

## Response

### 200

OK

- `list of Filter`

## Errors

### 404 Not Found Error

Not Found

- `code` (string, required) — The error code.
- `description` (string, required) — The description of the error.
- `link` (string, required) — The link to the API documentation page.
- `details` (list of string, optional, nullable) — A list of details describing the error.
- `validationErrors` (list of ValidationErrorResponse, optional, nullable) — If a validation error occurred, this contains the validation errors for each property.
- `traceId` (string, optional, nullable) — The request trace id for tracking the request.

## Types

### Filter

Represents a saved filter including explicit sharing settings.

- `id` (string, optional) — The id of the entity.
- `createdOn` (string, optional) — The date this entity was created.
- `createdBy` (string, optional) — The id of the user who created this entity.
- `updatedOn` (string, optional) — The date this entity was last modified.
- `updatedBy` (string, optional) — The id of the user who last modified this entity.
- `name` (string, optional, nullable) — The name of the filter.
- `filterDefinition` (FilterDefinition, optional) — The structured filter representation of a filter query.
- `isExternal` (boolean, optional) — Whether this filter is coming from an external workspace (awork Connect).
- `entityType` (string, optional, nullable) — The entity type this filter targets. Can be 'projects', 'tasks', 'companies', 'users'.
- `userId` (string, optional) — The id of the user this filter was created for.
- `filterQuery` (string, optional, nullable) — The OData- query string that will be applied for querying this filter's underlying data type.
- `workspaceAccessLevel` (string, optional, nullable) — Determines the level of access to this filter granted to all workspace users. Can be either not set (no access), `read`, or `manage`.
- `contributors` (list of ContributorModel, optional, nullable) — The users explicitly connected to this filter.
- `teams` (list of EntityToTeamModel, optional, nullable) — The teams explicitly connected to this filter.

### ValidationErrorResponse

The validation error response.

- `property` (string, optional, nullable) — The name of the property that failed validation.
- `message` (string, optional, nullable) — The reason why this property failed validation.

### FilterDefinition

The structured filter representation of a filter query.

- `conditionGroups` (list of ConditionGroup, optional, nullable) — The condition groups within the filter definition.
- `rootConnector` (enum, optional) — The connector connecting condition groups or conditions within a Awork.Core.Models.Filters.FilterDefinition.FilterDefinition.
  - Allowed values: `And`, `Or`
- `entityType` (string, optional, nullable) — The entity type to filter on (e.g. "tasks", "projects", "companies", "users").

### ContributorModel

- `id` (string, optional) — The id of the contributor.
- `userId` (string, optional) — The id of the user this contributor references.
- `accessLevel` (string, optional, nullable) — Determines the level of access granted to this contributor with respect to the specific entity. Can be either set to `read` or `manage`.
- `firstName` (string, optional, nullable) — The first name of the user.
- `lastName` (string, optional, nullable) — The last name of the user.
- `hasImage` (boolean, optional, nullable) — Whether the user has an image.
- `isDeactivated` (boolean, optional) — Whether the user is deactivated.

### EntityToTeamModel

- `id` (string, optional) — The id of the entity to team.
- `teamId` (string, optional) — The id of the team this entity to team references.
- `accessLevel` (string, optional, nullable) — Determines the level of access granted to this entity to team with respect to the specific entity. Can be either set to `read` or `manage`.
- `name` (string, optional, nullable) — The name of the team.
- `icon` (string, optional, nullable) — The icon which is assigned to the team.
- `color` (string, optional, nullable) — The color of the team.

### ConditionGroup

A condition group within a Awork.Core.Models.Filters.FilterDefinition.FilterDefinition.

- `conditions` (list of Condition, optional, nullable) — A list of conditions within this condition group.
- `connector` (enum, optional) — The connector connecting condition groups or conditions within a Awork.Core.Models.Filters.FilterDefinition.FilterDefinition.
  - Allowed values: `And`, `Or`

### Condition

A condition of a Awork.Core.Models.Filters.FilterDefinition.FilterDefinition, is always part of a Awork.Core.Models.Filters.FilterDefinition.ConditionGroup. conditions can be either: - Comparison conditions (Type = ConditionType.Comparison): Simple field comparisons like "name eq 'John'" - Collection conditions (Type = ConditionType.Collection): Collection operations like "tags/any(t: t/name eq 'urgent')" For collection conditions: - Field contains the full path including inner field (e.g., "tags/name", "assignees/firstName") - The collection path is extracted from Field (everything before the last '/')

- `field` (string, optional, nullable) — The field to filter on. For collection fields, use the full path including the inner field (e.g., "tags/id", "assignees/id").
- `type` (enum, optional) — The type of condition.
  - Allowed values: `Comparison`, `Collection`, `CustomField`
- `operator` (enum, optional) — The supported operators for a filter condition. These operators map directly to UI filter options.
  - Allowed values: `Equal`, `NotEqual`, `GreaterThan`, `GreaterThanOrEqual`, `LessThan`, `LessThanOrEqual`, `Contains`, `DoesNotContain`, `Between`, `IsSet`, `IsNotSet`, `WithinThisWeek`, `WithinThisMonth`
- `values` (list of FilterValue, optional, nullable) — The values for this condition. Usage depends on operator: - Single-value operators (Equal, NotEqual, etc.): Use Values[0] - Multi-value operators (In): Use all Values - Range operators (Between): Use Values[0] as start, Values[1] as end - No-value operators (IsSet, IsNotSet, WithinThisWeek, WithinThisMonth): Values is null or empty
- `customFieldInformation` (CustomFieldInformation, optional)

### FilterValue

Represents the value of a Awork.Core.Models.Filters.FilterDefinition.Condition.Condition.

- `constantValue` (any, optional, nullable) — The constant value.
- `filterValueKind` (enum, optional) — The kind of the value in the context of a Awork.Core.Models.Filters.FilterDefinition.Condition.Value.FilterValue, either 'Constant' or 'Computed'.
  - Allowed values: `Constant`, `Computed`
- `computedValueKind` (enum, optional) — The kind of computed value in the context of a Awork.Core.Models.Filters.FilterDefinition.Condition.Value.FilterValue. These represent actual VALUES that can be used with operators (e.g., "dueOn eq today", "dueOn ge sow"). Note: WithinThisWeek and WithinThisMonth are operators (Operator enum), not values.
  - Allowed values: `Me`, `Now`, `Today`, `EndOfWeek`, `EndOfMonth`, `StartOfWeek`, `StartOfMonth`
- `daysOffset` (integer, optional, nullable) — The offset for the computed value, if the value is computed and is of kind 'Today'. Only need for Today computations for now.

### CustomFieldInformation

- `customFieldDefinitionId` (string, optional) — The custom field definition id.
- `customFieldValueType` (enum, optional) — The supported types of custom field values.
  - Allowed values: `UserId`, `Number`, `SelectionOptionId`, `Text`, `Date`, `Boolean`, `Client`

## Examples

**Request**

```json
{}
```

**Response**

```json
[
  {
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "createdOn": "2023-11-10T09:45:30.000Z",
    "createdBy": "a3bb189e-8bf9-3888-9912-ace4e6543002",
    "updatedOn": "2024-04-20T16:22:10.000Z",
    "updatedBy": "a3bb189e-8bf9-3888-9912-ace4e6543002",
    "name": "Open Tasks Filter",
    "filterDefinition": {
      "conditionGroups": [
        {
          "conditions": [
            {
              "field": "status",
              "type": "Comparison",
              "operator": "Equal",
              "values": [
                {
                  "constantValue": "Open",
                  "filterValueKind": "Constant",
                  "computedValueKind": null,
                  "daysOffset": null
                }
              ],
              "customFieldInformation": {
                "customFieldDefinitionId": "d290f1ee-6c54-4b01-90e6-d701748f0851",
                "customFieldValueType": "Text"
              }
            }
          ],
          "connector": "And"
        }
      ],
      "rootConnector": "And",
      "entityType": "tasks"
    },
    "isExternal": false,
    "entityType": "tasks",
    "userId": "a3bb189e-8bf9-3888-9912-ace4e6543002",
    "filterQuery": "status eq 'Open'",
    "workspaceAccessLevel": "read",
    "contributors": [
      {
        "id": "b1a7f3d2-4c3e-4f9a-9f3a-1a2b3c4d5e6f",
        "userId": "a3bb189e-8bf9-3888-9912-ace4e6543002",
        "accessLevel": "manage",
        "firstName": "Lisa",
        "lastName": "Smith",
        "hasImage": true,
        "isDeactivated": false
      }
    ],
    "teams": [
      {
        "id": "c2d3e4f5-6789-4abc-def0-123456789abc",
        "teamId": "d4e5f6a7-b8c9-4def-0123-456789abcdef",
        "accessLevel": "read",
        "name": "Designers",
        "icon": "paintbrush",
        "color": "purple"
      }
    ]
  }
]
```

**SDK Code**

```python
import requests

url = "https://api.awork.com/api/v1/filters"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.awork.com/api/v1/filters';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.awork.com/api/v1/filters"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.awork.com/api/v1/filters")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.awork.com/api/v1/filters")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.awork.com/api/v1/filters', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.awork.com/api/v1/filters");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.awork.com/api/v1/filters")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```