queryLabels( )


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a query to retrieve a list of labels.

The queryLabels() function builds a query to retrieve a list of labels and returns a LabelsQueryBuilder object.

The returned object contains the query definition, which is used to run the query using the find() function.

You can refine the query by chaining LabelsQueryBuilder functions onto the query. LabelsQueryBuilder functions enable you to filter, sort, and control the results that queryLabels() returns.

queryLabels() runs with the following LabelsQueryBuilder defaults, which you can override:

  • skip(0)
  • limit(50)
  • descending('_createdDate')

The following LabelsQueryBuilder functions are supported for queryLabels(). For a full description of the Labels object, see the object returned for the items property in LabelsQueryResult.

PROPERTYSUPPORTED FILTERS & SORTING
namespaceeq(),ne()
keyeq(),ne(),in()
displayNameeq(),ne(),in(),startsWith(),ascending(),descending()
labelTypeeq()
_createdDateeq(),ne(),gt(),lt(),ge(),le(),ascending(),descending()
_updatedDateeq(),ne(),gt(),lt(),ge(),le(),ascending(),descending()
Admin Method

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Bookings Services and Settings
Manage Contact Labels
Manage Members and Contacts - all permissions
Learn more about permission scopes.
Method Declaration
Copy
Method Parameters
optionsQueryLabelsOptions

Language options.

Was this helpful?
Yes
No