Segments

Use these operations to manage UI segments. A segment is a filtered view of a data set that can be shared with other users. For example, you may create a transactions segment that displays specific columns that are filtered and sorted based on certain criteria, and share it with others in your organization.

Retrieve a user's segments

Request

Retrieves a user's UI segments.

Security
SecretApiKey or JWT
Query
limitinteger, [ 0 .. 1000 ]

Limits the number of collection items to be returned.

offsetinteger, [ 0 .. 1000 ]

Specifies the starting point within the collection of items to be returned.

sortArray of strings

Sorts and orders the collection of items. To sort in descending order, prefix with -. Multiple fields can be sorted by separating each with ,.

filterstring

Criteria for filtering collection items. This field requires a special format. Use , to specify multiple allowed values. Use ; to specify multiple fields.

For more information, see Search filters.

qstring

Use this field to perform a partial search of text fields.

curl -i -X GET \
  'https://www.rebilly.com/_mock/catalog/all/grid-segments?limit=1000&offset=1000&sort=string&filter=string&q=string' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE'

Responses

Segments retrieved.

Headers
Pagination-Totalinteger

Total number of items.

Example:332
Pagination-Limitinteger

Maximum number of items per page.

Example:100
Pagination-Offsetinteger

Specifies the starting point within the collection of resource results. For example, a request with limit=20 retrieves and displays the first 20 results on a page. A following request with limit=20 and offset=20, retrieves the next page of 20 results.

Example:2
Bodyapplication/json
Array [
idstring, <= 50 charactersread-only

ID of the segment.

Example:"grd_seg_0YVCNRJW0ADV49TN8BD9X91XB5"
ownerobjectread-onlyrequired

Creator of segment.

dataobjectrequired

Object that contains a schema that is used to set up the UI for the segment. This schema is built and consumed by the frontend. It includes information such as: segment name, UI settings, and so on.

isStarredboolean

Specifies if this segment is starred by the current user. Starring a segment marks it as a favorite segment, and also adds the segment to a starred folder in the UI.

isVisibleboolean

Specifies if the segment is visible to the current user.

usersArray of objects, uniqueread-only

List of user details with which this segment is shared.

scopestringrequired

Controls the visibility of the segment.

Enum ValueDescription
private

Visible only to the owner the segment.

public

Visible to all in the owner's organization.

shared

Visible to a specific group of users that are specified in the userIds field.

]
Response
[ { "id": "grd_seg_0YVCNRJW0ADV49TN8BD9X91XB5", "owner": {}, "data": {}, "isStarred": true, "isVisible": true, "users": [], "scope": "private" } ]