Help Center/ CodeArts Check/ API Reference/ APIs/ Task Management/ Querying the Notification Configurations of a Tenant or Project
Updated on 2026-02-03 GMT+08:00

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

Table 1 Query Parameters

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

Table 2 Request header 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

Table 3 Response body parameters

Parameter

Type

Description

result

result object

Message notification configuration.

httpStatus

String

Definition:

HTTP response status.

Value range:

  • OK: The request has been successfully processed, and the server returns the requested resource or operation result.

  • ACCEPTED: The request has been accepted by the server, but the processing is not complete (usually used for asynchronous operations).

  • INTERNAL_SERVER_ERROR: internal API exception.

  • BAD_REQUEST: abnormal parameter verification.

status

String

Definition:

API response status.

Value range:

  • success: successful response.

  • error: response failed.

Table 4 result

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.

Table 5 NotificationRule

Parameter

Type

Description

eventType

String

Definition:

Event type, which indicates a specific event.

Value range:

  • codeGateFailed: A notification is sent when a gate check task failed.

  • taskDeleted: A notification is sent when a task is deleted.

  • taskExecuteCompleted: A notification is sent when a task is complete.

sendMail

Integer

Definition:

Whether email notifications are sent.

Value range:

  • 1: Send email notifications.

  • 0: Do not send email notifications.

sendMessage

Integer

Definition:

Whether to send system notifications.

Value range:

  • 1: Send system notifications.

  • 0: Do not send system notifications.

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:

  • 1: Send notifications to specific roles.

  • 0: Do not send notifications to specific roles.

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:

  • 1: Send notifications to specific roles.

  • 0: Do not send notifications to specific roles.

Status code: 400

Table 6 Response body parameters

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

Table 7 Response body parameters

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.