Queries the information about the source code repository that is bound to an image 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-123456

The ID of the Container Registry Enterprise Edition instance.

RegionId String Yes cn-hangzhou

The ID of the region.

RepoId String Yes crr-123456

The ID of the image repository.

Response parameters

Parameter Type Example Description
AutoBuild String true

Indicates whether image building is triggered when the source code is committed.

Code String success

The return 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 source code hosting platform. Valid values: GITHUB, GITLAB, GITEE, CODE, and CODEUP.

DisableCacheBuild String false

Indicates whether images are built without using the cache.

IsSuccess Boolean true

Indicates whether the call was successful.

OverseaBuild String false

Indicates whether images are built on servers outside mainland China for acceleration.

RepoId String crr-123456

The ID of the image repository.

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

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetRepoSourceCodeRepo
&InstanceId=cri-123456
&RegionId=cn-hangzhou
&RepoId=crr-123456
&<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-123456</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-123456",
    "Code": "success"
}

Error codes

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