All Products
Search
Document Center

GetRepoBuildRuleList

Last Updated: Jan 22, 2020

Description

You can call this operation to query the build rules of an image repository.

Request information

Request line

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

Request parameters

Parameter Type Required Description
RepoNamespace String Yes The namespace to which the image repository belongs. The name must be [2 to 30] characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (). It cannot start with a hyphen (-) or an underscore ().
RepoName String Yes The name of the image repository. The name must be [1 to 64] characters in length and can contain lowercase letters, digits, hyphens (-), and underscores (). It cannot start with a hyphen (-) or an underscore ().

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. "buildRules":[
  4. {
  5. "dockerfileName": "String",
  6. "dockerfileLocation": "String",
  7. "buildRuleId": Long,
  8. "imageTag": "String",
  9. "pushName": "String",
  10. "pushType": "String"
  11. }
  12. ]
  13. },
  14. "requestId": "String"
  15. }

Response body description

Parameter Type Description
dockerfileName String The name of the Dockerfile of the source code repository based on which the image is built.
dockerfileLocation String The path to the Dockerfile of the source code repository based on which the image is built.
buildRuleId Long The ID of the build rule.
imageTag String The version of the image.
pushName String The name of the push.
pushType String The type of the push.

Examples

Sample requests

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

Sample responses

  1. HTTP/1.1 200 OK
  2. <Common response headers>
  3. {
  4. "data":{
  5. "buildRules":[
  6. {
  7. "dockerfileName": "Dockerfile",
  8. "dockerfileLocation": "/",
  9. "buildRuleId": 128420,
  10. "imageTag": "1",
  11. "pushName": "master",
  12. "pushType": "GIT_BRANCH"
  13. },
  14. {
  15. "dockerfileName": "Dockerfile",
  16. "dockerfileLocation": "/",
  17. "buildRuleId": 129494,
  18. "imageTag": "2",
  19. "pushName": "master",
  20. "pushType": "GIT_BRANCH"
  21. }
  22. ]
  23. },
  24. "requestId":"2F4FB6FD-4D1F-4459-A2AF-169CED0AAEE8"
  25. }