[starting from version: 2.8]
A request for all members of the field.
Request
{
"type": "members",
"index": string,
"field": FieldObject,
"filter"[]: FilterObject,
"page": number
}
The request has the following parameters:
type
— String. The type of the request. In this case, it is "members"
.index
– String. The dataset identifier.field
– Field Object. The field which members should be sent in the response.filter
– Array of Filter Objects|Filter Group Object. Filters that should be applied to members. filter
is present in the request when multilevel hierarchies are configured in Flexmonster Pivot.2.8.5
or /handshake is not implemented. Only include
and exclude
filtering parameters of the Filter Object are used.2.8.22
or later.page
– Number. The page number. It can be used to load members by parts. If the response contains pageTotal
parameter, additional requests will be performed to load the remaining pages. Starts from 0
.Response
{
"members"[]: {
"value": string | number,
"id": string
},
"sorted": boolean,
"page": number,
"pageTotal": number
}
The response has the following parameters:
members
– Array of objects. It contains all the members. Each member has the following properties:value
– String|Number. The member’s value. In the case of a number
field, it should be of type number
. In the case of a date
field, the members should be passed to Flexmonster in the Unix timestamp format, then dates are recognized correctly. For example, the date "2016-02-07"
will be "1454803200"
in the form of a Unix timestamp.id
(optional) – String. The member’s id. Supported only for string
fields. If defined, it is used in queries and in responses to identify the member.sorted
(optional) – Boolean. If true
, the members’ order from the response will be used as AZ order on the UI.page
(optional) – Number. The current page number. Starts from 0
.pageTotal
(optional) – Number. The total number of pages. It can be used to load members by parts.Examples
{Response:
"index": "data-set-123",
"type": "members",
"field": {
"uniqueName": "city"
},
"page": 0
}
{
"members": [
{ "value": "Toronto" },
{ "value": "Montreal" },
{ "value": "New York" }
]
}
{Response:
"index": "data-set-123",
"type": "members",
"field": {
"uniqueName": "price"
},
"page": 0
}
{
"members": [
{ "value": 10 },
{ "value": 28 },
{ "value": 30 }
]
}
{Response:
"index": "data-set-123",
"type": "members",
"field": {
"uniqueName": "order_date"
},
"page": 0
}
{
"members": [
{ "value": 1562889600000 },
{ "value": 1564617600000 },
{ "value": 1564963200000 }
]
}
See also
/handshake request
/fields request
/select request for pivot table
/select request for flat table
/select request for drill-through view