SearchAppTemplates - 搜索应用模板

更新时间:
复制 MD 格式

适用版本

中心版、Region

服务接入点与授权信息

产品

资源

所需权限

应用交付

应用模板

只读

请求语法

中心版

GET https://{domain}/oapi/v1/appstack/organizations/{organizationId}/appTemplates:search

Region

GET https://{domain}/oapi/v1/appstack/appTemplates:search

请求头

参数

类型

是否必填

描述

示例值

x-yunxiao-token

string

个人访问令牌。

pt-0fh3****0fbG_35af****0484

请求参数

参数

类型

位置

是否必填

描述

示例值

pagination

string

query

分页模式参数,目前只支持键集分页 keyset 模式。

keyset

perPage

number

query

分页尺寸参数,决定一页最多返回多少对象。

20

orderBy

string

query

分页排序属性,决定根据何种属性进行记录排序;推荐在实现严格遍历时,使用 id 属性。

id

sort

string

query

分页排序升降序,asc 为升序,desc 为降序;推荐在实现严格遍历时,使用升序。

asc

nextToken

string

query

键集分页 token,获取第一页数据时无需传入,否则需要传入前一页查询结果中的 nextToken 字段。

token

displayNameKeyword

string

query

按展示名进行模糊搜索的关键字。

my-app-template

page

number

query

页码分页时使用,用于获取下一页内容。

1

organizationId

string

path

  • 是:中心版

  • 否:Region

组织 ID。

ec766e63aee3437d9a51f334d6exe671

请求示例

中心版

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

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'

返回参数

参数

类型

描述

示例值

-

object

分页接口所返回的列表。

current

number

页码分页时存在该字段,表示当前页。

1

data

array

分页结果数据。

-

object

应用模板。

cover

string

应用模板封面。

http://www.aliyun....

creatorId

string

应用模板创建人。

10df6011-2837-4fdb-ad92-356a679a60ca

description

string

应用模板描述。

for java app

displayName

string

应用模板展示名称。

my-template-for-java-app

gmtCreate

string

应用模板创建时间。

2024-09-01 00:00:00

gmtModified

string

应用模板修改时间。

2024-09-01 00:00:00

modifierId

string

应用模板修改人。

10df6011-2837-4fdb-ad92-356a679a60ca

name

string

应用模板名称。

my-template

type

string

应用模板类型,可能的值:[CUSTOMIZE PRESET]。

CUSTOMIZE

nextToken

string

采用键值分页时存在该字段,用于传给分页接口,迭代获取下一页数据。

token

pages

number

页码分页时存在该字段,表示总页数。

10

perPage

number

页码分页时存在该字段,表示每页大小。

10

total

number

页码分页时存在该字段,表示结果总数。

100

返回示例

{
    "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
}

错误码

访问错误码中心查看 API 相关错误码。