2.5 Scanning a repository
Request |
Value |
Method |
POST |
URL |
https://api.metadefender.com/v4/repo |
Throttled |
Yes |
Summary
Source code repository scanning. Works with any public repository from Github, Bitbucket or Gitlab. When issuing the post request send a JSON body with:
-
source can be: github, gitlab or bitbucket. If omitted, it defaults to github.
-
username repository owner
-
repository repository name (slug)
-
ref branch or commit, optional, defaults to master
Our server will download the source code archive and scan it. Please be aware that free apikeys have small limits when it comes to files inside archives, for details please see our licensing page.
Just like file scan, repo scans are performed asynchronously, and each scan request is tracked by a data id. After retrieving the data id, a long polling process needs to be started, to check if the scan has finished.
Request
Header Parameters
|
Description |
Allowed Values |
Required |
apikey |
gives rights to use the endpoint (token authentication) (API Authentication Mechanisms) |
apikey |
YES |
Content-Type |
specify the http content type |
application/json |
YES |
HTTP Status Codes
Please refer to Status Codes for more information.
Body
Errors
Please refer to Errors for more information.