跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support

Lists the dependencies of a branch

GET
/repos/{owner}/{repo}/security/dependencies
curl --request GET \
--url 'https://gitea.example.com/api/v1/repos/example/example/security/dependencies?page=1' \
--header 'Authorization: Basic <credentials>'

Gitea Enterprise only. This endpoint is not part of the community edition.

The component inventory the last dependency scan of the branch stored. A component that is a repository of this instance names it, when the reader can read it.

owner
required
string

Name of the owner

repo
required
string

Name of the repository

branch
string

Branch to read, the default branch when empty

ecosystem
string

Ecosystem of the components, e.g. Go

instance_only
boolean

Only the components that are a repository of this instance

q
string

Part of a package name

page
integer
default: 1 >= 1

Page number of results to return (1-based)

limit
integer

Number of items per page

DependencyInventory

Media typeapplication/json
DependencyInventory is the inventory of one branch as the last scan stored it.
object
branch_name
string
commit_id
string
components
Array<object>
DependencyComponent is one component of the inventory of a branch.
object
ecosystem
string
manifest_path

The lockfile the component came from

string
name
string
ref

Tag or commit of that repository the version points at

string
repository

Full name (owner/repo) of the repository of this instance the component is, empty for an external package and for a repository the reader cannot read

string
version
string
scanned_at
string format: date-time
total_count

Number of components of the branch, the page holds some of them

integer format: int64
Examplegenerated
{
"branch_name": "example",
"commit_id": "example",
"components": [
{
"ecosystem": "example",
"manifest_path": "example",
"name": "example",
"ref": "example",
"repository": "example",
"version": "example"
}
],
"scanned_at": "2026-04-15T12:00:00Z",
"total_count": 1
}

APINotFound is a not found empty response