Modifying the Instance-Level Notification Configuration of a Pipeline
Function
This API is used to modify the instance-level notification configuration of a pipeline.
Calling Method
For details, see Calling APIs.
URI
PUT /v5/{project_id}/api/pipeline-notices/{pipeline_id}/notice/update
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition: Project ID. For details, see Obtaining a Project ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
|
pipeline_id |
Yes |
String |
Definition: Pipeline ID. Obtain the ID by calling the API for querying pipelines. pipelines.pipelineId indicates the pipeline ID. Constraints: N/A Value range: The value consists of 32 characters, including digits and letters. Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
type |
No |
String |
Definition: Notification type. Constraints: N/A Value range:
Default value: N/A |
|
event |
No |
event object |
Definition: Notification event details. Constraints: N/A Value range: N/A Default value: N/A |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
id |
No |
String |
Definition: Notification event type ID. Constraints: N/A Value range: N/A Default value: N/A |
|
selected |
No |
Boolean |
Definition: Whether to enable the notification event type. Constraints: N/A Value range:
Default value: N/A |
|
notice_roles |
No |
Array of strings |
Definition: List of roles to which notifications are sent. Constraints: N/A Value range: N/A Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
error |
ErrorInfo object |
Definition: Error information. If no error is reported, the error field is not returned. Range: N/A |
|
result |
Object |
Definition: Returned result. Range: N/A |
|
status |
String |
Definition: Status value. Value range: N/A |
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Definition: Error code. Value range: N/A |
|
message |
String |
Definition: Error message. Value range: N/A |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
Parameter description: Error message. Value range: N/A |
|
error_code |
String |
Parameter description: Error code. Value range: N/A |
Example Requests
PUT https://(endpoint)/v5/e2e18230a85d4d6ab0b56cb6d2246c18/api/pipeline-notices/0747d5a7099e45f69dc1d099945909a9/notice/update
{
"type" : "2",
"event" : {
"id" : "pipelineRun.failed",
"selected" : true,
"notice_roles" : [ "CREATOR", "EXECUTOR", "COLLECTOR" ]
}
}
Example Responses
Status code: 200
OK
{
"status" : "success"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad request |
|
401 |
Unauthorized |
|
403 |
Forbidden |
|
404 |
Not Found |
Error Codes
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