SearchAppTemplates - Search application templates
Applicable editions | Centralized Edition and Region Edition |
Service endpoint and authorization
- Get service endpoint: Use the endpoint to replace
{domain}in the API request syntax. - Get personal access token.
- Get organization ID: Required only for the Centralized Edition. Go to Organization Management > Basic Information to get your organization ID.
Product | Resource | Required permission |
Application Delivery | application template | read-only |
Request syntax
Centralized Edition
GET https://{domain}/oapi/v1/appstack/organizations/{organizationId}/appTemplates:search
Region Edition
GET https://{domain}/oapi/v1/appstack/appTemplates:search
Request headers
Parameter | Type | Required | Description | Example value |
x-yunxiao-token | string | Yes | Your personal access token. | pt-0fh3****0fbG_35af****0484 |
Request parameters
Parameter | Type | Location | Required | Description | Example value |
pagination | string | query | No | The pagination method. By default, this API uses page number pagination. Set this parameter to | keyset |
perPage | number | query | No | The maximum number of items to return per page. | 20 |
orderBy | string | query | No | The property to sort the results by. For reliable iteration, we recommend sorting by | id |
sort | string | query | No | The sort order. Valid values: | asc |
nextToken | string | query | No | The token for keyset pagination. Omit this parameter for the first page. For subsequent pages, use the | token |
displayNameKeyword | string | query | No | my-app-template | |
page | number | query | No | The page number. Used for page number pagination. | 1 |
organizationId | string | path |
| The organization ID. | ec766e63aee3437d9a51f334d6exe671 |
Request examples
Centralized Edition
curl -X 'GET' \
'https://{domain}/oapi/v1/appstack/organizations/ec766e63aee3437d9a51f334d6exe671/appTemplates:search?pagination=keyset&perPage=20&orderBy=id&sort=asc&nextToken=token&displayNameKeyword=my-app-template&page=1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Region Edition
curl -X 'GET' \
'https://{domain}/oapi/v1/appstack/appTemplates:search?pagination=keyset&perPage=20&orderBy=id&sort=asc&nextToken=token&displayNameKeyword=my-app-template&page=1' \
-H 'Content-Type: application/json' \
-H 'x-yunxiao-token: pt-0fh3****0fbG_35af****0484'
Response parameters
Parameter | Type | Description | Example value |
| - | object | The paginated list of results. | |
| current | number | The current page number. This field is returned only when using page number pagination. | 1 |
| data | array | The list of returned items. | |
| - | object | An application template. | |
| cover | string | The cover image URL for the application template. | http://www.aliyun.... |
| creatorId | string | The ID of the user who created the application template. | 10df6011-2837-4fdb-ad92-356a679a60ca |
| description | string | The description of the application template. | for java app |
| displayName | string | The display name of the application template. | my-template-for-java-app |
| gmtCreate | string | The time when the application template was created. | 2024-09-01 00:00:00 |
| gmtModified | string | The time when the application template was last modified. | 2024-09-01 00:00:00 |
| modifierId | string | The ID of the user who last modified the application template. | 10df6011-2837-4fdb-ad92-356a679a60ca |
| name | string | The name of the application template. | my-template |
| type | string | The type of the application template. Valid values: | CUSTOMIZE |
| nextToken | string | The token to retrieve the next page of results. This field is returned only when using keyset pagination. To fetch the next page, include this token in the | token |
| pages | number | The total number of pages. This field is returned only when using page number pagination. | 10 |
| perPage | number | The number of items returned on the current page. This field is returned only when using page number pagination. | 10 |
| total | number | The total number of matching items. This field is returned only when using page number pagination. | 100 |
Response example
{
"current": 1,
"data": [
{
"cover": "http://www.aliyun....",
"creatorId": "10df6011-2837-4fdb-ad92-356a679a60ca",
"description": "for java app",
"displayName": "my-template-for-java-app",
"gmtCreate": "2024-09-01 00:00:00",
"gmtModified": "2024-09-01 00:00:00",
"modifierId": "10df6011-2837-4fdb-ad92-356a679a60ca",
"name": "my-template",
"type": "CUSTOMIZE"
}
],
"nextToken": "token",
"pages": 10,
"perPage": 10,
"total": 100
}
Error codes
For API-related error codes, see the Error Code Center.