列出所有软件包
GET /accounts/{account_id}/core/v1/packages
返回集合中所有匹配资源的 JSON 数组。如果在请求中指定了单个字段,则项目 JSON 数组将包含按指定顺序为每个匹配资源请求的字段。
参数
| 名称 | Type | 在 | Required | Description |
|---|---|---|---|---|
account_id |
string |
path |
True |
包含帐户资源的 ID
|
筛选器 |
string |
查询 |
False |
指示在列出集合时应匹配哪些字段以返回资源。 支持的运算符有:
URL 示例:"filter=field%20eq%20%27value%27" OpenAPI 示例:"field eq 'value'" |
订单 |
string |
查询 |
False |
指示列出集合时资源的排序顺序。 URL 示例:"orderBy=name","orderBy=name%20desc" OpenAPI 示例:"name desc" |
包括 |
string |
查询 |
False |
指示列出集合时应返回哪些字段。 URL 示例:"include=id"、"include=id,name" OpenAPI 示例:"id"
|
limit |
string |
查询 |
False |
指示列出集合时要返回的最大资源数。 URL 示例:"limit=2" OpenAPI 示例:"2" |
响应
Status: 200, Returns a JSON array of all matching resources in the collection. If individual fields are specified in the request, the items JSON array will contain the fields requested for each matching resource in the order specified.
| 名称 | Type | Required | Description |
|---|---|---|---|
个项 |
数组[任意一个:"package_1.0_get_response_body",数组[]] |
True |
|
元数据 |
True |
响应示例
{
"type": "application/astra-packages",
"version": "1.0",
"items": [
[
"e280ff62-be35-4f31-a31b-a210a1ad1b33",
"acc",
"22.01.0",
"install"
],
[
"e8507dad-d33f-44b3-9c15-ec55ba6f6473",
"acc",
"22.01.1",
"patch"
]
],
"metadata": {
"labels": [],
"creationTimestamp": "2022-10-06T20:58:16.305662Z",
"modificationTimestamp": "2022-10-06T20:58:16.305662Z",
"createdBy": "8f84cf09-8036-51e4-b579-bd30cb07b269"
}
}
响应
Status: 401, Unauthorized
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/3",
"title": "Missing bearer token",
"detail": "The request is missing the required bearer token.",
"status": "401"
}
响应
Status: 400, Bad request
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
|
invalidParams |
数组["invalidParams"] |
False |
无效查询参数列表 |
响应示例
{
"type": "https://astra.netapp.io/problems/5",
"title": "Invalid query parameters",
"detail": "The supplied query parameters are invalid.",
"status": "400"
}
响应
Status: 403, Forbidden
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
响应示例
{
"type": "https://astra.netapp.io/problems/11",
"title": "Operation not permitted",
"detail": "The requested operation isn't permitted.",
"status": "403"
}
错误
Status: 404, Not found
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
状态 |
string |
True |
|
correlationID |
string |
False |
错误响应示例
{
"type": "https://astra.netapp.io/problems/2",
"title": "Collection not found",
"detail": "The collection specified in the request URI wasn't found.",
"status": "404"
}
定义
查看定义
type_astra_stateTransition
| 名称 | Type | Required | Description |
|---|---|---|---|
自 |
string |
True |
|
to |
数组[string] |
True |
additionalDetails
type_astra_stateDetail
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
|
标题 |
string |
True |
|
详细信息 |
string |
True |
|
additionalDetails |
False |
dependsOnImages
| 名称 | Type | Required | Description |
|---|---|---|---|
imagePath |
string |
True |
包含此 Docker 镜像路径的 JSON 字符串。它不能包含注册表的名称,只能包含从根到镜像的绝对路径。示例:/globalcicd/acc 定义的值为:
|
imageName |
string |
True |
包含 Docker 镜像名称的 JSON 字符串。定义的值为:
|
imageTag |
string |
True |
表示此图像的标签/版本的 JSON 字符串。定义的值是:
|
镜像
| 名称 | Type | Required | Description |
|---|---|---|---|
imageName |
string |
True |
包含 Docker 镜像名称的 JSON 字符串。定义的值为:
|
imagePath |
string |
True |
包含此 Docker 镜像路径的 JSON 字符串。它不能包含注册表的名称,只能包含从根到镜像的绝对路径。示例:/globalcicd/acc 定义的值为:
|
imageTag |
string |
True |
表示此图像的标签/版本的 JSON 字符串。定义的值是:
|
imageDigest |
string |
True |
表示此图像摘要的 JSON 字符串。定义的值是:
|
dependsOnImages |
False |
JSON 对象的 JSON 数组,描述安装或升级当前映像所需的映像。 |
dependsOnComponents
| 名称 | Type | Required | Description |
|---|---|---|---|
componentName |
string |
True |
描述组件名称的 JSON 字符串。定义的值是:
|
版本 |
数组[string] |
True |
JSON 字符串的 JSON 数组,定义安装当前映像所需的组件版本。 |
制品
| 名称 | Type | Required | Description |
|---|---|---|---|
artifactName |
string |
True |
包含文件名的 JSON 字符串。定义的值是:
|
artifactIdentifier |
string |
True |
包含此文件标识符的 JSON 字符串。在相同包类型的版本之间,文件名可能会更改,但标识符通常保持不变。定义的值是:
|
artifactPath |
string |
True |
JSON 字符串,包含从已知 Astra Control Center 数据存储/位置的根目录到此项目的路径。示例:/vmware/1.0/ 定义的值为:
|
artifactVersion |
string |
False |
包含该项目版本的 JSON 字符串(如果提供)。定义的值为:
|
dependsOnComponents |
False |
JSON 对象的 JSON 数组,描述安装/升级当前映像所需的已安装组件。 |
文件
| 名称 | Type | Required | Description |
|---|---|---|---|
fileName |
string |
True |
包含文件名的 JSON 字符串。定义的值是:
|
fileIdentifier |
string |
True |
包含此文件标识符的 JSON 字符串。在相同包类型的版本之间,文件名可能会更改,但标识符通常保持不变。定义的值是:
|
fileMediaType |
string |
True |
包含文件媒体类型的 JSON 字符串。定义的值是由 "IANA"定义的任何媒体类型。此外,还支持 yaml 文件的 application/x-yaml 或 application/x-yaml。
|
fileContents |
string |
True |
包含文件内容的 JSON 字符串。定义的值为:
|
upgradableVersions
JSON 对象包含可以升级到包版本的最低和最高版本。
| 名称 | Type | Required | Description |
|---|---|---|---|
minVersion |
string |
False |
JSON 字符串,描述可以升级到包版本的最低版本。定义的值为:
|
maxVersion |
string |
False |
JSON 字符串,描述可以升级到包版本的最高版本。定义的值为:
|
依赖项
| 名称 | Type | Required | Description |
|---|---|---|---|
componentName |
string |
True |
描述组件名称的 JSON 字符串。定义的值是:
|
componentMinVersion |
string |
False |
描述该组件所需的最低版本的 JSON 字符串。定义的值为:
|
componentMaxVersion |
string |
False |
描述该组件所需的最高版本的 JSON 字符串。定义的值为:
|
类型 Astra 标签
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
|
value |
string |
True |
type_astra_metadata
与资源关联的客户端和服务指定的元数据。定义的值为:
-
符合 Astra 元数据架构如果在创建时未指定,则将创建没有标签的元数据对象。
| 名称 | Type | Required | Description |
|---|---|---|---|
labels |
数组["类型 Astra 标签"] |
True |
|
creationTimestamp |
string |
True |
|
modificationTimestamp |
string |
True |
|
已创建 |
string |
True |
|
modifiedBy |
string |
False |
package_1.0_get_response_body
| 名称 | Type | Required | Description |
|---|---|---|---|
type |
string |
True |
资源的媒体类型。定义的值为:
|
version |
string |
True |
资源的版本。定义的值为:
|
id |
string |
True |
资源的全局唯一标识符。定义的值为:
|
packageName |
string |
True |
包含包名称的 JSON 字符串。定义的值为:
|
packageVersion |
string |
True |
包含包的 SemVer 的 JSON 字符串。定义的值为:
|
packageType |
string |
True |
包含程序包类型的 JSON 字符串,指示这是完整的安装程序包还是修补程序。定义的值是:
|
bundleName |
数组[string] |
False |
包含软件包所在捆绑包名称的 JSON 字符串的 JSON 数组。 |
severityLevel |
string |
True |
描述此修补程序或安装的严重级别的 JSON 字符串。定义的值为:
|
packageState |
string |
True |
包含指示包操作状态的值的 JSON 字符串。在包验证和导入后,状态将显示为"complete"。否则,状态将显示为"incomplete"。定义的值是:
|
packageStateTransitions |
True |
JSON 对象的 JSON 数组,每个表示从给定定义状态的允许状态转换集。每个 JSON 对象都包含字段"from"和"to",其中"from"值是状态的名称,"to"值是允许的目标状态数组。定义的值为:
|
|
packageStateDetails |
True |
JSON 对象的 JSON 数组,列出有关当前"状态"的其他详细信息。如果没有可用的详细信息,此数组将为空。
|
|
镜像 |
数组["镜像"] |
False |
JSON 对象的 JSON 数组,每个对象都包含作为包一部分的 Docker 镜像。 |
制品 |
数组["制品"] |
False |
描述与此包关联的其他工件(二进制文件和其他)的 JSON 对象的 JSON 数组。 |
文件 |
数组["文件"] |
False |
JSON 对象的 JSON 数组,每个表示与此包关联的非图像制品。 |
upgradableVersions |
False |
JSON 对象包含可以升级到包版本的最低和最高版本。 |
|
依赖项 |
数组["依赖项"] |
False |
描述安装此包所需的给定依赖项最低版本的 JSON 对象的 JSON 数组 |
元数据 |
True |
与资源关联的客户端和服务指定的元数据。定义的值为:
|
type_astra_metadata_list
| 名称 | Type | Required | Description |
|---|---|---|---|
继续 |
string |
False |
|
count |
数字 |
False |
|
labels |
数组["类型 Astra 标签"] |
False |
|
creationTimestamp |
string |
False |
|
modificationTimestamp |
string |
False |
|
已创建 |
string |
False |
|
modifiedBy |
string |
False |
invalidParams
| 名称 | Type | Required | Description |
|---|---|---|---|
name |
string |
True |
无效查询参数的名称 |
原因 |
string |
True |
查询参数无效的原因 |