ListSources

Updated at:

Retrieves a list of sources.

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

apig:ListSources

none

*Source

acs:apig:{#regionId}:{#accountId}:source/*

None None

Request syntax

GET /v1/sources HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

gatewayId

string

No

The gateway ID.

gw-cpv4sqdl****

type

string

No

The source type used to filter the query results.

Valid values:

  • K8S :

    container service.

  • MSE_NACOS :

    MSE Nacos

MSE_NACOS

pageNumber

integer

No

The page number. Pages start from 1. Default value: 1.

1

pageSize

integer

No

The number of entries per page. Valid values: 1 to 100. Default value: 10.

10

resourceGroupId

string

No

The resource group ID used to filter results. This parameter is also used for RAM authentication.

rg-xxxx

Response elements

Element

Type

Description

Example

object

Schema of Response

requestId

string

The request ID.

8FA9BB94-915B-5299-A694-49FCC7F5DD00

code

string

The response status code.

Ok

message

string

The response message.

success

data

object

The response data.

pageNumber

integer

The page number.

1

pageSize

integer

The number of entries per page.

10

totalSize

integer

The total number of entries.

10

items

array<object>

The list of sources.

array<object>

The source information.

sourceId

string

The source ID.

src-crdddallhtgtria***

name

string

The source name. If the source type is container service, the name is the container service cluster name. If the source type is MSE Nacos, the name is the Nacos instance name.

itemcenter-dev-cluster

k8sSourceInfo

object

The container service source information.

clusterId

string

The container service cluster ID.

c09212180612a42adbed6a940d01d***

nacosSourceInfo

object

The MSE Nacos source information.

instanceId

string

The Nacos instance ID.

mse_prepaid_public_cn-wuf***

clusterId

string

The NACOS registry cluster ID.

mse-3353***

address

string

The access address of the Nacos instance.

mse-3353***-nacos-ans.mse.aliyuncs.com:8848

associationStatus

string

The association status of the source

ASSOCIATED

associationReason

string

The reason for the association status

Association completed

createTimestamp

integer

The creation timestamp. Unit: milliseconds.

1719386834548

updateTimestamp

integer

The update timestamp. Unit: milliseconds.

1719386834548

resourceGroupId

string

The resource group ID.

rg-xxxx

Examples

Success response

JSON format

{
  "requestId": "8FA9BB94-915B-5299-A694-49FCC7F5DD00",
  "code": "Ok",
  "message": "success",
  "data": {
    "pageNumber": 1,
    "pageSize": 10,
    "totalSize": 10,
    "items": [
      {
        "sourceId": "src-crdddallhtgtria***",
        "name": "itemcenter-dev-cluster",
        "k8sSourceInfo": {
          "clusterId": "c09212180612a42adbed6a940d01d***"
        },
        "nacosSourceInfo": {
          "instanceId": "mse_prepaid_public_cn-wuf***",
          "clusterId": "mse-3353***",
          "address": "mse-3353***-nacos-ans.mse.aliyuncs.com:8848"
        },
        "associationStatus": "ASSOCIATED",
        "associationReason": "Association completed",
        "createTimestamp": 1719386834548,
        "updateTimestamp": 1719386834548,
        "resourceGroupId": "rg-xxxx"
      }
    ]
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.