Querying Details About a Trigger
Description
Query details about a trigger.
Constraints
None
API Calling
For details, see Calling APIs.
URI
GET /v2/manage/namespaces/{namespace}/repos/{repository}/triggers/{trigger}
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. Enter 1 to 128 characters. It must start and end with a lowercase letter or digit. Only lowercase letters, digits, periods (.), slashes (/), underscores (_), and hyphens (-) are allowed. Periods, slashes, underscores, and hyphens cannot be placed next to each other. A maximum of two consecutive underscores are allowed. Replace a slash (/) with a dollar sign ($) before you send the request. |
trigger |
Yes |
String |
Trigger name. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Message body type (format). The value can be application/json or charset=utf-8 application/json. Default value: 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 |
---|---|---|
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/{trigger}
Example Response
Status code: 200
Query succeeded.
{ "action" : "update", "app_type" : "deployments", "application" : "cce-deployment-20204161", "cluster_id" : "", "cluster_name" : "", "cluster_ns" : "cce-namespace-21539491", "condition" : ".*", "container" : "", "created_at" : "2020-04-16T01:35:08.639589Z", "creator_name" : "paas_swr_z00232859", "enable" : "true", "name" : "test", "trigger_history" : [ { "action" : "update", "app_type" : "deployments", "application" : "cce-deployment-20204161", "cluster_id" : "", "cluster_name" : "", "cluster_ns" : "", "condition" : ".*", "container" : "", "created_at" : "2020-04-16T01:36:36.155119Z", "creator_name" : "************", "detail" : "xxxxxxxxxxxxxx", "result" : "failed", "tag" : "test" } ], "trigger_mode" : "cce", "trigger_type" : "all" }
Status Codes
Status Code |
Description |
---|---|
200 |
Query succeeded. |
400 |
Request error. |
401 |
Authentication failed. |
404 |
The organization, image repository, or trigger was not found. |
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.