Queries image build rules of a repository.
Request information
Request line
GET /repos/[RepoNamespace]/[RepoName]/rules HTTP/1.1
Request line parameters
Parameter | Type | Required | Description |
---|---|---|---|
RepoNamespace | String | Yes | The namespace to which the repository belongs. The name of the namespace must be 2 to 30 characters in length, and can contain lowercase letters, digits, hyphens (-), and underscores (_). It must not start with a hyphen or an underscore. |
RepoName | String | Yes | The name of the repository. The name must be 1 to 64 characters in length, and can contain lowercase letters, digits, hyphens (-), and underscores (_). It must not start with a hyphen or an underscore. |
Operation-specific request headers
None.
Request body
None.
Response information
Response line
HTTP/1.1 200 OK
Operation-specific response headers
None.
Response body
{
"data":{
"buildRules":[
{
"dockerfileName": "String",
"dockerfileLocation": "String",
"buildRuleId": Long,
"imageTag": "String",
"pushName": "String",
"pushType": "String"
}
]
},
"requestId": "String"
}
Response body parameters
Parameter | Type | Description |
---|---|---|
dockerfileName | String | The name of the Dockerfile in the source code repository based on which the image was built. |
dockerfileLocation | String | The path of the Dockerfile in the source code repository based on which the image was built. |
buildRuleId | Long | The ID of the image build task. |
imageTag | String | The version of the image. |
pushName | String | The name of the code branch in the source code repository based on which the image was built. |
pushType | String | The type of code branch in the source code repository based on which the image was built. |
Examples
Sample requests
GET /repos/[RepoNamespace]/[RepoName]/rules HTTP/1.1
<Common request headers>
Sample responses
HTTP/1.1 200 OK
<Common response headers>
{
"data":{
"buildRules":[
{
"dockerfileName": "Dockerfile",
"dockerfileLocation": "/",
"buildRuleId": 128420,
"imageTag": "1",
"pushName": "master",
"pushType": "GIT_BRANCH"
},
{
"dockerfileName": "Dockerfile",
"dockerfileLocation": "/",
"buildRuleId": 129494,
"imageTag": "2",
"pushName": "master",
"pushType": "GIT_BRANCH"
}
]
},
"requestId":"2F4FB6FD-4D1F-4459-A2AF-169CED0AAEE8"
}