Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
96 changes: 96 additions & 0 deletions client/openapi/trustd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1210,6 +1210,102 @@ paths:
summary: Get reports for an importer
operationId: listImporterReports
parameters:
- name: q
in: query
description: |
EBNF grammar for the _q_ parameter:
```text
q = ( values | filter ) { '&' q }
values = value { '|', values }
filter = field, operator, values
operator = "=" | "!=" | "~" | "!~" | ">=" | ">" | "<=" | "<"
value = (* any text but escape special characters with '\' *)
field = (* must match an entity attribute name *)
```
Any values in a _q_ will result in a case-insensitive "full
text search", effectively producing an OR clause of LIKE
clauses for every string-ish field in the resource being
queried.

Examples:
- `foo` - any field containing 'foo'
- `foo|bar` - any field containing either 'foo' OR 'bar'
- `foo&bar` - some field contains 'foo' AND some field contains 'bar'

A _filter_ may also be used to constrain the results. The
filter's field name must correspond to one of the resource's
attributes. If it doesn't, an error will be returned
containing a list of the valid fields for that resource.

The value 'null' is treated specially for [Not]Equal filters:
it returns resources on which the field isn't set. Use the
LIKE operator, `~`, to match a literal "null" string. Omit the
value to match an empty string.

Examples:
- `name=foo` - entity's _name_ matches 'foo' exactly
- `name~foo` - entity's _name_ contains 'foo', case-insensitive
- `name~foo|bar` - entity's _name_ contains either 'foo' OR 'bar', case-insensitive
- `name=` - entity's _name_ is the empty string, ''
- `name=null` - entity's _name_ isn't set
- `published>3 days ago` - date values can be "human time"

Multiple full text searches and/or filters should be
'&'-delimited -- they are logically AND'd together.

- `red hat|fedora&labels:type=cve|osv&published>last wednesday 17:00`

Fields corresponding to JSON objects in the database may use a
':' to delimit the column name and the object key,
e.g. `purl:qualifiers:type=pom`

Any operator or special character, e.g. '|', '&', within a
value should be escaped by prefixing it with a backslash.
required: false
schema:
type: string
- name: sort
in: query
description: |
EBNF grammar for the _sort_ parameter:
```text
sort = field [ ':', order ] { ',' sort }
order = ( "asc" | "desc" )
field = (* must match the name of entity's attributes *)
```
The optional _order_ should be one of "asc" or "desc". If
omitted, the order defaults to "asc".

Each _field_ name must correspond to one of the columns of the
table holding the entities being queried. Those corresponding
to JSON objects in the database may use a ':' to delimit the
column name and the object key,
e.g. `purl:qualifiers:type:desc`
required: false
schema:
type: string
- name: offset
in: query
description: |-
The first item to return, skipping all that come before it.

NOTE: The order of items is defined by the API being called.
required: false
schema:
type: integer
format: int64
minimum: 0
- name: limit
in: query
description: |-
The maximum number of entries to return.

Zero means: no limit
required: false
schema:
type: integer
format: int64
minimum: 0
- name: name
in: path
required: true
Expand Down
Loading