All Products
Search
Document Center

GetRepoSourceRepo

Last Updated: Jan 22, 2020

Description

You can call this operation to query the source code repository that is linked with an image repository and its build settings.

Request information

Request line

  1. GET /repos/[RepoNamespace]/[RepoName]/sourceRepo HTTP/1.1

Request parameters

Parameter Type Required Description
RepoNamespace String Yes The namespace to which the image repository belongs.
RepoName String Yes The name of the image repository.

Custom request headers

None.

Request body

None.

Response information

Response line

  1. HTTP/1.1 200 OK

Custom response headers

None.

Response body

  1. {
  2. "data": {
  3. "buildConfig": {
  4. "isOversea": Boolean,
  5. "isDisableCache": Boolean,
  6. "isAutoBuild": Boolean
  7. },
  8. "source": {
  9. "sourceRepoDomain": String,
  10. "sourceRepoNamespace": String,
  11. "sourceOriginType": String,
  12. "sourceRepoName": String
  13. }
  14. },
  15. "requestId": String
  16. }

Response body description

Parameter Type Description
isOversea Long Whether servers deployed outside China are used to build images of the repository.
isDisableCache String Whether caching is disabled during the build process.
isAutoBuild Boolean Whether auto build is enabled.
sourceRepoDomain String The domain name of the source code repository.
sourceRepoNamespace String The namespace to which the source code repository belongs.
sourceOriginType String The type of the source code repository.
sourceRepoName String The name of the source code repository.
requestId String The unique ID of the request.

Examples

Sample requests

  1. GET /repos/[RepoNamespace]/[RepoName]/sourceRepo HTTP/1.1
  2. <Common request headers>

Sample responses

  1. HTTP/1.1 200 OK
  2. <Common response headers>
  3. {
  4. "data": {
  5. "buildConfig": {
  6. "isOversea": true,
  7. "isDisableCache": false,
  8. "isAutoBuild": true
  9. },
  10. "source": {
  11. "sourceRepoDomain": "https://github.com",
  12. "sourceRepoNamespace": "testNamespace",
  13. "sourceOriginType": "GITHUB",
  14. "sourceRepoName": "testRepo"
  15. }
  16. },
  17. "requestId": "F5FD4955-E584-4D82-BEB4-0672951355C6"
  18. }