GetMetaQueryStatus

更新时间:
复制 MD 格式

Call GetMetaQueryStatus to query the status, retrieval mode, and configured parameters of meta query for a specified bucket.

Usage notes

  • By default, an Alibaba Cloud account can query the status and configuration of meta query. For a RAM user to perform this query, you must grant the oss:MetaQuery permission to the RAM user.

  • If meta query is not enabled for the bucket or is in the cleanup process after being disabled, the operation returns MetaQueryNotExist (HTTP 404).

  • The response includes the RouteRule, IndexOptions, NotificationAttributes, DatasetConfig, Filters, and WorkflowParameters elements only if their corresponding settings were configured when you called the OpenMetaQuery operation. The WorkflowParameters element is returned for backward compatibility and displays the configuration of basic workflow switches.

Request syntax

POST /?metaQuery&action=getMetaQueryStatus HTTP/1.1
Host: BucketName.oss-cn-hangzhou.aliyuncs.com
Date: GMT Date
Authorization: SignatureValue

Request headers

This operation uses only common request headers. For more information, see Common request headers.

Request body

This operation does not have a request body.

Response headers

This operation uses only common response headers. For more information, see Common response headers.

Response body

Parameter

Type

Required

Example

Description

MetaQueryStatus

container

Yes

N/A

A container for the meta query status and configuration.

Child nodes: State, Phase, CreateTime, UpdateTime, MetaQueryMode, WorkflowParameters, Filters, NotificationAttributes, DatasetConfig, IndexOptions, and RouteRule

State

string

Yes

Running

The current status of meta query. Valid values:

  • Ready: Initializing.

  • Running: In service.

  • Stop: Stopped.

  • Retrying: Retrying after an exception.

  • Failed: Initialization failed.

  • Deleted: Disabled or being cleaned up.

Parent node: MetaQueryStatus

Phase

string

No

IncrementalScanning

The current scanning phase. Valid values:

  • FullScanning: A full scan of existing objects is in progress.

  • IncrementalScanning: The full scan is complete, and subsequent incremental events are being tracked.

Parent node: MetaQueryStatus

CreateTime

string

Yes

2026-05-20T08:00:00.000+08:00

The time when meta query was first enabled. The value is in RFC 3339 format.

Parent node: MetaQueryStatus

UpdateTime

string

Yes

2026-05-20T08:30:00.000+08:00

The time when the configuration was last updated. The value is in RFC 3339 format.

Parent node: MetaQueryStatus

MetaQueryMode

string

Yes

semantic

The retrieval mode. Valid values:

  • basic: scalar retrieval

  • semantic: vector retrieval

Parent node: MetaQueryStatus

WorkflowParameters

container

No

N/A

A container for workflow parameters. This element is returned for backward compatibility to display the basic AI content awareness switches configured when you called the OpenMetaQuery operation. For new features, use DatasetConfig.

Child node: WorkflowParameter

Parent node: MetaQueryStatus

WorkflowParameter

container

No

N/A

A container for a single workflow parameter.

Child nodes: Name and Value

Parent node: WorkflowParameters

Name

string

No

VideoInsightEnable

The name of the workflow parameter. Valid values:

  • VideoInsightEnable: Enables or disables video content awareness.

  • ImageInsightEnable: Enables or disables image content awareness.

  • UserDefinedLabelsEnable: Enables or disables user-defined labels.

Parent node: WorkflowParameter

Value

string

No

True

The value of the workflow parameter. Valid values:

  • True: Enabled.

  • False: Disabled.

Parent node: WorkflowParameter

Filters

container

No

N/A

A container for filter conditions. This element displays the filter rules configured in the OpenMetaQuery operation.

Child node: Filter

Parent node: MetaQueryStatus

Filter

string

No

Size > 1024

A single filter condition expression.

Parent node: Filters

NotificationAttributes

container

No

N/A

A container for message notification configurations. This element displays the MNS notification settings configured in the OpenMetaQuery operation.

Child nodes: Notifications and WithFields

Parent node: MetaQueryStatus

Notifications

container

No

N/A

A container for message notification configurations.

Child node: Notification

Parent node: NotificationAttributes

Notification

container

No

N/A

A container for a single message notification configuration.

Child node: MNS

Parent node: Notifications

MNS

string

No

imm-index-notification

The name of the MNS topic.

Parent node: Notification

WithFields

container

No

N/A

A container for message notification fields. This element displays which fields are included in the message notification.

Child node: WithField

Parent node: NotificationAttributes

WithField

string

No

Insights

The fields to include in the message notification. Valid values:

  • Insights: A brief description of the file generated from AI analysis.

  • Labels: The tags identified for the file from AI analysis.

Parent node: WithFields

DatasetConfig

container

No

N/A

