Hitachi

JP1 Version 12 JP1/Automatic Operation Command and API Reference 


2.2.9 Query parameter

By using query parameters to add search conditions to a request, you can filter and sort output results in the response.

This section describes query parameters supported by JP1/AO.

Query parameter that can be specified for all APIs

The query parameter described in the following table can be specified for all APIs.

Table 2‒14: Query parameter that can be specified for all APIs

Parameter

Description

Specifiable value

Default value

alt

Input/output data format can be specified in the same way as the Content-Type header and Accept header in a request.

xml or json

--

Legend:

--: Not applicable.

Query parameters that can be used for some APIs

The query parameters in the table below can be specified for a part of APIs#.

#
  • Acquisition of a list of service templates

  • Acquisition of a list of services

  • Acquisition of a list of schedules

  • Acquisition of a list of tasks

  • Acquisition of a list of steps

  • Acquisition of task logs

  • Acquisition of a list of history records

  • Acquisition of a list of property definitions

  • Acquisition of a list of property values

  • Acquisition of lists of property definitions and property values

  • Acquisition of a list of property groups

  • Acquisition of a list of service groups

  • Acquisition of a list of tag groups

  • Acquisition of a list of tags

Table 2‒15: Query parameters that can be specified for a part of APIs

Parameter

Description

Specifiable value#1

Default value

HQL::filter

Filters the output results by using the specified conditions.

See 2.2.11 Using HQL standard.

--

HQL::fields

Specify this parameter when you want to filter members to be included in a response. You can specify multiple parameters by separating them by commas (,).

Member-name

--

HQL::sortBy

Sorts the output results by the specified member name.

Member-name [{ASC| DESC}](, member-name [{ASC| DESC}])

  • ASC: Ascending order

  • DESC: Descending order

ASC

HQL::offset#2

Specifies the position of the heading object whose information is to be acquired. Specify the maximum number of objects that can be included in a response with HQL::count. page takes preference over HQL::offset.

0 to 2147483647

0

HQL::count#2

Specify the maximum number of objects that can be included in a response, starting from the position of the heading object specified with HQL::offset. pageSize takes preference over HQL::count. If the total of HQL::count and HQL::offset exceeds 2,147,483,647, the objects of the position specified with HQL::offset until the 2,147,483,647th are acquired.

1 to 2147483647

100

page#2

Acquires information about the specified page when a resource is divided into pages. You must also specify pageSize. page takes preference over HQL::offset.

1 to 2147483647

--

pageSize#2

Specify the maximum number of objects that can be displayed in a page. pageSize takes preference over HQL::count.

1 to 2147483647

--

Legend:

--: Not applicable.

#1

If you want to specify a character string that cannot be expressed as a URL, use UTF-8 encoding and encode the character string.

#2

You cannot specify the parameters for the following API functions: Acquisition of task logs, Acquisition of a list of steps, and Acquisition of a list of property groups.

For the pageSize parameter, specify the maximum number of objects to be displayed in a page. For the page parameter, specify the number of the page to be displayed from among the divided pages. They basically resemble the items Rows/page and Page of Services of Services List in a JP1/AO window. If you specify the parameters page and pageSize, the numbers of all resources and pages are returned to the Pagination object. From the value of this object, you can determine whether the next page exists.

Note that the parameters page and pageSize are used by converting to an HQL::offset value according to the following formula:

HQL::offset = pageSize * (page - 1)

Therefore, if the parameters page and pageSize exceed the range that can be specified for HQL::offset, the status code 400 (Bad Request) is returned.