Skip to main content
POST
/
v1
/
projects
/
{projectId}
/
repositories
Associate a repository with a project
curl --request POST \
  --url https://eu1.api.matillion.com/dpc/v1/projects/{projectId}/repositories \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Git-Provider-Access-Token: <git-provider-access-token>' \
  --data '
{
  "provider": "github",
  "providerParameters": {
    "ownerName": "my-github-organisation"
  },
  "repositoryName": "github-repo-name"
}
'
{
  "detail": "<string>",
  "instance": "<string>",
  "status": 123,
  "title": "<string>",
  "type": "<string>",
  "violations": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

a valid bearer token

Headers

Git-Provider-Access-Token
string
required

Path Parameters

projectId
string
required
Pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$

Body

application/json
provider
enum<string>
required

The Git provider type

Available options:
github
Example:

"github"

providerParameters
any
required

Provider-specific parameters (e.g., ownerName for GitHub)

Example:
{ "ownerName": "matillion-byog" }
repositoryName
string
required

The name of the repository

Required string length: 1 - 255
Example:

"my-project-repository"

Response

Repository associated successfully