A container for dataset-level configurations. This element displays the detailed content awareness settings and dataset-level smart grouping rules configured in the OpenMetaQuery operation. For more information about the fields, see DatasetConfig data structure.

Parent node: MetaQueryStatus

IndexOptions

container

No

N/A

A container for index options. This element displays the indexing behaviors configured in the OpenMetaQuery operation.

Child nodes: IgnoreObjectDelete and IgnoreEvents

Parent node: MetaQueryStatus

IgnoreObjectDelete

string

No

True

Valid values:

  • True: An object's metadata is not automatically removed from the index when the object is deleted.

  • False: The metadata is removed from the index when the object is deleted.

Parent node: IndexOptions

IgnoreEvents

container

No

N/A

A list of OSS event types to ignore.

Child node: IgnoreEvent

Parent node: IndexOptions

IgnoreEvent

string

No

ObjectRemoved:*

An OSS event type to ignore.

Parent node: IgnoreEvents

RouteRule

container

No

N/A

A container for routing rules. This element displays the multi-dataset routing rules configured in the OpenMetaQuery operation.

Child nodes: Type, AutoCreateDataset, and OSSTagKey

Parent node: MetaQueryStatus

Type

string

No

OSSTag

The routing type. Valid values:

  • default: Rule-based routing is not used.

  • OSSTag: Routes objects to a dataset that has the same name as the value of a specified object tag.

Parent node: RouteRule

AutoCreateDataset

string

No

True

Specifies whether to automatically create a dataset if the target dataset, determined by the object tag, does not exist. Valid values are True and False.

Parent node: RouteRule

OSSTagKey

string

No

routing-dataset

The key of the OSS object tag used for routing.

Parent node: RouteRule

Examples

Request example

POST /?metaQuery&action=getMetaQueryStatus HTTP/1.1
Host: oss-example.oss-cn-hangzhou.aliyuncs.com
Date: Wed, 20 May 2026 08:30:00 GMT
Authorization: OSS4-HMAC-SHA256 Credential=LTAI********************/20260520/cn-hangzhou/oss/aliyun_v4_request,Signature=a7c3554c729d71929e0b84489addee6b2e8d5cb48595adfc51868c299c0c218e

Response examples

In basic mode:

HTTP/1.1 200 OK
x-oss-request-id: 64C8B6F4E7C5A3A8B9D6E7F1
Date: Wed, 20 May 2026 08:30:01 GMT
Content-Type: application/xml
Server: AliyunOSS

<?xml version="1.0" encoding="UTF-8"?>
<MetaQueryStatus>
  <State>Running</State>
  <Phase>IncrementalScanning</Phase>
  <CreateTime>2026-05-20T08:00:00.000+08:00</CreateTime>
  <UpdateTime>2026-05-20T08:10:00.000+08:00</UpdateTime>
  <MetaQueryMode>basic</MetaQueryMode>
</MetaQueryStatus>

In semantic mode, including RouteRule, IndexOptions, NotificationAttributes, and DatasetConfig:

HTTP/1.1 200 OK
x-oss-request-id: 64C8B6F4E7C5A3A8B9D6E7F3
Date: Wed, 20 May 2026 08:30:01 GMT
Content-Type: application/xml
Server: AliyunOSS

<?xml version="1.0" encoding="UTF-8"?>
<MetaQueryStatus>
  <State>Running</State>
  <Phase>IncrementalScanning</Phase>
  <CreateTime>2026-05-20T08:00:00.000+08:00</CreateTime>
  <UpdateTime>2026-05-20T08:30:00.000+08:00</UpdateTime>
  <MetaQueryMode>semantic</MetaQueryMode>
  <Filters>
    <Filter>Size > 1024</Filter>
    <Filter>Filename prefix (cGhvdG9zLw==)</Filter>
  </Filters>
  <IndexOptions>
    <IgnoreObjectDelete>True</IgnoreObjectDelete>
  </IndexOptions>
  <RouteRule>
    <Type>OSSTag</Type>
    <AutoCreateDataset>True</AutoCreateDataset>
    <OSSTagKey>routing-dataset</OSSTagKey>
  </RouteRule>
  <NotificationAttributes>
    <Notifications>
      <Notification>
        <MNS>imm-index-notification</MNS>
      </Notification>
    </Notifications>
    <WithFields>
      <WithField>Insights</WithField>
      <WithField>Labels</WithField>
    </WithFields>
  </NotificationAttributes>
  <DatasetConfig>
    <Insights>
      <Language>en</Language>
      <Image>
        <Caption>
          <Enable>True</Enable>
        </Caption>
      </Image>
      <Video>
        <Caption>
          <Enable>True</Enable>
        </Caption>
      </Video>
    </Insights>
  </DatasetConfig>
</MetaQueryStatus>