Skip to main content

height-app-api > FiltersObject

FiltersObject type

FiltersObject

Signature:

export type FiltersObject = {
[key in Operators]?: FiltersObject[];
} | {
[key in Attributes]?: Filter;
};

References: FiltersObject

Example

Example 1 (simple query)

{
"status": {
"values": ["backLog", "inProgress"]
},
"assigneeId": {
"values": ["123e4567-e89b-12d3-a456-426655440000"]
},
"completed": {
"values": [false]
},
"lastActivityAt": {
"values": [],
"gt": {"date":"2019-11-07T17:00:00.000Z"},
}
}

Example 2 (with operators)

 {
"or": [{
"status": {
"values": ["backLog", "inProgress"]
},
}, {
"not": [{
"assigneeId": {
"values": ["123e4567-e89b-12d3-a456-426655440000"]
},
}],
}
}

Filters with an empty values array will be ignored. For example,

{
"or": [{
"status": {
"values": []
},
}, {
"not": [{
"assigneeId": {
"values": ["123e4567-e89b-12d3-a456-426655440000"]
},
}],
}
}

will be treated as

{
"or": [{
"not": [{
"assigneeId": {
"values": ["123e4567-e89b-12d3-a456-426655440000"]
},
}],
}
}