ListContextModels

Updated at:

Lists semantic models.

Operation description

Request description

  • This operation queries ContextModel resources under the current account and returns them in descending order of update time.

  • Three types of filters are supported and can be combined (AND relationship): fuzzy filter by name (name), fuzzy filter by name, display name, or description (keyword), and exact reverse lookup by referenced project (projectName).

  • The pagination parameter page starts from 1. If page or size exceeds the valid range, the server truncates it to the boundary value without returning an error.

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

log:ListContextModels

list

*All Resource

*

None None

Request syntax

GET /context-models HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

page

integer

No

The page number. The value starts from 1.

1

size

integer

No

The number of ContextModel resources to return on each page. Valid values: 1 to 1000.

20

name

string

No

The keyword used for fuzzy filtering by name. This parameter matches only the name and does not match the description. It can be combined with the keyword parameter.

order

keyword

string

No

The keyword used for fuzzy filtering. This parameter matches the name, display name, and description.

order

projectName

string

No

Queries by reference relationship. Only ContextModel resources that reference the specified project in sources are returned. This parameter is used to check which ContextModel resources reference a specific project. The value must be the full project name and is processed by exact match without fuzzy matching. For example, if you specify order-prod, models that only reference order-prod-canary are not returned. The value must be a valid project name. Otherwise, a 400 error is returned.

cn-hangzhou-app-logs

Response elements

Element

Type

Description

Example

object

The response body. Returns a paginated list of context model summaries.

items

array<object>

The list of context model summaries on the current page, sorted in descending order of update time. If no matches are found or the page number is out of bounds, an empty array [] is returned. The summaries do not include sources and updatedAt. To obtain complete information, call GetContextModel.

object

The summary information of a single context model.

createdAt

string

The time when the model was created. The time is in RFC 3339 UTC format, such as 2026-07-09T05:33:37Z.

2026-07-09T05:33:37Z

description

string

The description of the model. The description can be up to 1,024 characters in length. If no description is specified, an empty string "" is returned.

End-to-end coverage from order creation to payment

displayName

string

The display name. If no display name is set, an empty string "" is returned, and the value is not backfilled with name. When displaying the name, use displayName || name as a fallback.

Order analysis model

name

string

The identifier of the context model. The identifier is unique within the same Alibaba Cloud account and cannot be modified after creation. It can be passed as a path parameter to operations such as GetContextModel.

orders

page

integer

The actual page number that takes effect. If the specified page number is less than 1, it is processed as 1.

1

size

integer

The actual page size that takes effect. If the specified value is less than 1, the default value 20 is used. If the specified value is greater than 1000, it is processed as 1000.

20

total

integer

The total number of context models that meet the filter conditions. This value is not affected by pagination.

4

Examples

Success response

JSON format

{
  "items": [
    {
      "createdAt": "2026-07-09T05:33:37Z",
      "description": "End-to-end coverage from order creation to payment",
      "displayName": "Order analysis model",
      "name": "orders"
    }
  ],
  "page": 1,
  "size": 20,
  "total": 4
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.