v2
latestOpenAPI 3.0.32026-08-012859114.1 KBdefect
get/api/v2/owner/{owner}/project/{project_slug}/defect
Path parameters
ownerstring required
The owner under which a project is categorized under. For example, a user's username.
project_slugstring required
The name of the project. Note: the project name needs to be specified as a 'slug', a URL-friendly version of the project name.
Query parameters
branch_namestring nullable
{"stackTrail":"paths:/api/v2/owner/{owner}/project/{project_slug}/defect:get:parameters:3: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.
qstring
case-insensitive search across defect title, CWE #, and target
{"stackTrail":"paths:/api/v2/owner/{owner}/project/{project_slug}/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 project in a owner, optionally filtered by 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 project: the project object
:param offset: the offset of the results to retrieve, 0-indexed
:param per_page: how many results to retrieve per page
: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