Ex.1 case: Project
Sample statistics query case of Project
{
"query": {
"aggregate": {
"group": {
"keys": [
{
"key": "project_id",
"name": "project_id"
},
{
"key": "name",
"name": "project_name"
},
{
"key": "project_group.name",
"name": "project_group_name"
}
],
"fields": [
{
"operator": "count",
"name": "project_count"
},
{
"key": "project_id",
"name": "selected_id",
"operator": "add_to_set"
}
]
}
},
"filter": [
{
"key": "name",
"value": [
"project",
"alters"
],
"operator": "not_in"
}
],
"filter_or": [
{
"key": "name",
"value": [
"stark",
"admin"
],
"operator": "in"
},
{
"key": "project_id",
"value": [
"ua-abcdefg"
],
"operator": "not_in"
}
],
"sort": {
"name": "resource_count",
"desc": true
},
"page": {
"start": 1,
"limit": 3
}
}
}
POST
https://{host/identity/project/stat
This endpoint allows you to get free cakes.
Query Parameters
{
"results": [
{
"selected_id": [
"project-87925ea3ce65"
],
"project_count": 14,
"project_name": "[TEST] Lions",
"project_group_name": "SpaceOne",
"project_id": "project-87925ea3ce65"
},
{
"project_count": 1,
"project_name": "K8S_TF",
"project_group_name": "Customer Co-work",
"project_id": "project-e03c4399430e",
"selected_id": [
"project-e03c4399430e"
]
},
{
"project_count": 1,
"project_name": "CMP",
"project_group_name": "SpaceOne",
"project_id": "project-d452c2cce950",
"selected_id": [
"project-d452c2cce950"
]
}
]
}
Last updated