지금 지원 담당자와 채팅
지원 담당자와 채팅

KACE Systems Management Appliance 14.0 Common Documents - API Reference Guide

Query syntax

Query syntax

A rich set of operations can be performed on any data request. These are controlled by query parameters in the URL. None, any, or all of these operations can be included in a request.

TIP: In this chapter, base entity refers to the entity specified in the URL route. For example, in the request GET /api/inventory/machines?filtering=software.name eq Word, machine is the base entity, while software is a sub-entity. The API query engine determines how to mesh multiple entities.

Filtering

Filtering

Filtering is accomplished using the filtering query parameter. A comma is used to separate multiple filters. All filters are matched in the returned data set. Each filter is specified by an optional entity name, a field name, an operator, and a value. If the entity is not provided, the base entity is assumed. A period separates an entity and a field name. A space must separate either end of the operator.

Casting is as broad as possible, however if the field type does not match the operator (for example, contains on an integer), an error is returned.

Operators

Operators

The standard operators are as follows:

lt: Less than
le: Less than or equal
ge: Greater than or equal
eq: Equal
ne: Not equal
neq: Not equal
co: Contains
nc: Does not contain
nco: Does not contain
st: Starts with
ns: Does not start with
nst: Does not start with
en: Ends with
end: Ends with
nen: Does not end with
nend: Does not end with
in: In set (values separated by semicolon)
nin: Not In set (values separated by semicolon)

Examples:

NOTE: For clarity, the prefix /api/inventory is omitted in the examples.

All machines named xxx:

All machines whose name contains the string xxx

All machines whose name does not contain xxx, and an ID value greater than 1000:

All machines whose name does not contain xxx:

Machines whose IDs are 100, 101 and 108:

All machines with a software title zoo installed:

All machines with ID values greater than 100 and a software title zoo installed:

Existence

Existence

The existence of associated data in sub-entities can be tested using the following operators.

ex: Exists
nex: Does not exist

Examples:

All machines with a recorded location:

All machines without a recorded location:

관련 문서

The document was helpful.

평가 결과 선택

I easily found the information I needed.

평가 결과 선택