Skip to main content
POST
/
api
/
projects
/
v1
/
projects
/
{projectId}
/
repositories
Add an imported git repository to this project
curl --request POST \
  --url https://api.example.com/api/projects/v1/projects/{projectId}/repositories \
  --header 'Content-Type: application/json' \
  --header 'X-Domino-Api-Key: <api-key>' \
  --data '
{
  "uri": "https://github.com/torvalds/linux",
  "gitCredentialId": "<string>",
  "name": "<string>"
}
'
{
  "metadata": {
    "notices": [
      "<string>"
    ],
    "requestId": "<string>"
  },
  "repository": {
    "defaultRef": {
      "value": "<string>"
    },
    "id": "62604702b7e5d347dbe7a908",
    "uri": "https://github.com/torvalds/linux",
    "name": "<string>"
  }
}

Authorizations

X-Domino-Api-Key
string
header
required

Path Parameters

projectId
string
required

Project ID

Body

application/json

Repository to add

uri
string
required

URI of the repository origin

Example:

"https://github.com/torvalds/linux"

defaultRef
object
gitCredentialId
string

Id of the git creds to use for the repo. Credentials only apply for the current user, and other users will need to add their own unique creds.

name
string

Optional name of the repository in the project

serviceProvider
enum<string>

Git service provider

Available options:
bitbucket,
bitbucketServer,
github,
githubEnterprise,
gitLab,
gitLabEnterprise,
unknown

Response

Success

metadata
object
required
repository
object
required