Team Repositories API

Automate repository connection management for teams

The Repository Management API (released with 5.27.0) allows admins to automate repository connection management for teams.

All repo management endpoints follow this structure:

/api/team/v1/{teamId}/connections/repositories

As of 5.27.0, only Admins have permission for this endpoint.

OpenAPI reference

Get team repositories

GET

Retrieve all repository connections configured for a specific team

Authorizations
AuthorizationstringRequired

JWT ID Token obtained from authentication endpoints.

Required Role: Admin

Include in the Authorization header as: Bearer {token}

Path parameters
teamIdstring · uuidRequired

The unique identifier of the team

Example: 123e4567-e89b-12d3-a456-426614174000
Responses
chevron-right
200

Successfully retrieved team repositories

application/json
repository_linkstringRequired

The URL or path to the repository

Example: https://github.com/example/repo
repo_typestring · enumRequired

The type of repository

Example: gitPossible values:
authentication_methodstring · enumOptional

Authentication method (Git only)

Example: httpsPossible values:
authentication_credentials_namestringOptional

Name of the credentials to use for authentication

Example: github-pat-token
view_source_link_patternstringOptional

Template pattern for generating links to view source code. Use {path} for file path and {line} for line number.

Example: https://github.com/example/repo/blob/main/{path}#L{line}
GET
/{teamId}/connections/repositories

Add team repository

POST

Add a new repository connection to a team.

Git repositories can optionally include authentication_method and authentication_credentials_name. Perforce repositories require authentication_credentials_name.

Authorizations
AuthorizationstringRequired

JWT ID Token obtained from authentication endpoints.

Required Role: Admin

Include in the Authorization header as: Bearer {token}

Path parameters
teamIdstring · uuidRequired

The unique identifier of the team

Example: 123e4567-e89b-12d3-a456-426614174000
Body
repository_linkstringRequired

The URL or path to the repository

Example: https://github.com/example/repo
repo_typestring · enumRequired

The type of repository

Example: gitPossible values:
authentication_methodstring · enumOptional

Authentication method for Git repositories. Optional for Git, not applicable for Perforce.

Example: httpsPossible values:
authentication_credentials_namestringOptional

Name of the credentials to use for authentication. Optional for Git, required for Perforce.

Example: github-pat-token
view_source_link_patternstringOptional

Template pattern for generating links to view source code. Use {path} for file path and {line} for line number. Optional for both Git and Perforce.

Example: https://github.com/example/repo/blob/main/{path}#L{line}
Responses
chevron-right
200

Repository connection successfully added

application/json
repository_linkstringRequired

The URL or path to the repository

Example: https://github.com/example/repo
repo_typestring · enumRequired

The type of repository

Example: gitPossible values:
authentication_methodstring · enumOptional

Authentication method (Git only)

Example: httpsPossible values:
authentication_credentials_namestringOptional

Name of the credentials to use for authentication

Example: github-pat-token
view_source_link_patternstringOptional

Template pattern for generating links to view source code. Use {path} for file path and {line} for line number.

Example: https://github.com/example/repo/blob/main/{path}#L{line}
POST
/{teamId}/connections/repositories
PUT

Update an existing repository connection. All fields are optional - only provided fields will be updated (partial update).

Authorizations
AuthorizationstringRequired

JWT ID Token obtained from authentication endpoints.

Required Role: Admin

Include in the Authorization header as: Bearer {token}

Path parameters
teamIdstring · uuidRequired

The unique identifier of the team

Example: 123e4567-e89b-12d3-a456-426614174000
repositoryLinkstringRequired

The full repository link/URL. Can contain slashes and special characters. This should match the repository_link used when adding the repository.

Example: {"value":"https://github.com/example/repo","summary":"GitHub HTTPS URL"}
Body

All fields are optional for editing (partial update)

repo_typestring · enumOptional

The type of repository

Example: gitPossible values:
authentication_methodstring · enumOptional

Authentication method for Git repositories

Example: sshPossible values:
authentication_credentials_namestringOptional

Name of the credentials to use for authentication

Example: github-ssh-key
view_source_link_patternstringOptional

Template pattern for generating links to view source code. Use {path} for file path and {line} for line number.

Example: https://github.com/example/repo/blob/develop/{path}#L{line}
Responses
chevron-right
200

Repository connection successfully updated

application/json
repository_linkstringRequired

The URL or path to the repository

Example: https://github.com/example/repo
repo_typestring · enumRequired

The type of repository

Example: gitPossible values:
authentication_methodstring · enumOptional

Authentication method (Git only)

Example: httpsPossible values:
authentication_credentials_namestringOptional

Name of the credentials to use for authentication

Example: github-pat-token
view_source_link_patternstringOptional

Template pattern for generating links to view source code. Use {path} for file path and {line} for line number.

Example: https://github.com/example/repo/blob/main/{path}#L{line}
PUT
/{teamId}/connections/repositories/{repositoryLink}
DELETE

Remove a repository connection from a team

Authorizations
AuthorizationstringRequired

JWT ID Token obtained from authentication endpoints.

Required Role: Admin

Include in the Authorization header as: Bearer {token}

Path parameters
teamIdstring · uuidRequired

The unique identifier of the team

Example: 123e4567-e89b-12d3-a456-426614174000
repositoryLinkstringRequired

The full repository link/URL. Can contain slashes and special characters. This should match the repository_link used when adding the repository.

Example: {"value":"https://github.com/example/repo","summary":"GitHub HTTPS URL"}
Responses
chevron-right
200

Repository connection successfully deleted

application/json
messagestringOptionalExample: Repository connection deleted successfully
DELETE
/{teamId}/connections/repositories/{repositoryLink}

Field Descriptions

Common Fields

Field
Type
Required
Description

repo_type

string

Yes

Repository type: "git" or "perforce"

repository_link

string

Yes

Git: Repository URL (SSH or HTTPS format)<br>Perforce: Depot path (e.g., //depot/main)

latest_status

string

Read-only

Current indexing status (see Status Values below)

last_indexed_successfully

string or null

Read-only

ISO 8601 timestamp of last successful indexing, or null if never indexed

Git-Specific Fields

Field
Type
Required
Description

authentication_method

string

Yes

"ssh" or "https"

authentication_credentials_name

string

Conditional

Required when authentication_method is "https"<br>Must match an existing HTTP credential name for the team

view_source_link_pattern

string

No

URL pattern for viewing source code<br>Supports placeholders: {sha}, {path}, {line}

Perforce-Specific Fields

Field
Type
Required
Description

authentication_credentials_name

string

Yes

Must match an existing Perforce credential name for the team

view_source_link_pattern

string

No

Currently not used for Perforce

Status Values

The latest_status field can have the following values:

Status
Description

pending

Repository is queued for initial indexing

cloning

Repository is being cloned (Git only)

indexing

Repository is currently being indexed

success

Repository was successfully indexed

failed

Last indexing attempt failed

circle-info

Perforce depots typically skip the cloning status and go directly to indexing.

Last updated

Was this helpful?