Tüm Ürünler
Search
Belge Merkezi

:QueryData

Son Güncelleme:Oct 01, 2026

Verileri sorgulamak için bir DataService Studio API'si çağırır.

Operation description

Ön koşullar

Bu işlemi çağırmadan önce DataService Studio içinde bir API oluşturun.

Sınırlamalar

  • Quick BI Professional Edition gerektirir.

  • API çağrısı zaman aşımı: 60 sn. API başına QPS sınırı: 10.

  • Başvurulan veri kümesindeki satır düzeyi izinler API çağrıları için de geçerlidir.

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

quickbi-public:QueryData

get

*All Resource

*

None None

Request parameters

Parameter

Type

Required

Description

Example

ApiId

string

Yes

DataService Studio içindeki API kimliği.

f4cc43bc3***

UserId

string

No

Quick BI kullanıcı kimliği. Bu değeri QueryUserInfoByAccount adresinden alabilirsiniz.

Not

DataService Studio için kullanıcı kimliğini belirtir, satır düzeyi ve sütun düzeyi izin yapılandırmalarıyla birlikte kullanılır.

Önemli

Atlanırsa, boşsa veya null ise varsayılan olarak Quick BI kuruluş sahibinin kullanıcı kimliğini alır.

b5d8fd9348cc4327****afb604

Conditions

string

No

JSON eşleme dizesi olarak filtre koşulları. Her anahtar bir istek parametresi adıdır ve her değer parametre değeridir.

