SkipTop
更新时间: 2026/06/29
在Gitcode上查看源码

ResourceDefinition

uris

  • https://device_ip/redfish/v1/JSONSchemas/?$skip=skip_num&$top=top_num

properties

名称类型是否只读取值范围/枚举值说明
@odata.contextstringtrue-资源模型的OData描述信息
@odata.idstringtrue-资源节点的访问路径
@odata.typestringtrue-资源类型
Namestringtrue-资源名称
Descriptionstringtrue-资源描述
Members@odata.countnumbertrue-集合资源成员总数
Membersarraytrue-分页显示的集合资源成员列表
Members[].@odata.idstringtrue-单个资源节点的访问路径
Members@odata.nextLinkstringtrue-下一页的链接

supported_methods

  • GET

HTTP methods

GET

命令功能

筛选和分页显示($skip, $top)

说明

此分页查询参数适用于资源集合,定义要跳过的资源集合中的成员数与返回的成员数,并返回此子集中的成员子集。 ● 分页显示:当显示的成员个数大于32时,系统自动将剩余回显信息分屏到下一页,并在本页提供到下一页的链接。 ● 筛选:您可以使用"$skip"和"$top"对显示的条目进行控制。

当top为0或当skip大于等于集合的成员数量,接口返回400:QueryParameterOutOfRange错误。 下面以"GET"服务器当前所有资源的Schemas文件的命令举例说明"$skip"和"$top"的使用方法,操作过程中所需请求头此处忽略,请在各资源的对应章节查找。

命令格式

URL: https://device_ip/redfish/v1/JSONSchemas/?$skip=skip_num&$top=top_num 或 URL: https://device_ip/redfish/v1/JSONSchemas/?$top=top_num&$skip=skip_num 或 URL: https://device_ip/redfish/v1/JSONSchemas/?$skip=skip_num 或 URL: https://device_ip/redfish/v1/JSONSchemas/?$top=top_num

请求头:

X-Auth-Token: 123456789***********************

请求消息体: 无

参数说明

参数参数说明取值
device_ip登录设备的IP地址IPv4或IPv6地址
skip_num从第一个成员算起,跳过多少个成员开始显示大于等于0,小于Members@odata.count的取值。Members@odata.count的值可从对应集合资源中获得
top_num显示的成员个数大于等于1,小于等于Members@odata.count的取值。受分页条数限制,当top_num大于32时,实际返回的集合成员数量不超过32
auth_value执行该GET请求时,必须在"Headers"中携带"X-Auth-Token"值用于鉴权可通过/redfish/v1/SessionService/Sessions创建会话时获得

使用指南

集合资源的回显受分页限制: ● 回显信息中每页最多显示32个成员。 ● 当前页不是最后一页时,提供"Members@odata.nextLink"属性链接到下一页。

使用实例

查询当前所有资源的Schemas文件。

请求样例:

http
GET https://device_ip/redfish/v1/JSONSchemas

请求头:无

请求消息体:无

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#JsonSchemas",
  "@odata.id": "/redfish/v1/JSONSchemas",
  "@odata.type": "#JsonSchemaFileCollection.JsonSchemaFileCollection",
  "Name": "Schema Repository",
  "Description": "Schema Repository",
  "Members@odata.count": 178,
  "Members": [
    {
      "@odata.id": "/redfish/v1/JSONSchemas/AccountService.1.0.0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/AccountService"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/AccountService.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/AccountService.v1_0_2"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/AttributeRegistry"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/AttributeRegistry.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Bios"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Bios.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/iBMCPrivileges.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/iBMCSession.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Chassis"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Chassis.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Chassis.v1_0_1"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Chassis.v1_0_2"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Chassis.v1_1_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Chassis.v1_1_2"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Chassis.v1_2_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Chassis.v1_3_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/ChassisCollection"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/ComputerSystem"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/ComputerSystem.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/ComputerSystem.v1_0_1"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/ComputerSystem.v1_0_2"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/ComputerSystem.v1_1_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/ComputerSystem.v1_2_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/ComputerSystemCollection"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Drive"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Drive.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Drive.v1_1_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/EthernetInterface"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/EthernetInterface.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/EthernetInterface.v1_0_2"
    }
  ],
  "Members@odata.nextLink": "/redfish/v1/JSONSchemas?$skip=32&$top=32"
}

响应码:200

说明

此处回显的成员个数超过32,进行分页。"Members@odata.nextLink"为下一页的链接。

跳过35个成员,顺序显示5个成员。

请求样例:

http
GET https://device_ip/redfish/v1/JSONSchemas?$skip=35&$top=5

请求头:无

请求消息体:无

响应样例:

json
{
  "@odata.context": "/redfish/v1/$metadata#JsonSchemas",
  "@odata.id": "/redfish/v1/JSONSchemas",
  "@odata.type": "#JsonSchemaFileCollection.JsonSchemaFileCollection",
  "Name": "Schema Repository",
  "Members@odata.count": 178,
  "Members": [
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Event.v1_0_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Event.v1_0_2"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/Event.v1_1_0"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/EventDestination"
    },
    {
      "@odata.id": "/redfish/v1/JSONSchemas/EventDestination.v1_0_0"
    }
  ],
  "Members@odata.nextLink": "/redfish/v1/JSONSchemas?$skip=40&$top=32"
}

响应码:200

说明

最后一页无"Members@odata.nextLink"属性。