Querying the Notification Configurations of a Tenant or Project
Function
This API is usd to query the configurations of system and email notifications of different event types in a tenant or project based on the tenant ID or task ID.
Calling Method
For details, see Calling APIs.
Authorization Information
Each account root user has all the permissions required to call all APIs, but IAM users must be assigned the following required identity policy-based permissions. For details about the required permissions, see Permissions Policies and Supported Actions.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
codeartscheck::getProjectConfig |
Read |
- |
codeartscheck:ProjectId |
- |
- |
URI
GET /v2/transmission/notification
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
domain_id |
No |
String |
Definition: Tenant ID, which is the same as the IAM tenant ID. Constraints: N/A Value range: 1 to 128 characters, including letters and digits. Default value: N/A |
|
project_id |
No |
String |
Definition : 32-character project UUID. Obtain it by calling the API used to query the project list. Constraints: N/A Value range: 1 to 128 characters, including letters and digits. Default value: N/A |
|
is_check_project |
Yes |
Integer |
Definition: Whether to query the project configuration. 1: query the notification configuration of the project. 0: query the notification configuration of the tenant. Constraints: N/A Value range: 0, 1 Default value: N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
Definition : User token. Obtain one by calling the IAM API Obtaining a User Token. The value of X-Subject-Token in the response header is a token. Constraints: N/A Value range: 1–100,000 characters. Default value: N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
result |
result object |
Message notification configuration. |
|
httpStatus |
String |
Definition: HTTP response status. Value range: |
|
status |
String |
Definition: API response status. Value range: |
|
Parameter |
Type |
Description |
|---|---|---|
|
codeGateFailed |
NotificationRule object |
Definition: Notification configuration when the gate check fails. |
|
deleteTask |
NotificationRule object |
Definition: Notification configuration when a task is deleted. |
|
executeTask |
NotificationRule object |
Definition: Notification configuration when the task execution is complete. |
|
Parameter |
Type |
Description |
|---|---|---|
|
eventType |
String |
Definition: Event type, which indicates a specific event. Value range: |
|
sendMail |
Integer |
Definition: Whether email notifications are sent. Value range: |
|
sendMessage |
Integer |
Definition: Whether to send system notifications. Value range: |
|
roles |
String |
Definition: List of roles that receive notifications. Range: Developer, Committer, Operation manager, Product manager, Participant, Project manager, project_admin, System engineer, Test manager, Viewer, Tester, and customized roles. |
|
sendRolesEnable |
Integer |
Definition: Whether to send notifications to specific roles. Value range: |
|
userIds |
String |
Definition: IDs of users who receive notifications. Use commas (,) to separate multiple user IDs. Range: Max. 500 characters. |
|
sendUsersEnable |
Integer |
Definition: Tips: No notification is sent to users. Value range: |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition: Error code. Value range: N/A |
|
error_msg |
String |
Definition: Error message. Value range: N/A |
Status code: 401
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Definition: Error code. Value range: N/A |
|
error_msg |
String |
Definition: Error message. Value range: N/A |
Example Requests
Query the notification configuration of project aaaaaaaa.
GET https://{endpoint}/v2/transmission/notification?is_check_project=1&project_id=aaaaaaaa&domain_id=bbbbbbb
Example Responses
Status code: 400
Bad Request
{
"error_code" : "CC.xxxxxxxx.400",
"error_msg" : "Verify request parameter failed. Check whether the request parameters are correct."
}
Status code: 401
Unauthorized
{
"error_code" : "CC.00000003",
"error_msg" : "Authentication information expired."
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The notification configuration of a tenant or project is queried. |
|
400 |
Bad Request |
|
401 |
Unauthorized |
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