Skip to content
This repository was archived by the owner on Jun 2, 2021. It is now read-only.

Commit 68aa90a

Browse files
committed
Update docs for filtering
- Add additional details for [not] operator Authored-by: Greg Cobb <gcobb@pivotal.io>
1 parent ddbb617 commit 68aa90a

2 files changed

Lines changed: 14 additions & 3 deletions

File tree

docs/v3/source/includes/concepts/_filters.md.erb

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ This will return all routes with hostname `"hostname1"`, `""` OR `"hostname2"`.
5050

5151
Some fields (e.g. `created_at` and `updated_at`) can be filtered using relational operators when listing resources.
5252

53-
For example, a response to `/v3/audit_events?created_ats[lt]=2020-06-30T12:34:56Z` will contain
53+
For example, a response to `GET /v3/audit_events?created_ats[lt]=2020-06-30T12:34:56Z` will contain
5454
audit events with a `created_at` timestamp strictly earlier than `2020-06-30T12:34:56Z`.
5555

5656
Multiple relational operators can be combined to further refine the listed resources. For example, a
57-
response to `/v3/audit_events?created_ats[lt]=2020-01-02T00:00:00Z&created_ats[gt]=2019-12-31T23:59:59Z`
57+
response to `GET /v3/audit_events?created_ats[lt]=2020-01-02T00:00:00Z&created_ats[gt]=2019-12-31T23:59:59Z`
5858
will return all audit events occurring on New Year's Day.
5959

6060
Timestamps must be in [standard timestamp format](#timestamps).
@@ -67,3 +67,14 @@ Timestamps must be in [standard timestamp format](#timestamps).
6767
**lte** | Return resources less than or equal to the given value for the filtered attribute
6868
**gt** | Return resources strictly greater than the given value for the filtered attribute
6969
**gte** | Return resources greater than or equal to the given value for the filtered attribute
70+
71+
#### Exclusion Operator (Experimental)
72+
73+
Some fields support filtering on all values except a given set of values.
74+
75+
For example, a response to `GET /v3/audit_events?target_guids[not]=guid-1,guid-2`
76+
will contain audit events with a `target.guid` not equal to `guid-1` nor `guid-2`.
77+
78+
**Operator** | **Description**
79+
-------------|-----------------
80+
**not** | Return resources not equal to the given value(s) for the filtered attribute

docs/v3/source/includes/resources/audit_events/_list.md.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Retrieve all audit events the user has access to.
3131
Name | Type | Description
3232
---- | ---- | ------------
3333
**types** | _list of strings_ | Comma-delimited list of event types to filter by
34-
**target_guids** | _list of strings_ | Comma-delimited list of target guids to filter by. Also supports filtering by exclusion with `GET /v3/audit_events[not]=target-guid-one,target-guid-two`
34+
**target_guids** | _list of strings_ | Comma-delimited list of target guids to filter by. Also supports [filtering by exclusion](#exclusion-operator-experimental).
3535
**space_guids** | _list of strings_ | Comma-delimited list of space guids to filter by
3636
**organization_guids** | _list of strings_ | Comma-delimited list of organization guids to filter by
3737
**page** | _integer_ | Page to display; valid values are integers >= 1

0 commit comments

Comments
 (0)