Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • A api
  • Project information
    • Project information
    • Activity
    • Members
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Wiki
    • Wiki
  • Activity
Collapse sidebar
  • ironapi
  • api
  • Wiki
  • Api
  • Queries
  • Attributes

Attributes · Changes

Page history
attrs docu authored Jan 25, 2022 by Andrea Pavlovic's avatar Andrea Pavlovic
Hide whitespace changes
Inline Side-by-side
API/Queries/Attributes.md
View page @ 3091c958
......@@ -573,6 +573,38 @@ List only those modules which have entites attached:
}
```
# Distinct
Set to 1 to automatically generate a "group_by" clause based on the selection.
## Restrictions
The only values allowed are `0` or `1`.
## Examples
`POST /data/system/module/query`
```json
{
"attrs": {
"join": "system__entity__module",
"columns": "me.name",
"+select": [
{
"count": "system__entity__module.id",
"-as" : "entity_count"
}
],
"+as": [
"entity_count"
],
"distinct" : 1
}
}
```
This will add `GROUP BY me.name` to the query.
# Permitted Column Names
......
Clone repository
  • API
    • Available Endpoints
    • Changing Passwords
    • Form Input Types
    • Introduction
    • Logout
    • Plugins
    • Queries
    • Queries
      • Attributes
      • Context
      • Query Examples
      • Query Search Options
      • Referenced Instances
      • Saved Queries
    • Schema_Changes
    • Storing Files
View All Pages