Obtaining the Trigger List of a Specific Image Repository
Description
Obtains the trigger list of a specific image repository.
Constraints
None
API Calling
For details, see Calling APIs.
URI
GET /v2/manage/namespaces/{namespace}/repos/{repository}/triggers
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
namespace |
Yes |
String |
Organization name. Enter 1 to 64 characters, starting with a lowercase letter and ending with a lowercase letter or digit. Only lowercase letters, digits, periods (.), underscores (_), and hyphens (-) are allowed. Periods, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. |
repository |
Yes |
String |
Image repository name. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). The value can be application/json;charset=utf-8 application/json The default value is application/json. |
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
[Array] |
Array of Trigger objects |
Trigger list. |
Parameter |
Type |
Description |
---|---|---|
action |
String |
Action to trigger. The value is update. |
app_type |
String |
Application type. The value can be deployments or statefulsets. |
application |
String |
Application name. |
cluster_id |
String |
Cluster ID. When trigger_mode is set to cci, leave this parameter blank. |
cluster_name |
String |
Cluster name. When trigger_mode is set to cci, leave this parameter blank. |
cluster_ns |
String |
Namespace where the application is located. |
condition |
String |
Trigger condition. If type is set to all, the value is .*. If type is set to tag, the value is a tag name. If type is set to regular, the value is a regular expression. |
container |
String |
Name of the container to be updated. By default, all containers using this image are updated. |
created_at |
String |
Creation time. |
creator_name |
String |
Creator. |
enable |
String |
Whether to enable the trigger. |
name |
String |
Trigger name. |
trigger_history |
Array of TriggerHistories objects |
Trigger history. |
trigger_mode |
String |
Trigger type. The value can be cce or cci. |
trigger_type |
String |
Trigger condition. The value can be all, tag, or regular. |
Parameter |
Type |
Description |
---|---|---|
action |
String |
Action to trigger. The value is update. |
app_type |
String |
Application type. The value can be deployments or statefulsets. |
application |
String |
Application name. |
cluster_id |
String |
Cluster ID. When trigger_mode is set to cci, leave this parameter blank. |
cluster_name |
String |
Cluster name. When trigger_mode is set to cci, leave this parameter blank. |
cluster_ns |
String |
Namespace where the application is located. |
condition |
String |
Trigger condition. If type is set to all, the value is .*. If type is set to tag, the value is a tag name. If type is set to regular, the value is a regular expression. |
container |
String |
Name of the container to be updated. By default, all containers using this image are updated. |
created_at |
String |
Creation time. |
creator_name |
String |
Creator. |
detail |
String |
Details. |
result |
String |
Update result. The value can be success or failed. |
tag |
String |
Triggered version number. |
Example Request
GET https://{endpoint}/v2/manage/namespaces/{namespace}/repos/{repository}/triggers
Example Response
Status code: 200
Query succeeded.
[ { "action" : "update", "app_type" : "deployments", "application" : "abcde", "cluster_id" : "******************", "cluster_name" : "test123", "cluster_ns" : "default", "condition" : ".*", "container" : "", "created_at" : "2020-04-16T02:04:55.922236Z", "creator_name" : "************", "enable" : "true", "name" : "test1", "trigger_history" : null, "trigger_mode" : "cce", "trigger_type" : "all" } ]
Status Codes
Status Code |
Description |
---|---|
200 |
Query succeeded. |
400 |
Request error. |
401 |
Authentication failed. |
404 |
The organization or the repository does not exist. |
500 |
Internal error. |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot