CLI Command Reference (V3)
SSH Keys
| API Name | Command | Description | Operation |
|---|---|---|---|
| Obtaining an SSH Key List | hcloud CodeArtsRepo ListSshKeys/v3 | This API is used to obtain an SSH key list. | |
| Adding an SSH Key | hcloud CodeArtsRepo AddSshKey/v3 | This API is used to add an SSH key. | |
| Checking Whether a Private Key Can Be Used to Pull Code | hcloud CodeArtsRepo ShowPrivateKeyVerify/v3 | This API is used to check whether a private key has the permission to pull code. | |
| Deleting a User Public Key | hcloud CodeArtsRepo DeleteSShkey/v3 | This API is used to delete a user public key. |
Repository
| API Name | Command | Description | Operation |
|---|---|---|---|
| Obtaining Files in a Branch Directory | hcloud CodeArtsRepo ListSubfiles/v3 | This API is used to obtain files in the branch directory. | |
| Obtaining Repository Statistics | hcloud CodeArtsRepo ShowStatisticalData/v3 | This API is used to obtain repository statistics. | |
| Obtaining Image Files of a Specific Branch in a Repository | hcloud CodeArtsRepo ShowImageBlob/v3 | This API is used to obtain image files of a specific branch in a repository. | |
| Modifying the Status of a Repository Referenced by a Pipeline. | hcloud CodeArtsRepo ShowHasPipeline/v3 | This API is used to modify the status of a repository referenced by a pipeline. | |
| Obtaining Reviewer Information Based on the Repo Short ID and Merge Request Short ID | hcloud CodeArtsRepo ListMergeRequestReviewers/v3 | This API is used to obtain reviewer information based on the repo short ID and merge request short ID. | |
| Reviewing Merge Request Code | hcloud CodeArtsRepo UpdateMergeRequestApprovalState/v3 | This API is used to review the merge request code. | |
| Obtaining Changed Files | hcloud CodeArtsRepo ListMergeChanges/v3 | This API is used to obtain changed files. | |
| Obtaining Associated Work Item Information | hcloud CodeArtsRepo ListRelatedCommits/v3 | This API is used to obtain information about associated work items. | |
| Obtaining the List of Changed Files | hcloud CodeArtsRepo ListMergeChangesTrees/v3 | This API is used to obtain the list of changed files. | |
| Checking Whether a User Has the Repository Administrator Permission | hcloud CodeArtsRepo ShowMaster/v3 | This API is used to check whether a user has the repository administrator permission. | |
| Setting a Repository to Public or Private | hcloud CodeArtsRepo ShareTemplates/v3 | This API is used to set a repository to public or private. | |
| Setting a Repository to Public or Private | hcloud CodeArtsRepo ListTemplatesTwo/v3 | This API is used to set a repository to public or private. | |
| Obtaining the Content of a Specified File in a Specified Branch of a Repository | hcloud CodeArtsRepo ListFiles/v3 | This API is used to obtain the content of a specified file in a specified branch of a repository. | |
| Obtaining a Public Template List | hcloud CodeArtsRepo GetTemplates/v3 | This API is used to obtain a public template list. | |
| Obtaining a Public Template List | hcloud CodeArtsRepo ListTwoTemplates/v3 | This API is used to obtain a public template list. | |
| Creating a Repository | hcloud CodeArtsRepo CreateRepository/v3 | This API is used to 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 Based on the Repository or Repository Group Name to Combine the URL of the Commit Details Page Corresponding to the Commit ID | hcloud CodeArtsRepo ShowRepoId/v3 | This API is used to 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 | hcloud CodeArtsRepo ShowCommitsByBranch/v3 | This API is used to obtain the commit list by repository or repository group name and branch. | |
| Querying Branches of a Specified Repository | hcloud CodeArtsRepo ShowBranchesByRepositoryId/v3 | This API is used to query the branch list of a specified repository by the repository ID. | |
| Querying a Commit of a Repository Branch by the Repository ID | hcloud CodeArtsRepo ShowCommitsByRepoId/v3 | This API is used to query the commit of a repository branch based on the repository ID. | |
| Adding a Deploy Key | hcloud CodeArtsRepo AddDeployKey/v3 | This API is used to add a deploy key. | |
| Adding a Deploy Key | hcloud CodeArtsRepo AddDeployKeyV2/v3 | This API is used to add a deploy key. | |
| Deleting a Repository Deploy Key | hcloud CodeArtsRepo DeleteDeployKey/v3 | This API is used to delete a repository deploy key. | |
| Deleting a Repository Deploy Key | hcloud CodeArtsRepo DeleteDeployKeyV2/v3 | This API is used to delete a repository deploy key. | |
| Obtaining the Last Commit Statistics of a Repository | hcloud CodeArtsRepo ListCommitStatistics/v3 | This API is used to obtain the last commit statistics of a repository. | |
| Repository Statistics | hcloud CodeArtsRepo ShowRepositoryStatistics/v3 | This API is used to query code commit record statistics of a repository by the repository short ID. | |
| Querying a Repository in a Project | hcloud CodeArtsRepo GetRepositoryByProjectId/v3 | This API is not recommended. You are advised to use /{repository_uuid}/status. | |
| Deleting a Repository | hcloud CodeArtsRepo DeleteRepository/v3 | This API is used to delete a repository by the 32-bit UUID of the repository. | |
| Viewing a Repository Creation Status | hcloud CodeArtsRepo ListRepositoryStatus/v3 | This API is used to obtain the repository status. | |
| Querying a Tag List of a Repository | hcloud CodeArtsRepo ShowBranchesByTwoRepositoryId/v3 | This API is used to query the branch corresponding to a specified repository. | |
| Adding a Tag | hcloud CodeArtsRepo AddTagV2/v3 | This API is used to add a tag. | |
| Querying Details About a Repository | hcloud CodeArtsRepo ShowRepositoryByUuid/v3 | This API is used to obtain details about a repository by UUID (returned by the CreateRepository API). The returned information contains the ID, name, repo group name, and repository access URL. | |
| Obtaining the Number of Committed Code Lines | hcloud CodeArtsRepo ShowStatisticCommit/v3 | This API is used to obtain the number of committed code lines of a specified branch in the code repository on a specified date. | |
| Obtaining the Number of Committed Code Lines | hcloud CodeArtsRepo ShowStatisticCommitV3/v3 | This API is used to obtain the number of committed code lines of a specified branch in the code repository on a specified date. | |
| Downloading a Repository | hcloud CodeArtsRepo ShowRepositoryArchive/v3 | This API is used to download a repository in the specified format. | |
| Creating a Protected Branch | hcloud CodeArtsRepo AddProtectBranchV2/v3 | This API is used to create a protected branch. | |
| Obtaining a Repository Branch List | hcloud CodeArtsRepo ListBranchesByRepositoryId/v3 | This API is used to obtain a branch list of a repository. | |
| Obtaining the Merge Request List of a Repository | hcloud CodeArtsRepo ListMergeRequest/v3 | This API is used to obtain a merge request list of a repository. | |
| Obtaining Merge Request Details of a Repository | hcloud CodeArtsRepo ShowMergeRequest/v3 | This API is used to obtain merge request details of a repository. |
Project (V2)
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying All Repositories of a User | hcloud CodeArtsRepo ListUserAllRepositories/v3 | This API is used to obtain information about all repositories of a user. | |
| Creating a Project and Repository | hcloud CodeArtsRepo CreateProjectAndRepositories/v3 | After a project is created, the parameters for creating a repository group are generated in the background, including the repository name, template ID, whether to import project members, and home project. | |
| Creating a Project and Forking a Repository | hcloud CodeArtsRepo CreateProjectAndforkRepositories/v3 | After a repository is created, parameters transferred to the fork repository include the repository name, whether to import project members, and home project. | |
| Querying All Repositories in a Project | hcloud CodeArtsRepo ShowAllRepositoryByTwoProjectId/v3 | This API is used to obtain the repository list. Fuzzy query is supported: If the project UUID is not specified, fuzzy query by repository name or project name is supported; otherwise, fuzzy query by repository name is supported. | |
| Associating Branches with Work Items | hcloud CodeArtsRepo AssociateIssues/v3 | This API is used to associate work items with a branch. |
File
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying File Information in a Repository | hcloud CodeArtsRepo ShowFile/v3 | This API is used to obtain information about a file in a repository, such as the name, size, and content. Note that the file content is encoded using Base64. | |
| Querying File Information in a Repository | hcloud CodeArtsRepo ListFilesByQuery/v3 | This API is used to obtain information about a file in a repository, such as the name, size, and content. Note that the file content is encoded using Base64. |
Repository Member
| API Name | Command | Description | Operation |
|---|---|---|---|
| Obtaining All Member Records in a Repository | hcloud CodeArtsRepo ListRepoMembers/v3 | This API is used to obtain the repository member list. You can search for a member by keyword. | |
| Adding a Repository Member | hcloud CodeArtsRepo AddRepoMembers/v3 | This API is used to add a repository member. | |
| Setting a Role for a Member in the Repository | hcloud CodeArtsRepo SetRepoRole/v3 | This API is used to assign repository operation permissions to repository members. | |
| Deleting a Repository Member | hcloud CodeArtsRepo DeleteRepoMember/v3 | This API is used to delete a repository member. |
Commit
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying the Commit Message of a Repository | hcloud CodeArtsRepo ListCommits/v3 | This API is used to obtain a commit message by the repository short ID. The list of all commits in a path can be queried by the file path. | |
| Creating a Commit | hcloud CodeArtsRepo CreateCommit/v3 | This API is used to commit multiple files in different directories at a time. If the directory does not exist, the system automatically creates a directory. The forcible overwrite option is supported. When the forcible overwrite flag is set to true, the conflict is ignored and the configuration is forcibly committed. | |
| Querying a Specific Commit Message of a Repository | hcloud CodeArtsRepo ShowSingleCommit/v3 | This API is used to obtain a specific commit by commit ID, branch name, or tag name. | |
| Querying the Commit Difference Information of a Repository | hcloud CodeArtsRepo ShowDiffCommit/v3 | This API is used to query commit difference information by commit ID. |
Webhook
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying a Webhook of a Specified Repository | hcloud CodeArtsRepo ListHooks/v3 | This API is used to obtain the repository webhook. | |
| Adding a Webhook to a Specified Repository | hcloud CodeArtsRepo AddHooks/v3 | A code commit automatically triggers building and addition of a repository hook. | |
| Deleting a Webhook of a Specified Repository | hcloud CodeArtsRepo DeleteHooks/v3 | A code commit automatically triggers building and deletion of a repository hook. |
Discussion
| API Name | Command | Description | Operation |
|---|---|---|---|
| Creating Merge Request Review Comments | hcloud CodeArtsRepo CreateMergeRequestDiscussion/v3 | This API is used to create merge request review comments. | |
| Replying to Merge Request Review Comments | hcloud CodeArtsRepo CreateMergeRequestDiscussionNote/v3 | This API is used to reply to merge request review comments. | |
| Obtaining Review Comment Settings | hcloud CodeArtsRepo ShowReviewSetting/v3 | This API is used to obtain review settings. |
User
| API Name | Command | Description | Operation |
|---|---|---|---|
| Verifying HTTPS Account and Password | hcloud CodeArtsRepo ValidateHttpsInfo/v3 | This API is used to check whether the username and password entered when you upload or download code using HTTPS are valid. | |
| Verifying HTTPS Account and Password | hcloud CodeArtsRepo ValidateHttpsInfoV2/v3 | This API is used to check whether the username and password entered when you upload or download code using HTTPS are valid. |
Project
| API Name | Command | Description | Operation |
|---|---|---|---|
| Obtaining the List of Repositories that Can be Set to Public under a Project | hcloud CodeArtsRepo GetProductTemplates/v3 | This API is used to obtain the list of repositories that can be set to public under a project. | |
| Obtaining the List of Repositories that Can be Set to Public under a Project | hcloud CodeArtsRepo ListProductTwoTemplates/v3 | This API is used to obtain the list of repositories that can be set to public under a project. | |
| Obtaining Information About All Repositories in a Project | hcloud CodeArtsRepo GetAllRepositoryByProjectId/v3 | This API is used to obtain the repository list. Fuzzy query is supported: If the project_id is not specified, fuzzy search by repository name or project name is supported. Otherwise, only fuzzy search by repository name is supported. | |
| Verifying a Repository Name of a Specified Project | hcloud CodeArtsRepo ShowRepositoryNameExist/v3 | This API is called when a repository is created. Enter the project ID. For details, see "Obtaining a Project ID". Repository name, which is used to determine whether the repository name is duplicate. |
Repository Management (V2)
| API Name | Command | Description | Operation |
|---|---|---|---|
| Creating a Branch | hcloud CodeArtsRepo CreateNewBranch/v3 | This API is used to create a branch in a specified repository based on the repository ID. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot