Help Center/ DataArts Fabric/ API Reference/ APIs/ Message Management/ Querying the Notification Policy List
Updated on 2025-09-15 GMT+08:00

Querying the Notification Policy List

Function

This API is used to query notification policies. You can call this API to query the created notification policies. The API supports paginated queries based on the provided workspace ID and message matching pattern. This API is synchronous with no accompanying APIs or specific scenarios.

URI

GET /v1/workspaces/{workspace_id}/messages

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

workspace_id

Yes

String

Definition: Workspace ID. For how to obtain a workspace ID, see [Obtaining a Workspace ID] (dataartsfabric_03_0022.xml).

Constraints: N/A.

Range: 1 to 36 characters. Only letters, digits, and hyphens (-) are allowed.

Default Value: N/A.

Table 2 Query Parameters

Parameter

Mandatory

Type

Description

offset

No

Integer

Definition: Offset where a query starts.

Constraints: N/A.

Range: [0, 1000000000].

Default Value: 0

limit

No

Integer

Definition: Maximum number of records returned on each page.

Constraints: N/A.

Range: [1, 100].

Default Value: 10.

message_type

No

String

Definition: Message type.

Constraints: The value cannot be changed.

Range: job: job execution result message.

Default Value: N/A.

name_pattern

No

String

Definition: Name pattern.

Constraints: Fuzzy match is supported. The value is case-sensitive.

Range: N/A.

Default Value: N/A.

notify_type

No

String

Definition: Message type.

Constraints: N/A.

Range:

  • SUCCESS: successful notification;

  • FAILED: failed notification.

Default Value: N/A.

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

No

String

Definition: Tenant token. It is used for API calling authentication. For how to obtain a token, see [Authentication] (dataartsfabric_03_0005.xml).

Constraints: N/A.

Range: Up to 65,534 characters.

Default Value: N/A.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total

Integer

Definition: Total number of notification policies that meet the filter criteria.

Constraints: N/A.

Range: [0, 10000].

Default Value: N/A.

policies

Array of MessageNotificationPolicy objects

Definition: Notification policy list.

Constraints: [0, 10000].

Table 5 MessageNotificationPolicy

Parameter

Type

Description

id

String

Definition: Notification policy ID.

Constraints: N/A.

Range: N/A.

Default Value: N/A.

message_type

String

Definition: Message type.

Constraints: N/A.

Range:

  • job: job execution result.

Default Value: job.

name_pattern

String

Definition: Name pattern, which is used to match all messages that match this pattern within the message type. For example, if message_type is set to job and name_pattern is set to ray_job*, all messages sent by jobs starting with ray_job are matched.

Constraints: N/A.

Range: N/A.

Default Value: N/A.

notification_types

Array of strings

Definition: Notification type. SUCCESS: successful notification; FAILED: failed notification.

Constraints: [1, 2].

topic_urn

String

Definition: Notification topic.

Constraints: N/A.

Range: N/A.

Default Value: N/A.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Constraints: N/A.

Range: 8 to 36 characters.

Default Value: N/A.

error_msg

String

Definition: Error message.

Constraints: N/A.

Range: 2 to 512 characters.

Default Value: N/A.

solution_msg

String

Definition: Solution description.

Constraints: N/A.

Range: 0 to 4,096 characters.

Default Value: N/A.

Status code: 401

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Constraints: N/A.

Range: 8 to 36 characters.

Default Value: N/A.

error_msg

String

Definition: Error message.

Constraints: N/A.

Range: 2 to 512 characters.

Default Value: N/A.

solution_msg

String

Definition: Solution description.

Constraints: N/A.

Range: 0 to 4,096 characters.

Default Value: N/A.

Status code: 404

Table 8 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Constraints: N/A.

Range: 8 to 36 characters.

Default Value: N/A.

error_msg

String

Definition: Error message.

Constraints: N/A.

Range: 2 to 512 characters.

Default Value: N/A.

solution_msg

String

Definition: Solution description.

Constraints: N/A.

Range: 0 to 4,096 characters.

Default Value: N/A.

Status code: 408

Table 9 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Constraints: N/A.

Range: 8 to 36 characters.

Default Value: N/A.

error_msg

String

Definition: Error message.

Constraints: N/A.

Range: 2 to 512 characters.

Default Value: N/A.

solution_msg

String

Definition: Solution description.

Constraints: N/A.

Range: 0 to 4,096 characters.

Default Value: N/A.

Status code: 500

Table 10 Response body parameters

Parameter

Type

Description

error_code

String

Definition: Error code.

Constraints: N/A.

Range: 8 to 36 characters.

Default Value: N/A.

error_msg

String

Definition: Error message.

Constraints: N/A.

Range: 2 to 512 characters.

Default Value: N/A.

solution_msg

String

Definition: Solution description.

Constraints: N/A.

Range: 0 to 4,096 characters.

Default Value: N/A.

Example Requests

GET https://{endpoint}/v1/workspaces/{workspace_id}/messages

Example Responses

Status code: 200

The notification policy list is queried.

{
  "total" : 1,
  "policies" : [ {
    "id" : "ray_job_123456789",
    "message_type" : "job",
    "name_pattern" : "ray_job*",
    "notification_types" : [ "SUCCESS", "FAILED" ],
    "topic_urn" : "smn:topic:xxxxxxx"
  } ]
}

Status code: 400

BadRequest

{
  "error_code" : "common.01000001",
  "error_msg" : "failed to read http request, please check your input, code: 400, reason: Type mismatch., cause: TypeMismatchException"
}

Status code: 401

Unauthorized

{
  "error_code" : "APIG.1002",
  "error_msg" : "Incorrect token or token resolution failed"
}

Status code: 403

Forbidden

{
  "error" : {
    "code" : "403",
    "message" : "X-Auth-Token is invalid in the request",
    "title" : "Forbidden"
  },
  "error_code" : 403,
  "error_msg" : "X-Auth-Token is invalid in the request",
  "title" : "Forbidden"
}

Status code: 404

NotFound

{
  "error_code" : "common.01000001",
  "error_msg" : "response status exception, code: 404"
}

Status code: 408

Request Time-out

{
  "error_code" : "common.00000408",
  "error_msg" : "timeout exception occurred"
}

Status code: 500

InternalServerError

{
  "error_code" : "common.00000500",
  "error_msg" : "internal error"
}

Status Codes

Status Code

Description

200

The notification policy list is queried.

400

BadRequest

401

Unauthorized

403

Forbidden

404

NotFound

408

Request Time-out

500

InternalServerError

Error Codes

See Error Codes.