API reference
This page provides documentation for the API endpoints provided by the application.
Hooks
Process project webhook
Perform action based on project webhook event type:
push
: update project based on changes to dependabot.yml filemerge_request
: perform various actions based on merge request statusnote
: process dependabot comment commandspipeline
: accept and auto merge merge request on successful pipelineissue
: update internal status of vulnerability on issue close See https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html for more details
POST /api/v2/hooks
Attribute | In | Type | Required | Description |
---|---|---|---|---|
X-Gitlab-Token | header | string | false | Webhook secret token. Required if SETTINGS__GITLAB_AUTH_TOKEN is set |
object_kind | body | string | true | Webhook event type |
project | body | object | true | |
commits | body | array | false | |
merge_request | body | object | false | |
object_attributes | body | object | false |
Responses
Code | Description |
201 | Successful response |
Code | Description |
400 | Event not supported |
Code | Description |
401 | Invalid gitlab authentication token |
Process system hook
Create or update project based on received system webhook event
POST /api/v2/hooks/system/project_registration
Attribute | In | Type | Required | Description |
---|---|---|---|---|
event_name | body | string | true | Event name |
path_with_namespace | body | string | false | Project full path |
old_path_with_namespace | body | string | false | Project full path before renaming |
Responses
Code | Description |
201 | Successful responsejson
|
Code | Description |
204 | Skipped, event not supported|Skipped, does not match allowed namespace pattern |
Projects
Get all projects
Return array of all projects registered for dependency updates
GET /api/v2/projects
Attribute | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
Responses
Code | Description |
200 | Successful responsejson
|
Add project
Register project for dependency updates
POST /api/v2/projects
Attribute | In | Type | Required | Description |
---|---|---|---|---|
project_name | body | string | true | Project full path |
gitlab_access_token | body | string | false | Project specific access token |
Responses
Code | Description |
201 | Successful responsejson
|
Code | Description |
409 | Project already exists |
Get single project
Return single project
GET /api/v2/projects/{id}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Project id or url encoded full path |
Responses
Code | Description |
200 | Successful responsejson
|
Code | Description |
404 | Project not found |
Update project
Update project attributes
PUT /api/v2/projects/{id}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Project id or url encoded full path |
name | body | string | Project name | |
forked_from_id | body | integer | Forked from project id | |
forked_from_name | body | string | Forked from project name | |
webhook_id | body | integer | Webhook id | |
web_url | body | string | Web url | |
configuration | body | object |
Responses
Code | Description |
200 | Successful responsejson
|
Code | Description |
404 | Project not found |
Remove project
Remove project from database
DELETE /api/v2/projects/{id}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Project id or url encoded full path |
Responses
Code | Description |
204 | Removed project |
Code | Description |
404 | Project not found |
Get all merge requests
Return array of merge requests for a project
GET /api/v2/projects/{id}/merge_requests
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Project id or url encoded full path |
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
state | query | string | false | Filter by state |
package_ecosystem | query | string | false | Filter by package ecosystem |
main_dependency | query | string | false | Filter by main dependency |
Responses
Code | Description |
200 | Successful responsejson
|
Sync project
Sync project configuration with GitLab
POST /api/v2/projects/{id}/sync
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Project id or url encoded full path |
Responses
Code | Description |
201 | Successful responsejson
|
Code | Description |
404 | Project not found |
Get all update jobs
Return array of update jobs for a project
GET /api/v2/projects/{id}/update_jobs
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Project id or url encoded full path |
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
package_ecosystem | query | string | false | Filter by package ecosystem |
Responses
Code | Description |
200 | Successful responsejson
|
Users
Get all users
Return array of all users
GET /api/v2/users
Attribute | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
Responses
Code | Description |
200 | Successful responsejson
|
Add user
Add new user
POST /api/v2/users
Attribute | In | Type | Required | Description |
---|---|---|---|---|
username | body | string | true | User name |
password | body | string | true | User password |
Responses
Code | Description |
201 | Successful responsejson
|
Code | Description |
409 | Project already exists |
Get single user
Return single user
GET /api/v2/users/{username}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | User name |
Responses
Code | Description |
200 | Successful responsejson
|
Code | Description |
404 | User not found |
Update user password
Update user password
PUT /api/v2/users/{username}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | User name |
password | body | string | true | User password |
Responses
Code | Description |
200 | Successful responsejson
|
Code | Description |
404 | User not found |
Remove user
Remove user from database
DELETE /api/v2/users/{username}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
username | path | string | true | User name |
Responses
Code | Description |
204 | Removed user |
Code | Description |
404 | User not found |
Merge Requests
Get all merge requests
Return array of all merge requests
GET /api/v2/merge_requests
Attribute | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
state | query | string | false | Filter by state |
package_ecosystem | query | string | false | Filter by package ecosystem |
main_dependency | query | string | false | Filter by main dependency |
Responses
Code | Description |
200 | Successful responsejson
|
Get single merge request
Return single merge request
GET /api/v2/merge_requests/{id}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Merge request id |
Responses
Code | Description |
200 | Successful responsejson
|
Update Jobs
Get all update jobs
Return array of all update jobs
GET /api/v2/update_jobs
Attribute | In | Type | Required | Description |
---|---|---|---|---|
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
package_ecosystem | query | string | false | Filter by package ecosystem |
Responses
Code | Description |
200 | Successful responsejson
|
Get single update job
Return single update job
GET /api/v2/update_jobs/{id}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Update job id |
Responses
Code | Description |
200 | Successful responsejson
|
Trigger update job
Trigger dependency update job
POST /api/v2/update_jobs/{id}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Update job id |
Responses
Code | Description |
201 | Successful response |
Get all update job runs
Return array of all update job runs
GET /api/v2/update_jobs/{id}/runs
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Update job id |
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
status | query | string | false | Filter by run status: success |
has_failures | query | boolean | false | Filter by runs with failures |
Responses
Code | Description |
200 | Successful responsejson
|
Get single update job run
Return single update job run
GET /api/v2/update_jobs/{id}/runs/{run_id}
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Update job id |
run_id | path | string | true | Update run id |
Responses
Code | Description |
200 | Successful responsejson
|
Get update job run failures
Return array of update job run failures
GET /api/v2/update_jobs/{id}/runs/{run_id}/failures
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Update job id |
run_id | path | string | true | Update run id |
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
Responses
Code | Description |
200 | Successful responsejson
|
Get update job run log entries
Get all update job run log entries
GET /api/v2/update_jobs/{id}/runs/{run_id}/log_entries
Attribute | In | Type | Required | Description |
---|---|---|---|---|
id | path | string | true | Update job id |
run_id | path | string | true | Update run id |
page | query | integer | false | Page offset to fetch. |
per_page | query | integer | false | Number of results to return per page. |
offset | query | integer | false | Pad a number of results. |
log_level | query | string | false | Return log entries with given log level or above, one of ["ERROR", "INFO", "WARN", "UNKNOWN", "DEBUG", "FATAL"] , default: INFO |
Responses
Code | Description |
200 | Successful responsejson
|
Notify Release
Update dependency
Trigger specific dependency update for given package ecosystem across projects
POST /api/v2/notify_release
Attribute | In | Type | Required | Description |
---|---|---|---|---|
dependency_name | body | string | true | Dependency name |
package_ecosystem | body | string | true | Package ecosystem |
project_name | body | string | false | Specific project to trigger update for |
ignore_rules | body | boolean | false | Skip allow/ignore rules check when triggering update |
Responses
Code | Description |
201 | Successfully triggered dependency update |