searchGroups #

Searches for group models.

By default, the metadata of the metadata referential used by the models are resolved: their { "referential": true } marker in metadataMappings is replaced by the referential mappings, and their metadataDetails and defaultMetadata are merged over the current referential values. Use rawModel to get the stored documents as is.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/_/device-manager/models/groups/_search
Method: POST

Other protocols #

{
  "controller": "device-manager/models",
  "action": "searchGroups",
  "tenantClasses": ["<tenant class>"],
  "body": {
    "query": {
      // ...
    },
    "sort": [
      // ...
    ]
  },

  // optional:
  "from": "<starting offset>",
  "size": "<page size>"
}

Arguments #

  • tenantClasses: names of the tenant classes
  • from: paginates search results by defining the offset from the first result you want to fetch. Usually used with the size argument
  • size: set the maximum number of documents returned per result page
  • rawModel: optional, false by default. If true, returns the stored models without resolving their referential metadata

Body properties #


Response #

{
  "status": 200,
  "error": null,
  "controller": "device-manager/models",
  "action": "searchGroups",
  "requestId": "<unique request identifier>",
  "result": {
    "hits": [
      {
        "_id": "<GroupModelId>",
        "_source": {
          // Group model content
        },
      },
    ],
    "total": 42
  }
}