All Products
Search
Document Center

OpenSearch:GetDataSource

Last Updated:Mar 26, 2026

Obtains a data source.

Operation description

Method

GET

URI

/openapi/ha3/instances/{instanceId}/data-sources/{dataSourceName}

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

searchengine:GetDataSource

get

*Instance

acs:searchengine:{#regionId}:{#accountId}:instance/{#InstanceId}

None None

Request syntax

GET /openapi/ha3/instances/{instanceId}/data-sources/{dataSourceName} HTTP/1.1

Path Parameters

Parameter

Type

Required

Description

Example

instanceId

string

No

The instance ID.

ha-cn-pl32rf0****

dataSourceName

string

No

The name of the data source.

ha-cn-pl32rf0****_test_api

Request parameters

Parameter

Type

Required

Description

Example

No parameters required.

Sample requests

GET /openapi/ha3/instances/ha3_instances_id/data-sources/my_data_source

Response elements

Element

Type

Description

Example

object

The response parameters.

requestId

string

Id of the request

FE03180A-0E29-5474-8A86-33F0683294A4

result

object

The information about the data source.

name

string

The name of the data source.

ha-cn-pl32rf0****_test_api

type

string

The type of the data source

odps

domain

string

The data center where the data source is deployed in offline mode

vpc_hz_domain_1

indexes

array

The list of index information

string

The index table

index1

lastFulTime

integer

The time when the full data of the data source was last queried.

1718787219

status

string

The status of the data source. Valid values: new: The data source is being created. publish: The data source is in the normal state. trash: The data source is being deleted.

new

ResponseExample

{
  "requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
  "result": {
    "name": "data_source_name",
    "type": "odps",
    "domain": "test",  // Offline deployment    
    "indexes": [
      "index1",
      "index2"
    ],
    "partitions": [
      "ds=2020",
      "ds=2021"
    ],
    "lastFulTime": 1628502036000,
    "config":{
      "accessKey": "xxx",
      "accessSecret": "xxxs",
      "project":"xxxx",
      "table":"xxx",
      "partition":"xxxx"
    },
    "autoBuildIndex": true,
    "status": "new"	   // new: Createin; publish: normal; trash: Deletein
   
  }
}

Examples

Success response

JSON format

{
  "requestId": "FE03180A-0E29-5474-8A86-33F0683294A4",
  "result": {
    "name": "ha-cn-pl32rf0****_test_api",
    "type": "odps",
    "domain": "vpc_hz_domain_1",
    "indexes": [
      "index1"
    ],
    "lastFulTime": 1718787219,
    "status": "new"
  }
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.