Source ControlGit Repositories

Add a project repository

Attach a new repository to a project.

POST
/v1/orgs/{org}/projects/{project}/repos
AuthorizationBearer <token>

API key starting with tektona_. Create one at app-dev.tektona.ai under API Keys.

In: header

Path Parameters

org*string

Organization name

Match^[a-z0-9][a-z0-9-]*[a-z0-9]$
Length2 <= length <= 64
project*string

Project name

Match^[a-z0-9][a-z0-9-]*[a-z0-9]$
Length2 <= length <= 64

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

default_branch?string

Default branch (defaults to main when omitted)

Lengthlength <= 255
is_default?boolean

Include in the default repo set

name*string

Short repository name

Match^[^\x00-\x08\x0a-\x1f\x7f-\x9f‪-‮⁦-⁩]*$
Length1 <= length <= 128
url*string

Repository clone URL: https://host[:port]/path only. The scheme is lower case. ssh://, the scp form (git@host:path) and other schemes are refused. The port, when set, is 1 to 65535. Must not carry credentials (no userinfo, no query); a token belongs in a git credential. Must not have a fragment. Printable ASCII only, with no space: percent-encode other characters and write a non-Latin host in punycode

Length1 <= length <= 1024

Response Body

application/json

application/problem+json

curl -X POST "https://example.com/v1/orgs/string/projects/string/repos" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "url": "string"  }'
{  "created_at": "string",  "default_branch": "string",  "id": "string",  "is_default": true,  "name": "string",  "project_id": "string",  "updated_at": "string",  "url": "string"}