v2

latestOpenAPI 3.0.32026-08-012859114.1 KB
defect

get/api/v2/owner/{owner}/defect

Path parameters

ownerstring required

The owner under which a project is categorized under. For example, a user's username.

Query parameters

branch_namestring nullable
{"stackTrail":"paths:/api/v2/owner/{owner}/defect:get:parameters:2:schema","oasType":"schema","type":"unknown","nullable":true}
last_seen_gtestring date-time
last_seen_ltstring date-time
latest_defects_onlyboolean
no_branchboolean
offsetinteger

Offset in the result.

per_pageinteger

Number of elements per page.

project_slugstring[]
qstring

case-insensitive search across defect title, CWE #, and target

{"stackTrail":"paths:/api/v2/owner/{owner}/defect:get:parameters:11:schema","oasType":"schema","type":"unknown","nullable":true}
severitystring[]
sorted_bystring[]
status'open' | 'closed'
target_slugstring[]
target_type'code' | 'api'

Response

Get defects for a owner, optionally filtered by project/target.

The target to filter on is determined by the target slug passed in the query
parameter `target`.

The run to filter on is determined by the run number passed in the query
parameter `run`. A value of "latest" here will return defects for the most
recent run based on the run's created_at time.

Pagination defaults to 10 per page and starts on offset 0.

:param owner: the owner
:param offset: the offset of the results to retrieve, 0-indexed
:param per_page: how many results to retrieve per page
:param project: an optional filter on the project
:param target: an optional filter on the target
:param run: an optional filter on the run number
:param defect_type: an optional filter on the defect CWE number
:param branch_name: an optional filter used to select the defect state for the
                    given branch. If not specified, the Project default branch
                    is used.
:param no_branch: an explicit boolean that filters defect state details to
                  runs without branch information. When this is true,
                  branch_name cannot be set.

:returns: A dict where the `defects` key contains a list of the desired defects
api_countinteger
code_countinteger
countinteger