Queries the information about the source code repository that is bound to a repository.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes GetRepoSourceCodeRepo

The operation that you want to perform. Set the value to GetRepoSourceCodeRepo.

InstanceId String Yes cri-shac42yvqzvq****

The ID of the Container Registry instance.

RegionId String Yes cn-hangzhou

The ID of the region.

RepoId String Yes crr-gzsrlevmvoaq****

The ID of the repository.

Response parameters

Parameter Type Example Description
AutoBuild String true

Indicates whether image building is automatically triggered when source code is committed. Valid values:

  • true: Image building is automatically triggered when source code is committed.
  • false: Image building is not triggered when source code is committed.
Code String success

The response code.

CodeRepoDomain String https://github.com

The address of the source code repository.

CodeRepoName String repo

The name of the source code repository.

CodeRepoNamespaceName String namespace

The namespace to which the source code repository belongs.

CodeRepoType String GITHUB

The type of the code hosting platform. Valid values: GITHUB, GITLAB, GITEE, CODE, and CODEUP.

DisableCacheBuild String false

Indicates whether build cache is disabled. Valid values:

  • true: Build cache is disabled.
  • false: Build cache is enabled.
IsSuccess Boolean true

Indicates whether the API call is successful. Valid values:

  • true: successful
  • false: failed
OverseaBuild String false

Indicates whether image building is accelerated for servers outside mainland China. Valid values:

  • true: Image building is accelerated for servers outside mainland China.
  • false: Image building is not accelerated for servers outside mainland China.
RepoId String crr-gzsrlevmvoaq****

The ID of the repository.

RequestId String 4CE1F661-75DD-4EBD-A4AD-057B26834ABB

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetRepoSourceCodeRepo
&InstanceId=cri-shac42yvqzvq****
&RegionId=cn-hangzhou
&RepoId=crr-gzsrlevmvoaq****
&<Common request parameters>

Sample success responses

XML format

<AutoBuild>true</AutoBuild>
<CodeRepoNamespaceName>namespace</CodeRepoNamespaceName>
<IsSuccess>true</IsSuccess>
<DisableCacheBuild>false</DisableCacheBuild>
<CodeRepoDomain>https://github.com</CodeRepoDomain>
<RequestId>4CE1F661-75DD-4EBD-A4AD-057B26834ABB</RequestId>
<CodeRepoName>repo</CodeRepoName>
<OverseaBuild>false</OverseaBuild>
<CodeRepoType>GITHUB</CodeRepoType>
<RepoId>crr-gzsrlevmvoaq****</RepoId>
<Code>success</Code>

JSON format

{
    "AutoBuild": true,
    "CodeRepoNamespaceName": "namespace",
    "IsSuccess": true,
    "DisableCacheBuild": false,
    "CodeRepoDomain": "https://github.com",
    "RequestId": "4CE1F661-75DD-4EBD-A4AD-057B26834ABB",
    "CodeRepoName": "repo",
    "OverseaBuild": false,
    "CodeRepoType": "GITHUB",
    "RepoId": "crr-gzsrlevmvoaq****",
    "Code": "success"
}

Error codes

For a list of error codes, visit the API Error Center.