Queries OpenSearch applications.

  • This operation allows you to query applications by application name, instance ID, and application type.
  • This operation can sort the applications based on their creation time.
  • This operation supports the parameters for paging.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request headers

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

Request syntax

GET /v4/openapi/app-groups HTTP/1.1

Request parameters

Parameter Type Position Required Example Description
pageNumber Integer Query No 1

The number of the page to return. Default value: 1.

pageSize Integer Query No 10

The number of entries to return on each page. Default value: 10.

instanceId String Query No ops-cn-xxxx

The ID of the instance. Exact match is used.

name String Query No my_name

The name of the application.

type String Query No standard

The type of the application. Valid values:

  • standard: a standard application
  • enhanced: an advanced application which is of a new application type
sortBy Integer Query No 0

The method based on which applications are sorted. Valid values:

  • 0: sorts applications in descending order by creation time.
  • 1: sorts applications in descending order by modification time.

Default value: 0.

resourceGroupId String Query No ""

N/A

Response parameters

Parameter Type Example Description
requestId String 0A6EB64B-B4C8-CF02-810F-E660812972FF

The ID of the request.

result Array of result

The information about each application.

For more information, see AppGroup.

chargeType String POSTPAY

The billing method of the application. Valid values:

  • POSTPAY: pay-as-you-go
  • PREPAY: subscription
chargingWay Integer 1

The billing model. Valid values:

  • 1: computing resources
  • 2: queries per second (QPS)
commodityCode String opensearch

The code of the commodity.

created Integer 1575442875

The timestamp when the application was created.

currentVersion String 110116134

The ID of the current online version.

description String "xxx"

The description of the application.

expireOn String "xxx"

The expiration time.

firstRankAlgoDeploymentId Integer 0

The ID of the created rough sort expression.

hasPendingQuotaReviewTask Integer 0

The approval status of the quotas. Valid values:

  • 0: The quotas are approved.
  • 1: The quotas are being approved.
id String 110116134

The ID of the application.

instanceId String "xxx"

The ID of the instance.

lockMode String Unlock

The lock mode of the instance. Valid values:

  • Unlock: The instance is not locked.
  • LockByExpiration: The instance is automatically locked after it expires.
  • ManualLock: The instance is manually locked.
lockedByExpiration Integer 0

Indicates whether the instance is automatically locked after it expires.

name String os_function_test_v1

The name of the application.

pendingSecondRankAlgoDeploymentId Integer 0

The ID of the fine sort expression that is being created.

processingOrderId String "xxx"

The ID of the order that is not complete for the instance. For example, an order is one that is initiated to create the instance or change the quotas or billing method.

produced Integer 1

Indicates whether the order is complete. Valid values:

  • 0: The order is in progress.
  • 1: The order is complete.
projectId String "xxx"

The name of the A/B test group.

quota Struct

The information about the quotas of the application.

For more information, see Quota.

computeResource Integer 20

The computing resources. Unit: logical computing units (LCUs).

docSize Integer 1

The storage capacity. Unit: GB.

spec String opensearch.share.common

The specifications of the application. Valid values:

  • opensearch.share.junior: basic
  • opensearch.share.common: shared general-purpose
  • opensearch.share.compute: shared computing
  • opensearch.share.storage: shared storage
  • opensearch.private.common: exclusive general-purpose
  • opensearch.private.compute: exclusive computing
  • opensearch.private.storage: exclusive storage
secondRankAlgoDeploymentId Integer 0

The ID of the created fine sort expression.

status String normal

The status of the application. Valid values:

  • producing
  • review_pending
  • config_pending
  • normal
  • frozen
switchedTime Integer 0

The timestamp when the current online version was published.

type String enhanced

The type of the application. Valid values:

  • standard: a standard application.
  • advance: an advanced application which is of an old application type. New applications cannot be of this type.
  • enhanced: an advanced application which is of a new application type.
updated Integer 1578916076

The timestamp when the application was last updated.

totalCount Integer 1

The total number of entries returned.

Examples

Sample requests

GET /v4/openapi/app-groups?type=enhanced&sortBy=1

Sample success responses

XML format

<requestId>0A6EB64B-B4C8-CF02-810F-E660812972FF</requestId>
<totalCount>1</totalCount>
<result>
    <id>110116134</id>
    <name>os_function_test_v1</name>
    <currentVersion>110116134</currentVersion>
    <switchedTime>0</switchedTime>
    <quota>
        <docSize>1</docSize>
        <computeResource>20</computeResource>
        <spec>opensearch.share.common</spec>
    </quota>
    <chargingWay>1</chargingWay>
    <type>enhanced</type>
    <projectId/>
    <chargeType>POSTPAY</chargeType>
    <expireOn/>
    <instanceId/>
    <commodityCode>opensearch</commodityCode>
    <processingOrderId/>
    <firstRankAlgoDeploymentId>0</firstRankAlgoDeploymentId>
    <secondRankAlgoDeploymentId>0</secondRankAlgoDeploymentId>
    <pendingSecondRankAlgoDeploymentId>0</pendingSecondRankAlgoDeploymentId>
    <description/>
    <produced>1</produced>
    <lockedByExpiration>0</lockedByExpiration>
    <hasPendingQuotaReviewTask>0</hasPendingQuotaReviewTask>
    <created>1575442875</created>
    <updated>1578916076</updated>
    <status>normal</status>
    <lockMode>Unlock</lockMode>
</result>

JSON format

{
    "requestId": "0A6EB64B-B4C8-CF02-810F-E660812972FF",
    "totalCount": 1,
    "result": {
        "id": 110116134,
        "name": "os_function_test_v1",
        "currentVersion": 110116134,
        "switchedTime": 0,
        "quota": {
            "docSize": 1,
            "computeResource": 20,
            "spec": "opensearch.share.common"
        },
        "chargingWay": 1,
        "type": "enhanced",
        "projectId": "",
        "chargeType": "POSTPAY",
        "expireOn": "",
        "instanceId": "",
        "commodityCode": "opensearch",
        "processingOrderId": "",
        "firstRankAlgoDeploymentId": 0,
        "secondRankAlgoDeploymentId": 0,
        "pendingSecondRankAlgoDeploymentId": 0,
        "description": "",
        "produced": 1,
        "lockedByExpiration": 0,
        "hasPendingQuotaReviewTask": 0,
        "created": 1575442875,
        "updated": 1578916076,
        "status": "normal",
        "lockMode": "Unlock"
    }
}

Error codes

For a list of error codes, visit the API Error Center.