Not:

  • Bir istek parametresinin işleci Enumeration Filter olarak ayarlanmışsa, değer birden fazla değer içerebilir. Bu durumda, değer bir JSON listesi biçiminde olmalıdır. Örneğin: area=["East China","North China","South China"]

  • Tarihler için tarih türüne göre aşağıdaki biçimleri kullanın:

    • Yıl: 2019

    • Çeyrek: 2019Q1

    • Ay: 201901 (başında sıfır ile)

    • Hafta: 2019-52

    • Gün: 20190101

    • Saat: 14:00:00 (dakika ve saniye 00'dır)

    • Dakika: 14:12:00 (saniye 00'dır)

    • Saniye: 14:34:34

{ "area": ["test", "test"], "shopping_date": "2019Q1", }

ReturnFields

string

No

Döndürülecek alan adlarının JSON dizisi.

["area", "city", "price", "date"]

Response elements

Element

Type

Description

Example

object

Success

boolean

İsteğin başarılı olup olmadığını gösterir. Geçerli değerler:

  • true: İstek başarılı oldu.

  • false: İstek başarısız oldu.

true

RequestId

string

İstek kimliği.

a4d1a221d-41za1-****

Result

object

API çağrısının sonucu. Geçerli değerler:

  • true: Çağrı başarılı oldu.

  • false: Çağrı başarısız oldu.

Headers

array<object>

Sütun üstbilgileri.

object

Sütun üstbilgileri.

Aggregator

string

Toplama işleci. Yalnızca ölçü alanları için döndürülür.

  • SUM: Toplam.

  • MAX: Maksimum değer.

  • MIN: Minimum değer.

  • AVG: Ortalama değer.

  • COUNT: Sayım.

  • COUNTD: Benzersiz değerlerin sayısı.

  • STDDEV_POP: Popülasyon standart sapması.

  • STDDEV_SAMP: Örneklem standart sapması.

  • VAR_POP: Popülasyon varyansı.

  • VAR_SAMP: Örneklem varyansı.

SUM

Column

string

Fiziksel tablo alanı adı.

test

DataType

string

Alan veri türü. Yaygın türler:

  • number

  • string

  • date

  • time

  • datetime

string

Granularity

string

Boyut ayrıntı düzeyi. Yalnızca tarih veya coğrafi boyutlar için döndürülür. Geçerli değerler:

  • Tarih ayrıntı düzeyi: yearRegion (yıl), monthRegion (ay), weekRegion (hafta), dayRegion (gün), hourRegion (saat), minRegion (dakika), secRegion (saniye)

  • Coğrafi ayrıntı düzeyi: COUNTRY (ülke), PROVINCE (il), CITY (şehir), XIAN (ilçe/bölge), REGION (bölge)

REGION

Label

string

Alan diğer adı. Her Values eşleme girişinde anahtar olarak kullanılır.

area

Type

string

Alanın bir boyut mu yoksa ölçü mü olduğunu gösterir.

  • Dimension

  • Measure

Dimension

OriginalColumn

string

Veri kümesindeki orijinal alan adı.

area

Sql

string

Sorgu için SQL ifadesi.

Not

Döndürülen SQL, hem bu çağrıdaki filtre koşullarını hem de tüm satır düzeyi veya sütun düzeyi izin kurallarını içerir.

SELECT COMPANY_T_1_.`area` AS D_AREA_2_, COMPANY_T_1_.`city` AS D_CITY_3_, SUM(COMPANY_T_1_.`profit_amt`) AS D_PROFIT_4_ FROM `quickbi_test`.`company_sales_record_copy` AS COMPANY_T_1_ WHERE COMPANY_T_1_.`area` LIKE '%test%' GROUP BY COMPANY_T_1_.`area`, COMPANY_T_1_.`city` HAVING SUM(COMPANY_T_1_.`order_amt`) > 1 LIMIT 0, 10

Values

array<object>

Sorgu sonuçları.

object

Döndürülen veri satırları. Her eşleme, anahtarları Headers#Label alanına karşılık gelen bir satırı temsil eder.

[{"area":"test","city":"test"},{"area":"test","city":"test"}]

Examples

Success response

JSON format

{
  "Success": true,
  "RequestId": "a4d1a221d-41za1-****",
  "Result": {
    "Headers": [
      {
        "Aggregator": "SUM",
        "Column": "test",
        "DataType": "string",
        "Granularity": "REGION",
        "Label": "area",
        "Type": "Dimension",
        "OriginalColumn": "area"
      }
    ],
    "Sql": "SELECT COMPANY_T_1_.`area` AS D_AREA_2_, COMPANY_T_1_.`city` AS D_CITY_3_, SUM(COMPANY_T_1_.`profit_amt`) AS D_PROFIT_4_ FROM `quickbi_test`.`company_sales_record_copy` AS COMPANY_T_1_ WHERE COMPANY_T_1_.`area` LIKE '%test%' GROUP BY COMPANY_T_1_.`area`, COMPANY_T_1_.`city` HAVING SUM(COMPANY_T_1_.`order_amt`) > 1 LIMIT 0, 10",
    "Values": [
      [
        {
          "area": "test",
          "city": "test"
        },
        {
          "area": "test",
          "city": "test"
        }
      ]
    ]
  }
}

Error codes

HTTP status code

Error code

Error message

Description

400 API.No.Permission You are not authorized to call the data service API operation. You are not authorized to call the data service API operation.
400 API.Not.Exist The data service API operation does not exist. The data service API operation does not exist.
400 Cube.Not.Exist The Cube does not exist. The Cube does not exist.
400 Invalid.Parameter.Conditions The specified Conditions is invalid. %s is not defined. The specified Conditions is invalid. %s is not defined.
400 Invalid.Parameter.ReturnFields The specified returnFields is invalid. %s is not defined. The specified returnFields is invalid. %s is not defined.
400 Missing.Conditions The specified Conditions is invalid. You must specify %s. The specified Conditions is invalid. You must specify %s.
400 Missing.Dimension.Measure The dimension or measure %s does not exist in Cube. The dimension or measure %s does not exist in Cube.
400 Rowlevel.Permission.Forbbiden The request is denied by row level permission. The dataset is %s, %s %s. Request forbidden by row level permission, dataset is %s, %s %s.
400 Datasource.Sql.ExecuteFailed Failed to execute the SQL statement in the data source.
400 DataService.InputParam.Error input parameter error: %s. The parameters entered were incorrect: %s.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.