Create repository

Create a repository with the specified name.

Authentication

Authorizationstring
API Key authentication via header

Request

This endpoint expects an object.
namestringRequired
The repository name
commitUrlTemplatestringOptional
A template for constructing a valid URL to view the commit
hunkUrlTemplatestringOptional
A template for constructing a valid URL to view the hunk
typeenumOptional

The type of repository. If not specified, the default value is custom.

defaultBranchstringOptional

The repository’s default branch. If not specified, the default value is main.

Response

Repository response
namestring
The repository name
typeenum
The type of repository
defaultBranchstring
The repository's default branch
enabledboolean
Whether or not a repository is enabled for code reference scanning
versioninteger
The version of the repository's saved information
commitUrlTemplatestring
A template for constructing a valid URL to view the commit
hunkUrlTemplatestring
A template for constructing a valid URL to view the hunk
brancheslist of objects
An array of the repository's branches that have been scanned for code references
_accessobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error