Updated on 2026-01-27 GMT+08:00

API Overview

SSH Key APIs

Table 1 SSH key APIs

API

Description

Checking Whether a Private Key Can Be Used to Pull Code

Check whether a private key has the permission to pull code.

Repository APIs

You can call these APIs to create and delete repositories, and collect repository statistics to manage repositories.

Table 2 Repository APIs

API

Description

Obtaining Repository Statistics

Obtain repository statistics.

Obtaining Image Files of a Specific Branch in a Repository

Obtain image files of a specific branch in a repository.

Modifying the Status of a Repository Referenced by a Pipeline

Modify the status of a repository referenced by a pipeline.

Checking Whether a User Has the Repository Administrator Permission

Check whether a user has the repository administrator permission.

Setting a Repository to Public or Private

Indicate whether a repository is public or private.

Obtaining the Content of a Specified File in a Repository Branch

Obtain the content of a specified file in a specified branch of a repository.

Creating a Repository

Create a repository on a specified project with the specified name. Input parameters include the repository name, template ID, whether to import project members, and home project.

Obtaining a Repository Short ID to Generate the Details Page URL

Obtain the short ID of a repository, which is used to obtain the URL of the repository details page.

Querying a Commit of a Branch by Repository or Repository Group Name

Obtain the commit list by repository group name, repository name, and branch.

Querying a Commit of a Repository Branch by the Repository ID

Query the commit of a repository branch based on the repository ID.

Adding a Deploy Key

Add a deployment key.

Deleting a Deploy Key

Delete the repository deployment key.

Obtaining the Last Commit Statistics of a Repository

Obtain the last commit statistics of the repository.

Repository Statistics

Query code commit record statistics of a repository based on the repository short ID.

Deleting a Repository

Delete a repository based on the 32-bit UUID of the repository.

Viewing a Repository Creation Status

Obtain the repository status.

Obtaining the Number of Committed Code Lines

Obtain the number of committed code lines of a specified branch in the code repository on a specified date.

Obtaining Information About Associated Work Items

This API is used to obtain the information about work items associated with a repository.

Repository Member APIs

Table 3 Repository member APIs

API

Description

Deleting a Repository Member

Delete repository members

Commit APIs

Table 4 Commit APIs

API

Description

Querying a Commit Message of a Repository

Obtain commit information based on the repository short ID. The list of all commits in the path can be queried based on the file path.

Repository File APIs

Table 5 Repository file APIs

API

Description

Querying File Information in a Repository

Obtain information about files in the repository, such as the name, size, and content. Note that the file content is encoded using Base64.

User APIs

Table 6 User APIs

API

Description

Verifying HTTPS Account and Password

Check whether the HTTPS username and password entered when you upload or download code are valid.

Webhook

API

Description

Querying a Webhook of a Specified Repository

Obtain the repository webhook.

Adding a Hook to a Specified Repository

A code commit automatically triggers building and addition of a repository hook.

Deleting a Hook from a Specified Repository

A code commit automatically triggers building and deletion of a repository hook.

Project APIs

You can call these APIs to query the list of all public repositories in a project and obtain information about all repositories in a project.

Table 7

API

Description

Obtaining the List of Repositories that Can be Set to Public under a Project

Obtain the list of repositories that can be set to the public state under a project.

Verifying a Repository Name of a Specified Project

This API is called when a repository is created. The project UUID and repository name are transferred, and the CoudeHubAdapter API is called to query the database to check whether the repository name is duplicate.

Verifying a Repository Name of a Specified Project

Obtain the repository list. Fuzzy query is supported: If project_id is not specified, fuzzy search by repository name or project name is supported. Otherwise, only fuzzy search by repository name is supported.