ListSubscriptions

Updated at:

Queries subscriptions.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

cms:ListSubscriptions

list

*Subscription

acs:cms:{#regionId}:{#accountId}:subscription/*

None None

Request syntax

GET /subscriptions HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

subscriptionName

string

No

The name of the subscription.

Test subscription

subscriptionId

string

No

The ID of the subscription.

123123123123

enable

boolean

No

Specifies whether the subscription is enabled.

false

workspace

string

No

The name of the workspace.

workspace-test

nextToken

string

No

The pagination token.

2-3408-4595-9d80-****

maxResults

integer

No

The maximum number of results per page.

10

direction

string

No

The sort order of the returned versions. Valid values:

  • asc: ascending order

  • desc: descending order

asc

orderBy

string

No

The sort field.

id

subscriptionType

string

No

The type of the subscription. Valid values:

  • NORMAL: standard subscription

  • AI_AGENT: AI agent subscription

NORMAL

notifyStrategyUuid

string

No

The UUID of the notification policy. This parameter is used to filter subscriptions that are bound to a specific notification policy. The value is a 32-character string.

1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d

unbound deprecated

boolean

No

[Deprecated] This is an internal reserved parameter. Do not use this parameter.

true

agentUuid

string

No

The UUID of the AI agent. This parameter is used to filter subscriptions of a specific AI agent.

agent-rca-001

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The ID of the request.

123-123-234-345-123

subscriptionList

array

The list of subscriptions.

SubscriptionForView

The subscription object.

nextToken

string

The pagination token.

2-3408-4595-9d80-****

maxResults

integer

The maximum number of records returned in the current request.

10

Examples

Success response

JSON format

{
  "requestId": "123-123-234-345-123",
  "subscriptionList": [
    {
      "createTime": "2025-03-11T08:21:58Z",
      "description": "workspace test",
      "enable": false,
      "subscriptionName": "SubscriptionTest",
      "notifyStrategyId": "23123123",
      "updateTime": "2025-05-23T02:29:02Z",
      "userId": "123123123",
      "subscriptionId": "123123123123",
      "workspace": "workspace-test",
      "filterSetting": {
        "conditions": [
          {
            "field": "labels.alertname\t",
            "op": "EQ",
            "value": "CRITICAL"
          }
        ],
        "expression": "1 and 2 or 3",
        "relation": "AND"
      },
      "pushingSetting": {
        "templateUuid": "123123123",
        "alertActionIds": [
          "123123123"
        ],
        "restoreActionIds": [
          "123123123"
        ],
        "responsePlanId": "123123123"
      },
      "syncFromType": "\"ARMS\"",
      "workspaceFilterSetting": {
        "tagSelector": {
          "conditions": [
            {
              "field": "labels.alertname\t",
              "op": "EQ",
              "value": "CRITICAL"
            }
          ],
          "expression": "1 and 2 or 3",
          "relation": "AND"
        },
        "workspaceUuids": [
          "\"ws-abc123\""
        ]
      },
      "subscriptionType": "NORMAL",
      "agentConfig": {
        "agentUuid": "agent-uuid-001",
        "routes": [
          {
            "channels": [
              {
                "channelType": "default",
                "receivers": [
                  "my-contact"
                ],
                "enabledSubChannels": [
                  "SMS"
                ]
              }
            ],
            "effectTimeRange": {
              "timeZone": "1700000000",
              "dayInWeek": [
                1
              ],
              "startTimeInMinute": 1,
              "endTimeInMinute": 1
            }
          }
        ]
      },
      "subscribeLegacyEvent": false
    }
  ],
  "nextToken": "2-3408-4595-9d80-****",
  "maxResults": 10
}

Error codes

HTTP status code

Error code

Error message

Description

400 ParameterInvalid The parameter is missing or invalid. %s The parameter is missing or invalid.
500 InternalUnknownError The request processing has failed due to some unknown error. A service runtime error occurred.
403 Forbidden You are not authorized to operate the specified resource. No permission, please use RAM to authorize
404 ResourceNotFound The specified resource is not found. The specified resource is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.