From 8d41db7465fb65cae18a16a6fda6116ccfafc504 Mon Sep 17 00:00:00 2001 From: Reuben Miller Date: Thu, 20 Oct 2022 18:06:27 +0200 Subject: [PATCH] Add child/parent flags to all inventory get commands (#190) * add child type flags to all inventory related commands * add child flags to all inventory commands --- api/spec/json/agents.json | 47 +++++++++++++ api/spec/json/configuration.json | 52 ++++++++++++++ api/spec/json/deviceGroups.json | 58 ++++++++++++++- api/spec/json/deviceGroupsChildren.json | 5 ++ api/spec/json/deviceProfile.json | 52 ++++++++++++++ api/spec/json/devices.json | 47 +++++++++++++ api/spec/json/devicesChildren.json | 5 ++ api/spec/json/devicesServices.json | 47 +++++++++++++ api/spec/json/firmware.json | 52 ++++++++++++++ api/spec/json/firmwarePatches.json | 42 ++++++++++- api/spec/json/firmwareVersions.json | 42 ++++++++++- api/spec/json/inventory.json | 70 ++++++++++++++++--- api/spec/json/inventoryAdditions.json | 5 ++ api/spec/json/inventoryAssets.json | 5 ++ api/spec/json/inventoryChildren.json | 5 ++ api/spec/json/smartgroups.json | 47 +++++++++++++ api/spec/json/software.json | 52 ++++++++++++++ api/spec/json/softwareVersions.json | 42 ++++++++++- api/spec/yaml/agents.yaml | 37 ++++++++++ api/spec/yaml/configuration.yaml | 41 +++++++++++ api/spec/yaml/deviceGroups.yaml | 45 +++++++++++- api/spec/yaml/deviceGroupsChildren.yaml | 4 ++ api/spec/yaml/deviceProfile.yaml | 41 +++++++++++ api/spec/yaml/devices.yaml | 37 ++++++++++ api/spec/yaml/devicesChildren.yaml | 4 ++ api/spec/yaml/devicesServices.yaml | 38 ++++++++++ api/spec/yaml/firmware.yaml | 41 +++++++++++ api/spec/yaml/firmwarePatches.yaml | 36 +++++++++- api/spec/yaml/firmwareVersions.yaml | 34 ++++++++- api/spec/yaml/inventory.yaml | 62 +++++++++++++--- api/spec/yaml/inventoryAdditions.yaml | 4 ++ api/spec/yaml/inventoryAssets.yaml | 4 ++ api/spec/yaml/inventoryChildren.yaml | 4 ++ api/spec/yaml/smartgroups.yaml | 38 +++++++++- api/spec/yaml/software.yaml | 41 +++++++++++ api/spec/yaml/softwareVersions.yaml | 34 ++++++++- pkg/cmd/agents/get/get.auto.go | 10 +++ pkg/cmd/agents/list/list.auto.go | 8 +++ pkg/cmd/configuration/get/get.auto.go | 10 +++ pkg/cmd/configuration/list/list.auto.go | 10 +++ .../devicegroups/children/list/list.auto.go | 2 + pkg/cmd/devicegroups/get/get.auto.go | 10 +++ pkg/cmd/devicegroups/list/list.auto.go | 10 ++- .../listassets/listAssets.auto.go | 4 ++ pkg/cmd/deviceprofiles/get/get.auto.go | 10 +++ pkg/cmd/deviceprofiles/list/list.auto.go | 10 +++ pkg/cmd/devices/children/list/list.auto.go | 2 + pkg/cmd/devices/get/get.auto.go | 10 +++ pkg/cmd/devices/list/list.auto.go | 8 +++ pkg/cmd/devices/services/find/find.auto.go | 8 +++ pkg/cmd/devices/services/get/get.auto.go | 10 +++ pkg/cmd/firmware/get/get.auto.go | 10 +++ pkg/cmd/firmware/list/list.auto.go | 10 +++ pkg/cmd/firmware/patches/get/get.auto.go | 10 ++- pkg/cmd/firmware/patches/list/list.auto.go | 8 +++ pkg/cmd/firmware/versions/get/get.auto.go | 10 ++- pkg/cmd/firmware/versions/list/list.auto.go | 8 +++ pkg/cmd/inventory/additions/list/list.auto.go | 2 + pkg/cmd/inventory/assets/list/list.auto.go | 2 + pkg/cmd/inventory/children/list/list.auto.go | 2 + pkg/cmd/inventory/find/find.auto.go | 10 ++- .../inventory/findbytext/findByText.auto.go | 10 ++- pkg/cmd/inventory/get/get.auto.go | 8 ++- pkg/cmd/inventory/list/list.auto.go | 4 +- pkg/cmd/smartgroups/get/get.auto.go | 10 +++ pkg/cmd/smartgroups/list/list.auto.go | 8 +++ pkg/cmd/software/get/get.auto.go | 10 +++ pkg/cmd/software/list/list.auto.go | 10 +++ pkg/cmd/software/versions/get/get.auto.go | 10 ++- pkg/cmd/software/versions/list/list.auto.go | 8 +++ .../Find-ByTextManagedObjectCollection.ps1 | 23 ++++-- .../Public/Find-DeviceServiceCollection.ps1 | 20 ++++++ .../Public/Find-ManagedObjectCollection.ps1 | 22 +++++- tools/PSc8y/Public/Get-Agent.ps1 | 27 ++++++- tools/PSc8y/Public/Get-AgentCollection.ps1 | 20 ++++++ tools/PSc8y/Public/Get-Configuration.ps1 | 27 ++++++- .../Public/Get-ConfigurationCollection.ps1 | 27 ++++++- tools/PSc8y/Public/Get-Device.ps1 | 27 ++++++- .../Public/Get-DeviceChildCollection.ps1 | 7 +- tools/PSc8y/Public/Get-DeviceCollection.ps1 | 20 ++++++ tools/PSc8y/Public/Get-DeviceGroup.ps1 | 27 ++++++- .../Public/Get-DeviceGroupChildCollection.ps1 | 7 +- .../Public/Get-DeviceGroupCollection.ps1 | 21 +++++- tools/PSc8y/Public/Get-DeviceProfile.ps1 | 27 ++++++- .../Public/Get-DeviceProfileCollection.ps1 | 27 ++++++- tools/PSc8y/Public/Get-DeviceService.ps1 | 27 ++++++- tools/PSc8y/Public/Get-Firmware.ps1 | 27 ++++++- tools/PSc8y/Public/Get-FirmwareCollection.ps1 | 27 ++++++- tools/PSc8y/Public/Get-FirmwarePatch.ps1 | 22 +++++- .../Public/Get-FirmwarePatchCollection.ps1 | 20 ++++++ tools/PSc8y/Public/Get-FirmwareVersion.ps1 | 22 +++++- .../Public/Get-FirmwareVersionCollection.ps1 | 20 ++++++ tools/PSc8y/Public/Get-ManagedObject.ps1 | 18 +++-- .../Get-ManagedObjectChildCollection.ps1 | 7 +- .../Public/Get-ManagedObjectCollection.ps1 | 7 +- tools/PSc8y/Public/Get-SmartGroup.ps1 | 27 ++++++- .../PSc8y/Public/Get-SmartGroupCollection.ps1 | 20 ++++++ tools/PSc8y/Public/Get-Software.ps1 | 27 ++++++- tools/PSc8y/Public/Get-SoftwareCollection.ps1 | 27 ++++++- tools/PSc8y/Public/Get-SoftwareVersion.ps1 | 22 +++++- .../Public/Get-SoftwareVersionCollection.ps1 | 20 ++++++ 101 files changed, 2085 insertions(+), 76 deletions(-) diff --git a/api/spec/json/agents.json b/api/spec/json/agents.json index 01abe6bcd..a17af300b 100644 --- a/api/spec/json/agents.json +++ b/api/spec/json/agents.json @@ -161,6 +161,26 @@ } ] }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "boolean", @@ -217,6 +237,33 @@ "required": true, "description": "Agent ID" } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { diff --git a/api/spec/json/configuration.json b/api/spec/json/configuration.json index fabd45b52..a2df14311 100644 --- a/api/spec/json/configuration.json +++ b/api/spec/json/configuration.json @@ -97,6 +97,31 @@ "format": "(description eq '%s')" } ] + }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, @@ -247,6 +272,33 @@ "required": true, "description": "Configuration package (managedObject) id" } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { diff --git a/api/spec/json/deviceGroups.json b/api/spec/json/deviceGroups.json index 8c2f40d7b..ee298a5cd 100644 --- a/api/spec/json/deviceGroups.json +++ b/api/spec/json/deviceGroups.json @@ -112,15 +112,30 @@ ] }, { - "name": "withParents", + "name": "skipChildrenNames", "type": "boolean", - "description": "Include a flat list of all parents and grandparents of the given object" + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" }, { "name": "withChildren", "type": "booleanDefault", "default": "false", "description": "Include names of child assets (only use where necessary as it is slow for large groups)" + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, @@ -173,6 +188,33 @@ "required": true, "description": "Device group ID" } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { @@ -708,6 +750,18 @@ "required": true, "description": "Device Group." } + ], + "queryParameters": [ + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + } ] } ] diff --git a/api/spec/json/deviceGroupsChildren.json b/api/spec/json/deviceGroupsChildren.json index e0930db3a..4fd959f28 100644 --- a/api/spec/json/deviceGroupsChildren.json +++ b/api/spec/json/deviceGroupsChildren.json @@ -98,6 +98,11 @@ "name": "withChildren", "type": "boolean", "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" } ] }, diff --git a/api/spec/json/deviceProfile.json b/api/spec/json/deviceProfile.json index d27412756..57008e253 100644 --- a/api/spec/json/deviceProfile.json +++ b/api/spec/json/deviceProfile.json @@ -80,6 +80,31 @@ ] } ] + }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, @@ -197,6 +222,33 @@ "required": true, "description": "DeviceProfile (managedObject) id" } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { diff --git a/api/spec/json/devices.json b/api/spec/json/devices.json index 0b3855a2f..761d72ba1 100644 --- a/api/spec/json/devices.json +++ b/api/spec/json/devices.json @@ -179,6 +179,26 @@ } ] }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "boolean", @@ -235,6 +255,33 @@ "required": true, "description": "Device ID" } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { diff --git a/api/spec/json/devicesChildren.json b/api/spec/json/devicesChildren.json index 40c027b8f..f82a240b5 100644 --- a/api/spec/json/devicesChildren.json +++ b/api/spec/json/devicesChildren.json @@ -98,6 +98,11 @@ "name": "withChildren", "type": "boolean", "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" } ] }, diff --git a/api/spec/json/devicesServices.json b/api/spec/json/devicesServices.json index 832e6afe6..be03a946f 100644 --- a/api/spec/json/devicesServices.json +++ b/api/spec/json/devicesServices.json @@ -101,6 +101,26 @@ } ] }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "boolean", @@ -370,6 +390,33 @@ ], "position": 0 } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { diff --git a/api/spec/json/firmware.json b/api/spec/json/firmware.json index 4d4be2d56..b9acd6a1d 100644 --- a/api/spec/json/firmware.json +++ b/api/spec/json/firmware.json @@ -91,6 +91,31 @@ "format": "(description eq '%s')" } ] + }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, @@ -251,6 +276,33 @@ "id" ] } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { diff --git a/api/spec/json/firmwarePatches.json b/api/spec/json/firmwarePatches.json index fda694e3a..330119b06 100644 --- a/api/spec/json/firmwarePatches.json +++ b/api/spec/json/firmwarePatches.json @@ -122,6 +122,26 @@ } ] }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "booleanDefault", @@ -191,10 +211,30 @@ } ], "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "booleanDefault", - "description": "Include parent references", + "description": "Include a flat list of all parents and grandparents of the given object", "default": "true" } ] diff --git a/api/spec/json/firmwareVersions.json b/api/spec/json/firmwareVersions.json index 28067473b..54790a24f 100644 --- a/api/spec/json/firmwareVersions.json +++ b/api/spec/json/firmwareVersions.json @@ -115,6 +115,26 @@ } ] }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "booleanDefault", @@ -186,10 +206,30 @@ } ], "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "boolean", - "description": "Include parent references" + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, diff --git a/api/spec/json/inventory.json b/api/spec/json/inventory.json index 5289feaa9..f86515b89 100644 --- a/api/spec/json/inventory.json +++ b/api/spec/json/inventory.json @@ -117,13 +117,18 @@ { "name": "withParents", "type": "boolean", - "description": "include a flat list of all parents and grandparents of the given object" + "description": "Include a flat list of all parents and grandparents of the given object" }, { "name": "withChildren", "type": "boolean", "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, { "name": "withGroups", "type": "boolean", @@ -291,14 +296,29 @@ "description": "ManagedObject fragment type." }, { - "name": "withParents", + "name": "skipChildrenNames", "type": "boolean", - "description": "include a flat list of all parents and grandparents of the given object" + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" }, { - "name": "skipChildrenNames", + "name": "withChildren", "type": "boolean", - "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, @@ -454,10 +474,30 @@ } ] }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "boolean", - "description": "include a flat list of all parents and grandparents of the given object" + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, @@ -592,14 +632,24 @@ "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" }, { - "name": "withParents", + "name": "withChildren", "type": "boolean", - "description": "include a flat list of all parents and grandparents of the given object" + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." }, { - "name": "withChildren", + "name": "withChildrenCount", "type": "boolean", - "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, diff --git a/api/spec/json/inventoryAdditions.json b/api/spec/json/inventoryAdditions.json index 86e4b64f8..44432351f 100644 --- a/api/spec/json/inventoryAdditions.json +++ b/api/spec/json/inventoryAdditions.json @@ -105,6 +105,11 @@ "name": "withChildren", "type": "boolean", "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" } ] }, diff --git a/api/spec/json/inventoryAssets.json b/api/spec/json/inventoryAssets.json index adeb95744..fc0d2b7c1 100644 --- a/api/spec/json/inventoryAssets.json +++ b/api/spec/json/inventoryAssets.json @@ -98,6 +98,11 @@ "name": "withChildren", "type": "boolean", "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" } ] }, diff --git a/api/spec/json/inventoryChildren.json b/api/spec/json/inventoryChildren.json index 736099fc5..5d72cf9ad 100644 --- a/api/spec/json/inventoryChildren.json +++ b/api/spec/json/inventoryChildren.json @@ -98,6 +98,11 @@ "name": "withChildren", "type": "boolean", "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" } ] }, diff --git a/api/spec/json/smartgroups.json b/api/spec/json/smartgroups.json index b8efbda17..28c91ad7a 100644 --- a/api/spec/json/smartgroups.json +++ b/api/spec/json/smartgroups.json @@ -64,6 +64,33 @@ "required": true, "description": "Smart group ID" } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { @@ -419,6 +446,26 @@ } ] }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "boolean", diff --git a/api/spec/json/software.json b/api/spec/json/software.json index 58b8a5d14..1ce6de88b 100644 --- a/api/spec/json/software.json +++ b/api/spec/json/software.json @@ -92,6 +92,31 @@ "format": "(description eq '%s')" } ] + }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, @@ -252,6 +277,33 @@ "required": true, "description": "Software package (managedObject) id" } + ], + "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, + { + "name": "withParents", + "type": "boolean", + "description": "Include a flat list of all parents and grandparents of the given object" + } ] }, { diff --git a/api/spec/json/softwareVersions.json b/api/spec/json/softwareVersions.json index 015496a45..27614c869 100644 --- a/api/spec/json/softwareVersions.json +++ b/api/spec/json/softwareVersions.json @@ -108,6 +108,26 @@ } ] }, + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "booleanDefault", @@ -184,10 +204,30 @@ } ], "queryParameters": [ + { + "name": "skipChildrenNames", + "type": "boolean", + "description": "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved" + }, + { + "name": "withChildren", + "type": "boolean", + "description": "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance." + }, + { + "name": "withChildrenCount", + "type": "boolean", + "description": "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)" + }, + { + "name": "withGroups", + "type": "boolean", + "description": "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups." + }, { "name": "withParents", "type": "boolean", - "description": "Include parent references" + "description": "Include a flat list of all parents and grandparents of the given object" } ] }, diff --git a/api/spec/yaml/agents.yaml b/api/spec/yaml/agents.yaml index 265149271..65bac1670 100644 --- a/api/spec/yaml/agents.yaml +++ b/api/spec/yaml/agents.yaml @@ -130,6 +130,22 @@ endpoints: description: Filter by group inclusion format: bygroupid(%s) + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: boolean description: Include a flat list of all parents and grandparents of the given object @@ -169,6 +185,27 @@ endpoints: pipeline: true required: true description: Agent ID + + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object - name: updateAgent description: 'Update agent' diff --git a/api/spec/yaml/configuration.yaml b/api/spec/yaml/configuration.yaml index b5fc48e06..f94b8c86f 100644 --- a/api/spec/yaml/configuration.yaml +++ b/api/spec/yaml/configuration.yaml @@ -78,6 +78,26 @@ endpoints: description: Filter by description format: (description eq '%s') + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: newConfiguration skip: false method: POST @@ -193,6 +213,27 @@ endpoints: required: true description: Configuration package (managedObject) id + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: updateConfiguration method: PUT path: inventory/managedObjects/{id} diff --git a/api/spec/yaml/deviceGroups.yaml b/api/spec/yaml/deviceGroups.yaml index 53a78406d..c6953b5fe 100644 --- a/api/spec/yaml/deviceGroups.yaml +++ b/api/spec/yaml/deviceGroups.yaml @@ -89,15 +89,26 @@ endpoints: description: Filter by group inclusion format: bygroupid(%s) - - name: withParents + - name: skipChildrenNames type: boolean - description: Include a flat list of all parents and grandparents of the given object + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved - name: withChildren type: booleanDefault default: "false" description: Include names of child assets (only use where necessary as it is slow for large groups) + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object - name: getDeviceGroup description: Get device group @@ -136,6 +147,27 @@ endpoints: required: true description: Device group ID + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: updateDeviceGroup description: Update device group descriptionLong: | @@ -531,3 +563,12 @@ endpoints: pipeline: true required: true description: Device Group. + + queryParameters: + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) diff --git a/api/spec/yaml/deviceGroupsChildren.yaml b/api/spec/yaml/deviceGroupsChildren.yaml index 771726fec..ab8953315 100644 --- a/api/spec/yaml/deviceGroupsChildren.yaml +++ b/api/spec/yaml/deviceGroupsChildren.yaml @@ -78,6 +78,10 @@ endpoints: type: boolean description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + - name: assignChild method: POST path: inventory/managedObjects/{id}/{childType} diff --git a/api/spec/yaml/deviceProfile.yaml b/api/spec/yaml/deviceProfile.yaml index 042af6192..693ccee52 100644 --- a/api/spec/yaml/deviceProfile.yaml +++ b/api/spec/yaml/deviceProfile.yaml @@ -64,6 +64,26 @@ endpoints: - "c8y_Software.name" - "name" + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: newDeviceProfile method: POST path: inventory/managedObjects @@ -148,6 +168,27 @@ endpoints: required: true description: DeviceProfile (managedObject) id + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: updateDeviceProfile method: PUT path: inventory/managedObjects/{id} diff --git a/api/spec/yaml/devices.yaml b/api/spec/yaml/devices.yaml index d629fa4c1..04a04b96f 100644 --- a/api/spec/yaml/devices.yaml +++ b/api/spec/yaml/devices.yaml @@ -140,6 +140,22 @@ endpoints: description: Filter by group inclusion format: bygroupid(%s) + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: boolean description: Include a flat list of all parents and grandparents of the given object @@ -179,6 +195,27 @@ endpoints: pipeline: true required: true description: Device ID + + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object - name: updateDevice description: Update device diff --git a/api/spec/yaml/devicesChildren.yaml b/api/spec/yaml/devicesChildren.yaml index 30a0ad62c..e11ae6622 100644 --- a/api/spec/yaml/devicesChildren.yaml +++ b/api/spec/yaml/devicesChildren.yaml @@ -78,6 +78,10 @@ endpoints: type: boolean description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + - name: assignChild method: POST path: inventory/managedObjects/{id}/{childType} diff --git a/api/spec/yaml/devicesServices.yaml b/api/spec/yaml/devicesServices.yaml index b325fad50..e1a6f2caf 100644 --- a/api/spec/yaml/devicesServices.yaml +++ b/api/spec/yaml/devicesServices.yaml @@ -78,6 +78,23 @@ endpoints: - name: orderBy type: string description: Order by. e.g. _id asc or name asc or creationTime.date desc + + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: boolean description: Include a flat list of all parents and grandparents of the given object @@ -284,6 +301,27 @@ endpoints: - device position: 0 + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: update method: PUT path: inventory/managedObjects/{id} diff --git a/api/spec/yaml/firmware.yaml b/api/spec/yaml/firmware.yaml index 237ef561f..f8eb3678a 100644 --- a/api/spec/yaml/firmware.yaml +++ b/api/spec/yaml/firmware.yaml @@ -73,6 +73,26 @@ endpoints: description: Filter by description format: (description eq '%s') + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: newFirmware method: POST path: inventory/managedObjects @@ -192,6 +212,27 @@ endpoints: - additionParents.references.0.managedObject.id - id + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: updateFirmware method: PUT path: inventory/managedObjects/{id} diff --git a/api/spec/yaml/firmwarePatches.yaml b/api/spec/yaml/firmwarePatches.yaml index 4dcc6c090..054aa042b 100644 --- a/api/spec/yaml/firmwarePatches.yaml +++ b/api/spec/yaml/firmwarePatches.yaml @@ -96,6 +96,22 @@ endpoints: description: Filter by url format: (c8y_Firmware.url eq '%s') + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: booleanDefault description: Include parent references @@ -145,11 +161,27 @@ endpoints: type: '[]firmware' required: false description: Firmware package id or name (used to help completion be more accurate) - + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: booleanDefault - description: Include parent references + description: Include a flat list of all parents and grandparents of the given object default: 'true' - name: deletePatch diff --git a/api/spec/yaml/firmwareVersions.yaml b/api/spec/yaml/firmwareVersions.yaml index ea61e439a..e5d68f322 100644 --- a/api/spec/yaml/firmwareVersions.yaml +++ b/api/spec/yaml/firmwareVersions.yaml @@ -91,6 +91,22 @@ endpoints: description: Filter by url format: (c8y_Firmware.url eq '%s') + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: booleanDefault description: Include parent references @@ -144,9 +160,25 @@ endpoints: description: Firmware package id or name (used to help completion be more accurate) queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: boolean - description: Include parent references + description: Include a flat list of all parents and grandparents of the given object - name: deleteFirmwareVersion description: Delete firmware package version diff --git a/api/spec/yaml/inventory.yaml b/api/spec/yaml/inventory.yaml index 36175285c..88f6cc823 100644 --- a/api/spec/yaml/inventory.yaml +++ b/api/spec/yaml/inventory.yaml @@ -93,11 +93,15 @@ endpoints: - name: withParents type: boolean - description: include a flat list of all parents and grandparents of the given object + description: Include a flat list of all parents and grandparents of the given object - name: withChildren type: boolean description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) - name: withGroups type: boolean @@ -224,14 +228,26 @@ endpoints: type: string description: ManagedObject fragment type. - - name: withParents - type: boolean - description: include a flat list of all parents and grandparents of the given object - - name: skipChildrenNames type: boolean description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: findManagedObjectCollection method: GET @@ -354,9 +370,25 @@ endpoints: description: Only include devices (deprecated) value: 'has(c8y_IsDevice)' + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: boolean - description: include a flat list of all parents and grandparents of the given object + description: Include a flat list of all parents and grandparents of the given object - name: newManagedObject method: POST @@ -451,15 +483,23 @@ endpoints: - name: skipChildrenNames type: boolean description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved - - - name: withParents - type: boolean - description: include a flat list of all parents and grandparents of the given object - + - name: withChildren type: boolean description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: updateManagedObject method: PUT path: inventory/managedObjects/{id} diff --git a/api/spec/yaml/inventoryAdditions.yaml b/api/spec/yaml/inventoryAdditions.yaml index 8b716ee7f..fd890c493 100644 --- a/api/spec/yaml/inventoryAdditions.yaml +++ b/api/spec/yaml/inventoryAdditions.yaml @@ -83,6 +83,10 @@ endpoints: type: boolean description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + - name: assignChildAddition method: POST path: inventory/managedObjects/{id}/childAdditions diff --git a/api/spec/yaml/inventoryAssets.yaml b/api/spec/yaml/inventoryAssets.yaml index dd35224b8..d3f999ad6 100644 --- a/api/spec/yaml/inventoryAssets.yaml +++ b/api/spec/yaml/inventoryAssets.yaml @@ -79,6 +79,10 @@ endpoints: type: boolean description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + - name: assignAsset description: Assign child asset descriptionLong: Assigns a group or device to an existing group and marks them as assets diff --git a/api/spec/yaml/inventoryChildren.yaml b/api/spec/yaml/inventoryChildren.yaml index 7bcd8f9a4..c3849f80c 100644 --- a/api/spec/yaml/inventoryChildren.yaml +++ b/api/spec/yaml/inventoryChildren.yaml @@ -78,6 +78,10 @@ endpoints: type: boolean description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + - name: assignChild method: POST path: inventory/managedObjects/{id}/{childType} diff --git a/api/spec/yaml/smartgroups.yaml b/api/spec/yaml/smartgroups.yaml index f13d90bac..5ce2986a3 100644 --- a/api/spec/yaml/smartgroups.yaml +++ b/api/spec/yaml/smartgroups.yaml @@ -42,7 +42,6 @@ endpoints: json: path: r//inventory/managedObjects/\d+$ - pathParameters: - name: id type: '[]smartgroup' @@ -50,6 +49,27 @@ endpoints: required: true description: Smart group ID + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: updateSmartGroup description: Update smart group descriptionLong: Update properties of an existing smart group @@ -319,7 +339,23 @@ endpoints: type: booleanDefault description: Only include visible smart groups value: not(has(c8y_IsDynamicGroup.invisible)) + + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: boolean description: Include a flat list of all parents and grandparents of the given object diff --git a/api/spec/yaml/software.yaml b/api/spec/yaml/software.yaml index 03ff9d7da..8ed22bbb2 100644 --- a/api/spec/yaml/software.yaml +++ b/api/spec/yaml/software.yaml @@ -75,6 +75,26 @@ endpoints: description: Filter by description format: (description eq '%s') + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: newSoftware method: POST path: inventory/managedObjects @@ -193,6 +213,27 @@ endpoints: required: true description: Software package (managedObject) id + queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + + - name: withParents + type: boolean + description: Include a flat list of all parents and grandparents of the given object + - name: updateSoftware method: PUT path: inventory/managedObjects/{id} diff --git a/api/spec/yaml/softwareVersions.yaml b/api/spec/yaml/softwareVersions.yaml index e0220be5b..bf0b0ce61 100644 --- a/api/spec/yaml/softwareVersions.yaml +++ b/api/spec/yaml/softwareVersions.yaml @@ -85,6 +85,22 @@ endpoints: description: Filter by url format: (c8y_Software.url eq '%s') + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: booleanDefault description: Include parent references @@ -141,9 +157,25 @@ endpoints: description: Software package id (used to help completion be more accurate) queryParameters: + - name: skipChildrenNames + type: boolean + description: Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + + - name: withChildren + type: boolean + description: Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + + - name: withChildrenCount + type: boolean + description: When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + + - name: withGroups + type: boolean + description: When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + - name: withParents type: boolean - description: Include parent references + description: Include a flat list of all parents and grandparents of the given object - name: deleteSoftwareVersion diff --git a/pkg/cmd/agents/get/get.auto.go b/pkg/cmd/agents/get/get.auto.go index 858ecd2df..bdf174575 100644 --- a/pkg/cmd/agents/get/get.auto.go +++ b/pkg/cmd/agents/get/get.auto.go @@ -47,6 +47,11 @@ Get agent by id cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "Agent ID (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -94,6 +99,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/agents/list/list.auto.go b/pkg/cmd/agents/list/list.auto.go index 20333f28c..6308e2bb4 100644 --- a/pkg/cmd/agents/list/list.auto.go +++ b/pkg/cmd/agents/list/list.auto.go @@ -71,6 +71,10 @@ Find an agent by name, then find other agents which the same type cmd.Flags().String("creationTimeDateTo", "", "Filter creationTime.date to a specific date") cmd.Flags().String("creationTimeDateFrom", "", "Filter creationTime.date from a specific date") cmd.Flags().StringSlice("group", []string{""}, "Filter by group inclusion") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( @@ -126,6 +130,10 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( diff --git a/pkg/cmd/configuration/get/get.auto.go b/pkg/cmd/configuration/get/get.auto.go index efa582ae0..857c6ff56 100644 --- a/pkg/cmd/configuration/get/get.auto.go +++ b/pkg/cmd/configuration/get/get.auto.go @@ -47,6 +47,11 @@ Get a configuration package cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "Configuration package (managedObject) id (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -93,6 +98,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/configuration/list/list.auto.go b/pkg/cmd/configuration/list/list.auto.go index 6f259501c..ec097ff0a 100644 --- a/pkg/cmd/configuration/list/list.auto.go +++ b/pkg/cmd/configuration/list/list.auto.go @@ -52,6 +52,11 @@ Get a list of configuration files cmd.Flags().String("name", "", "Filter by name") cmd.Flags().String("deviceType", "", "Filter by deviceType") cmd.Flags().String("description", "", "Filter by description") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -99,6 +104,11 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/devicegroups/children/list/list.auto.go b/pkg/cmd/devicegroups/children/list/list.auto.go index af7f91373..294310ea1 100644 --- a/pkg/cmd/devicegroups/children/list/list.auto.go +++ b/pkg/cmd/devicegroups/children/list/list.auto.go @@ -55,6 +55,7 @@ Get a list of the child devices of an existing managed object cmd.Flags().String("queryTemplate", "", "String template to be used when applying the given query. Use %s to reference the query/pipeline input") cmd.Flags().String("orderBy", "", "Order by. e.g. _id asc or name asc or creationTime.date desc") cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") completion.WithOptions( cmd, @@ -107,6 +108,7 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/devicegroups/get/get.auto.go b/pkg/cmd/devicegroups/get/get.auto.go index 5f5e6cc12..280afebd1 100644 --- a/pkg/cmd/devicegroups/get/get.auto.go +++ b/pkg/cmd/devicegroups/get/get.auto.go @@ -48,6 +48,11 @@ Get device group by id cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "Device group ID (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -95,6 +100,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/devicegroups/list/list.auto.go b/pkg/cmd/devicegroups/list/list.auto.go index 085ea511e..8eed99644 100644 --- a/pkg/cmd/devicegroups/list/list.auto.go +++ b/pkg/cmd/devicegroups/list/list.auto.go @@ -55,8 +55,11 @@ Get a collection of device groups with names that start with 'parent' cmd.Flags().String("owner", "", "Filter by owner") cmd.Flags().Bool("excludeRootGroup", false, "Filter by group inclusion") cmd.Flags().StringSlice("group", []string{""}, "Filter by group inclusion") - cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") cmd.Flags().Bool("withChildren", false, "Include names of child assets (only use where necessary as it is slow for large groups)") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -106,8 +109,11 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), - flags.WithBoolValue("withParents", "withParents", ""), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), flags.WithDefaultBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/devicegroups/listassets/listAssets.auto.go b/pkg/cmd/devicegroups/listassets/listAssets.auto.go index f7af2b343..e9e08d65a 100644 --- a/pkg/cmd/devicegroups/listassets/listAssets.auto.go +++ b/pkg/cmd/devicegroups/listassets/listAssets.auto.go @@ -49,6 +49,8 @@ Get a list of the child devices of an existing device cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "Device Group. (required) (accepts pipeline)") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") completion.WithOptions( cmd, @@ -99,6 +101,8 @@ func (n *ListAssetsCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/deviceprofiles/get/get.auto.go b/pkg/cmd/deviceprofiles/get/get.auto.go index b49b89c30..4242d568f 100644 --- a/pkg/cmd/deviceprofiles/get/get.auto.go +++ b/pkg/cmd/deviceprofiles/get/get.auto.go @@ -47,6 +47,11 @@ Get a device profile cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "DeviceProfile (managedObject) id (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -93,6 +98,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/deviceprofiles/list/list.auto.go b/pkg/cmd/deviceprofiles/list/list.auto.go index bb06873d8..2b96cfa5b 100644 --- a/pkg/cmd/deviceprofiles/list/list.auto.go +++ b/pkg/cmd/deviceprofiles/list/list.auto.go @@ -49,6 +49,11 @@ Get a list of device profiles cmd.Flags().String("queryTemplate", "", "String template to be used when applying the given query. Use %s to reference the query/pipeline input") cmd.Flags().String("orderBy", "creationTime.date desc,creationTime desc", "Order by. e.g. _id asc or name asc or creationTime.date desc") cmd.Flags().String("name", "", "Filter by name (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -96,6 +101,11 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/devices/children/list/list.auto.go b/pkg/cmd/devices/children/list/list.auto.go index 207687416..5413575a6 100644 --- a/pkg/cmd/devices/children/list/list.auto.go +++ b/pkg/cmd/devices/children/list/list.auto.go @@ -55,6 +55,7 @@ Get a list of the child devices of an existing managed object cmd.Flags().String("queryTemplate", "", "String template to be used when applying the given query. Use %s to reference the query/pipeline input") cmd.Flags().String("orderBy", "", "Order by. e.g. _id asc or name asc or creationTime.date desc") cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") completion.WithOptions( cmd, @@ -107,6 +108,7 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/devices/get/get.auto.go b/pkg/cmd/devices/get/get.auto.go index 67bff5b99..145421e11 100644 --- a/pkg/cmd/devices/get/get.auto.go +++ b/pkg/cmd/devices/get/get.auto.go @@ -47,6 +47,11 @@ Get device by id cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "Device ID (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -94,6 +99,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/devices/list/list.auto.go b/pkg/cmd/devices/list/list.auto.go index f049f6711..34770a914 100644 --- a/pkg/cmd/devices/list/list.auto.go +++ b/pkg/cmd/devices/list/list.auto.go @@ -72,6 +72,10 @@ Get devices with type 'c8y_MacOS' then devices with type 'c8y_Linux' (using pipe cmd.Flags().String("creationTimeDateTo", "", "Filter creationTime.date to a specific date") cmd.Flags().String("creationTimeDateFrom", "", "Filter creationTime.date from a specific date") cmd.Flags().StringSlice("group", []string{""}, "Filter by group inclusion") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( @@ -127,6 +131,10 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( diff --git a/pkg/cmd/devices/services/find/find.auto.go b/pkg/cmd/devices/services/find/find.auto.go index 1677cda15..389eb8da6 100644 --- a/pkg/cmd/devices/services/find/find.auto.go +++ b/pkg/cmd/devices/services/find/find.auto.go @@ -56,6 +56,10 @@ Find any ntp services which are currently down cmd.Flags().String("name", "", "Filter by name") cmd.Flags().String("status", "", "Filter by service status (custom values allowed)") cmd.Flags().String("orderBy", "", "Order by. e.g. _id asc or name asc or creationTime.date desc") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( @@ -105,6 +109,10 @@ func (n *FindCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( diff --git a/pkg/cmd/devices/services/get/get.auto.go b/pkg/cmd/devices/services/get/get.auto.go index 69dada634..6f56ca1c3 100644 --- a/pkg/cmd/devices/services/get/get.auto.go +++ b/pkg/cmd/devices/services/get/get.auto.go @@ -54,6 +54,11 @@ Get service status (using pipeline) cmd.Flags().StringSlice("device", []string{""}, "Device id (required for name lookup)") cmd.Flags().StringSlice("id", []string{""}, "Service id or name (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -102,6 +107,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/firmware/get/get.auto.go b/pkg/cmd/firmware/get/get.auto.go index 4542c5948..83cea8308 100644 --- a/pkg/cmd/firmware/get/get.auto.go +++ b/pkg/cmd/firmware/get/get.auto.go @@ -50,6 +50,11 @@ Get a firmware package (using pipeline) cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "Firmware package (managedObject) id (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -96,6 +101,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/firmware/list/list.auto.go b/pkg/cmd/firmware/list/list.auto.go index bca198313..ec665bc19 100644 --- a/pkg/cmd/firmware/list/list.auto.go +++ b/pkg/cmd/firmware/list/list.auto.go @@ -51,6 +51,11 @@ Get a list of firmware packages cmd.Flags().String("name", "", "Filter by name") cmd.Flags().String("deviceType", "", "Filter by deviceType") cmd.Flags().String("description", "", "Filter by description") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -98,6 +103,11 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/firmware/patches/get/get.auto.go b/pkg/cmd/firmware/patches/get/get.auto.go index 27ca7413a..e8ce0410a 100644 --- a/pkg/cmd/firmware/patches/get/get.auto.go +++ b/pkg/cmd/firmware/patches/get/get.auto.go @@ -48,7 +48,11 @@ Get a firmware patch cmd.Flags().StringSlice("id", []string{""}, "Firmware patch id or name (required) (accepts pipeline)") cmd.Flags().StringSlice("firmware", []string{""}, "Firmware package id or name (used to help completion be more accurate)") - cmd.Flags().Bool("withParents", true, "Include parent references") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", true, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -96,6 +100,10 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithDefaultBoolValue("withParents", "withParents", ""), ) if err != nil { diff --git a/pkg/cmd/firmware/patches/list/list.auto.go b/pkg/cmd/firmware/patches/list/list.auto.go index 9d90ea6e3..18a5e0eb8 100644 --- a/pkg/cmd/firmware/patches/list/list.auto.go +++ b/pkg/cmd/firmware/patches/list/list.auto.go @@ -56,6 +56,10 @@ Get a list of firmware patches where the dependency version starts with '1.' cmd.Flags().String("dependency", "", "Patch dependency version") cmd.Flags().String("version", "", "Patch version") cmd.Flags().String("url", "", "Filter by url") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") cmd.Flags().Bool("withParents", true, "Include parent references") completion.WithOptions( @@ -105,6 +109,10 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithDefaultBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( diff --git a/pkg/cmd/firmware/versions/get/get.auto.go b/pkg/cmd/firmware/versions/get/get.auto.go index 2cb32f107..d062b3ffc 100644 --- a/pkg/cmd/firmware/versions/get/get.auto.go +++ b/pkg/cmd/firmware/versions/get/get.auto.go @@ -51,7 +51,11 @@ Get a firmware package version using pipeline cmd.Flags().StringSlice("id", []string{""}, "Firmware Package version id or name (required) (accepts pipeline)") cmd.Flags().StringSlice("firmware", []string{""}, "Firmware package id or name (used to help completion be more accurate)") - cmd.Flags().Bool("withParents", false, "Include parent references") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -99,6 +103,10 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { diff --git a/pkg/cmd/firmware/versions/list/list.auto.go b/pkg/cmd/firmware/versions/list/list.auto.go index 72b319ab6..8e26d2b59 100644 --- a/pkg/cmd/firmware/versions/list/list.auto.go +++ b/pkg/cmd/firmware/versions/list/list.auto.go @@ -58,6 +58,10 @@ Get all versions of a firmware using an existing version object cmd.Flags().StringSlice("firmware", []string{""}, "Firmware package id or name (required) (accepts pipeline)") cmd.Flags().String("version", "", "Filter by version") cmd.Flags().String("url", "", "Filter by url") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") cmd.Flags().Bool("withParents", true, "Include parent references") completion.WithOptions( @@ -107,6 +111,10 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithDefaultBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( diff --git a/pkg/cmd/inventory/additions/list/list.auto.go b/pkg/cmd/inventory/additions/list/list.auto.go index 58878c558..76fc1c145 100644 --- a/pkg/cmd/inventory/additions/list/list.auto.go +++ b/pkg/cmd/inventory/additions/list/list.auto.go @@ -51,6 +51,7 @@ Get a list of the child additions of an existing managed object cmd.Flags().String("queryTemplate", "", "String template to be used when applying the given query. Use %s to reference the query/pipeline input") cmd.Flags().String("orderBy", "", "Order by. e.g. _id asc or name asc or creationTime.date desc") cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") completion.WithOptions( cmd, @@ -99,6 +100,7 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/inventory/assets/list/list.auto.go b/pkg/cmd/inventory/assets/list/list.auto.go index bb63272f9..7dc60fa98 100644 --- a/pkg/cmd/inventory/assets/list/list.auto.go +++ b/pkg/cmd/inventory/assets/list/list.auto.go @@ -54,6 +54,7 @@ Get a list of the child devices using pipeline cmd.Flags().String("queryTemplate", "", "String template to be used when applying the given query. Use %s to reference the query/pipeline input") cmd.Flags().String("orderBy", "", "Order by. e.g. _id asc or name asc or creationTime.date desc") cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") completion.WithOptions( cmd, @@ -102,6 +103,7 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/inventory/children/list/list.auto.go b/pkg/cmd/inventory/children/list/list.auto.go index ad0fd8e87..8db672dbb 100644 --- a/pkg/cmd/inventory/children/list/list.auto.go +++ b/pkg/cmd/inventory/children/list/list.auto.go @@ -55,6 +55,7 @@ Get a list of the child devices of an existing managed object cmd.Flags().String("queryTemplate", "", "String template to be used when applying the given query. Use %s to reference the query/pipeline input") cmd.Flags().String("orderBy", "", "Order by. e.g. _id asc or name asc or creationTime.date desc") cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") completion.WithOptions( cmd, @@ -105,6 +106,7 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/inventory/find/find.auto.go b/pkg/cmd/inventory/find/find.auto.go index bd09d75f5..a9e27e024 100644 --- a/pkg/cmd/inventory/find/find.auto.go +++ b/pkg/cmd/inventory/find/find.auto.go @@ -67,7 +67,11 @@ Invert a given query received via piped input (stdin) by using a template cmd.Flags().String("creationTimeDateFrom", "", "Filter creationTime.date from a specific date") cmd.Flags().StringSlice("group", []string{""}, "Filter by group inclusion") cmd.Flags().Bool("onlyDevices", false, "Only include devices (deprecated)") - cmd.Flags().Bool("withParents", false, "include a flat list of all parents and grandparents of the given object") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -124,6 +128,10 @@ func (n *FindCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( diff --git a/pkg/cmd/inventory/findbytext/findByText.auto.go b/pkg/cmd/inventory/findbytext/findByText.auto.go index 29f07de43..310caf531 100644 --- a/pkg/cmd/inventory/findbytext/findByText.auto.go +++ b/pkg/cmd/inventory/findbytext/findByText.auto.go @@ -54,8 +54,11 @@ Find managed objects which contain the text 'myText' and is a device (using pipe cmd.Flags().String("text", "", "managed objects containing a text value starting with the given text (placeholder {text}). Text value is any alphanumeric string starting with a latin letter (A-Z or a-z). (required) (accepts pipeline)") cmd.Flags().String("type", "", "ManagedObject type.") cmd.Flags().String("fragmentType", "", "ManagedObject fragment type.") - cmd.Flags().Bool("withParents", false, "include a flat list of all parents and grandparents of the given object") cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -106,8 +109,11 @@ func (n *FindByTextCmd) RunE(cmd *cobra.Command, args []string) error { flags.WithStringValue("text", "text"), flags.WithStringValue("type", "type"), flags.WithStringValue("fragmentType", "fragmentType"), - flags.WithBoolValue("withParents", "withParents", ""), flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/inventory/get/get.auto.go b/pkg/cmd/inventory/get/get.auto.go index df1c13165..9246c795e 100644 --- a/pkg/cmd/inventory/get/get.auto.go +++ b/pkg/cmd/inventory/get/get.auto.go @@ -51,8 +51,10 @@ Get a managed object with parent references cmd.Flags().StringSlice("id", []string{""}, "ManagedObject id (required) (accepts pipeline)") cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") - cmd.Flags().Bool("withParents", false, "include a flat list of all parents and grandparents of the given object") cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -99,8 +101,10 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), - flags.WithBoolValue("withParents", "withParents", ""), flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/inventory/list/list.auto.go b/pkg/cmd/inventory/list/list.auto.go index 03ff46a66..298dbfb19 100644 --- a/pkg/cmd/inventory/list/list.auto.go +++ b/pkg/cmd/inventory/list/list.auto.go @@ -65,8 +65,9 @@ Get managed objects which have the same type as the managed object id=1234. pipe cmd.Flags().String("childAssetId", "", "Search for a specific child asset and list all the groups to which it belongs.") cmd.Flags().StringSlice("childDeviceId", []string{""}, "Search for a specific child device and list all the groups to which it belongs.") cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") - cmd.Flags().Bool("withParents", false, "include a flat list of all parents and grandparents of the given object") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") completion.WithOptions( @@ -129,6 +130,7 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), flags.WithBoolValue("withParents", "withParents", ""), flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), flags.WithBoolValue("withGroups", "withGroups", ""), ) if err != nil { diff --git a/pkg/cmd/smartgroups/get/get.auto.go b/pkg/cmd/smartgroups/get/get.auto.go index c9915c9fd..6a6b262b5 100644 --- a/pkg/cmd/smartgroups/get/get.auto.go +++ b/pkg/cmd/smartgroups/get/get.auto.go @@ -50,6 +50,11 @@ Get smart group by name cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "Smart group ID (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -97,6 +102,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/smartgroups/list/list.auto.go b/pkg/cmd/smartgroups/list/list.auto.go index d5f611d63..c45944cf3 100644 --- a/pkg/cmd/smartgroups/list/list.auto.go +++ b/pkg/cmd/smartgroups/list/list.auto.go @@ -60,6 +60,10 @@ Get a list of smart groups with their names starting with 'myText', then get the cmd.Flags().String("owner", "", "Filter by owner") cmd.Flags().Bool("onlyInvisible", false, "Only include invisible smart groups") cmd.Flags().Bool("onlyVisible", false, "Only include visible smart groups") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( @@ -108,6 +112,10 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( diff --git a/pkg/cmd/software/get/get.auto.go b/pkg/cmd/software/get/get.auto.go index 5467b6cdd..e51b253dd 100644 --- a/pkg/cmd/software/get/get.auto.go +++ b/pkg/cmd/software/get/get.auto.go @@ -47,6 +47,11 @@ Get a software package cmd.SilenceUsage = true cmd.Flags().StringSlice("id", []string{""}, "Software package (managedObject) id (required) (accepts pipeline)") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -93,6 +98,11 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { return cmderrors.NewUserError(err) diff --git a/pkg/cmd/software/list/list.auto.go b/pkg/cmd/software/list/list.auto.go index d875a01f0..797f9a5c3 100644 --- a/pkg/cmd/software/list/list.auto.go +++ b/pkg/cmd/software/list/list.auto.go @@ -54,6 +54,11 @@ Get a list of software packages starting with "python3" cmd.Flags().String("name", "", "Filter by name") cmd.Flags().String("deviceType", "", "Filter by deviceType") cmd.Flags().String("description", "", "Filter by description") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -101,6 +106,11 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), + flags.WithBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( []flags.GetOption{ diff --git a/pkg/cmd/software/versions/get/get.auto.go b/pkg/cmd/software/versions/get/get.auto.go index ece1f530f..693c9a604 100644 --- a/pkg/cmd/software/versions/get/get.auto.go +++ b/pkg/cmd/software/versions/get/get.auto.go @@ -48,7 +48,11 @@ Get a software package version using name cmd.Flags().StringSlice("id", []string{""}, "Software Package version id or name (required) (accepts pipeline)") cmd.Flags().StringSlice("software", []string{""}, "Software package id (used to help completion be more accurate)") - cmd.Flags().Bool("withParents", false, "Include parent references") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") + cmd.Flags().Bool("withParents", false, "Include a flat list of all parents and grandparents of the given object") completion.WithOptions( cmd, @@ -96,6 +100,10 @@ func (n *GetCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithBoolValue("withParents", "withParents", ""), ) if err != nil { diff --git a/pkg/cmd/software/versions/list/list.auto.go b/pkg/cmd/software/versions/list/list.auto.go index 14b929750..c1d4b591f 100644 --- a/pkg/cmd/software/versions/list/list.auto.go +++ b/pkg/cmd/software/versions/list/list.auto.go @@ -55,6 +55,10 @@ Get a list of software package versions from multiple software packages cmd.Flags().StringSlice("software", []string{""}, "Software package id or name (accepts pipeline)") cmd.Flags().String("version", "", "Filter by version") cmd.Flags().String("url", "", "Filter by url") + cmd.Flags().Bool("skipChildrenNames", false, "Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved") + cmd.Flags().Bool("withChildren", false, "Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance.") + cmd.Flags().Bool("withChildrenCount", false, "When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices)") + cmd.Flags().Bool("withGroups", false, "When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups.") cmd.Flags().Bool("withParents", true, "Include parent references") completion.WithOptions( @@ -104,6 +108,10 @@ func (n *ListCmd) RunE(cmd *cobra.Command, args []string) error { query, inputIterators, flags.WithCustomStringSlice(func() ([]string, error) { return cfg.GetQueryParameters(), nil }, "custom"), + flags.WithBoolValue("skipChildrenNames", "skipChildrenNames", ""), + flags.WithBoolValue("withChildren", "withChildren", ""), + flags.WithBoolValue("withChildrenCount", "withChildrenCount", ""), + flags.WithBoolValue("withGroups", "withGroups", ""), flags.WithDefaultBoolValue("withParents", "withParents", ""), flags.WithCumulocityQuery( diff --git a/tools/PSc8y/Public/Find-ByTextManagedObjectCollection.ps1 b/tools/PSc8y/Public/Find-ByTextManagedObjectCollection.ps1 index bcf03da25..71c19ef4b 100644 --- a/tools/PSc8y/Public/Find-ByTextManagedObjectCollection.ps1 +++ b/tools/PSc8y/Public/Find-ByTextManagedObjectCollection.ps1 @@ -44,15 +44,30 @@ Find managed objects which contain the text 'myText' (using pipeline) [string] $FragmentType, - # include a flat list of all parents and grandparents of the given object + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved [Parameter()] [switch] - $WithParents, + $SkipChildrenNames, - # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] - $SkipChildrenNames + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Find-DeviceServiceCollection.ps1 b/tools/PSc8y/Public/Find-DeviceServiceCollection.ps1 index da0b2ac5b..fe02154e6 100644 --- a/tools/PSc8y/Public/Find-DeviceServiceCollection.ps1 +++ b/tools/PSc8y/Public/Find-DeviceServiceCollection.ps1 @@ -48,6 +48,26 @@ Find all services (from any device) [string] $OrderBy, + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] diff --git a/tools/PSc8y/Public/Find-ManagedObjectCollection.ps1 b/tools/PSc8y/Public/Find-ManagedObjectCollection.ps1 index a54504158..3d38d2788 100644 --- a/tools/PSc8y/Public/Find-ManagedObjectCollection.ps1 +++ b/tools/PSc8y/Public/Find-ManagedObjectCollection.ps1 @@ -99,7 +99,27 @@ Find all managed objects with their names starting with 'roomUpperFloor_' [switch] $OnlyDevices, - # include a flat list of all parents and grandparents of the given object + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] $WithParents diff --git a/tools/PSc8y/Public/Get-Agent.ps1 b/tools/PSc8y/Public/Get-Agent.ps1 index 421fc0f11..129b74252 100644 --- a/tools/PSc8y/Public/Get-Agent.ps1 +++ b/tools/PSc8y/Public/Get-Agent.ps1 @@ -32,7 +32,32 @@ Get agent by name ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Id + $Id, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-AgentCollection.ps1 b/tools/PSc8y/Public/Get-AgentCollection.ps1 index f0acf59e1..fcd4dd3e7 100644 --- a/tools/PSc8y/Public/Get-AgentCollection.ps1 +++ b/tools/PSc8y/Public/Get-AgentCollection.ps1 @@ -89,6 +89,26 @@ Get a collection of agents with type "myType", and their names start with "senso [object[]] $Group, + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] diff --git a/tools/PSc8y/Public/Get-Configuration.ps1 b/tools/PSc8y/Public/Get-Configuration.ps1 index 18019b00b..b4ab81f45 100644 --- a/tools/PSc8y/Public/Get-Configuration.ps1 +++ b/tools/PSc8y/Public/Get-Configuration.ps1 @@ -32,7 +32,32 @@ Get a configuration package (using pipeline) ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Id + $Id, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-ConfigurationCollection.ps1 b/tools/PSc8y/Public/Get-ConfigurationCollection.ps1 index 0d5691bdf..f44f61de3 100644 --- a/tools/PSc8y/Public/Get-ConfigurationCollection.ps1 +++ b/tools/PSc8y/Public/Get-ConfigurationCollection.ps1 @@ -56,7 +56,32 @@ Get a list of configuration files # Filter by description [Parameter()] [string] - $Description + $Description, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Get-Device.ps1 b/tools/PSc8y/Public/Get-Device.ps1 index 79e3fb6d3..d3b1f576d 100644 --- a/tools/PSc8y/Public/Get-Device.ps1 +++ b/tools/PSc8y/Public/Get-Device.ps1 @@ -32,7 +32,32 @@ Get device by name ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Id + $Id, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-DeviceChildCollection.ps1 b/tools/PSc8y/Public/Get-DeviceChildCollection.ps1 index fd667b69f..ccdf3cfcc 100644 --- a/tools/PSc8y/Public/Get-DeviceChildCollection.ps1 +++ b/tools/PSc8y/Public/Get-DeviceChildCollection.ps1 @@ -58,7 +58,12 @@ Get a list of the child additions of an existing managed object (using pipeline) # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. [Parameter()] [switch] - $WithChildren + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Get-DeviceCollection.ps1 b/tools/PSc8y/Public/Get-DeviceCollection.ps1 index 3202bce51..4cefd071d 100644 --- a/tools/PSc8y/Public/Get-DeviceCollection.ps1 +++ b/tools/PSc8y/Public/Get-DeviceCollection.ps1 @@ -94,6 +94,26 @@ c8y devices list --name "sensor*" --type myType [object[]] $Group, + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] diff --git a/tools/PSc8y/Public/Get-DeviceGroup.ps1 b/tools/PSc8y/Public/Get-DeviceGroup.ps1 index 633d80eff..91268b3a5 100644 --- a/tools/PSc8y/Public/Get-DeviceGroup.ps1 +++ b/tools/PSc8y/Public/Get-DeviceGroup.ps1 @@ -33,7 +33,32 @@ Get device group by name ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Id + $Id, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-DeviceGroupChildCollection.ps1 b/tools/PSc8y/Public/Get-DeviceGroupChildCollection.ps1 index 2a28ef606..ee2356642 100644 --- a/tools/PSc8y/Public/Get-DeviceGroupChildCollection.ps1 +++ b/tools/PSc8y/Public/Get-DeviceGroupChildCollection.ps1 @@ -58,7 +58,12 @@ Get a list of the child additions of an existing managed object (using pipeline) # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. [Parameter()] [switch] - $WithChildren + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Get-DeviceGroupCollection.ps1 b/tools/PSc8y/Public/Get-DeviceGroupCollection.ps1 index 422d82c09..9c15339f8 100644 --- a/tools/PSc8y/Public/Get-DeviceGroupCollection.ps1 +++ b/tools/PSc8y/Public/Get-DeviceGroupCollection.ps1 @@ -68,15 +68,30 @@ Get a collection of device groups with names that start with 'parent' [object[]] $Group, - # Include a flat list of all parents and grandparents of the given object + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved [Parameter()] [switch] - $WithParents, + $SkipChildrenNames, # Include names of child assets (only use where necessary as it is slow for large groups) [Parameter()] [switch] - $WithChildren + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Get-DeviceProfile.ps1 b/tools/PSc8y/Public/Get-DeviceProfile.ps1 index e8cec12cb..37b309d55 100644 --- a/tools/PSc8y/Public/Get-DeviceProfile.ps1 +++ b/tools/PSc8y/Public/Get-DeviceProfile.ps1 @@ -32,7 +32,32 @@ Get a device profile (using pipeline) ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Id + $Id, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-DeviceProfileCollection.ps1 b/tools/PSc8y/Public/Get-DeviceProfileCollection.ps1 index cfd6815e1..3ff44371d 100644 --- a/tools/PSc8y/Public/Get-DeviceProfileCollection.ps1 +++ b/tools/PSc8y/Public/Get-DeviceProfileCollection.ps1 @@ -41,7 +41,32 @@ Get a list of device profiles [Parameter(ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Name + $Name, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Get-DeviceService.ps1 b/tools/PSc8y/Public/Get-DeviceService.ps1 index 4fcbf4784..12f66dbb4 100644 --- a/tools/PSc8y/Public/Get-DeviceService.ps1 +++ b/tools/PSc8y/Public/Get-DeviceService.ps1 @@ -32,7 +32,32 @@ Get service status # Device id (required for name lookup) [Parameter()] [object[]] - $Device + $Device, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-Firmware.ps1 b/tools/PSc8y/Public/Get-Firmware.ps1 index fe1d86312..e10e8c89e 100644 --- a/tools/PSc8y/Public/Get-Firmware.ps1 +++ b/tools/PSc8y/Public/Get-Firmware.ps1 @@ -32,7 +32,32 @@ Get a firmware package (using pipeline) ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Id + $Id, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-FirmwareCollection.ps1 b/tools/PSc8y/Public/Get-FirmwareCollection.ps1 index b826ad97b..b5961b636 100644 --- a/tools/PSc8y/Public/Get-FirmwareCollection.ps1 +++ b/tools/PSc8y/Public/Get-FirmwareCollection.ps1 @@ -51,7 +51,32 @@ Get a list of firmware packages # Filter by description [Parameter()] [string] - $Description + $Description, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Get-FirmwarePatch.ps1 b/tools/PSc8y/Public/Get-FirmwarePatch.ps1 index 74d45a1ff..cb2ca4eb6 100644 --- a/tools/PSc8y/Public/Get-FirmwarePatch.ps1 +++ b/tools/PSc8y/Public/Get-FirmwarePatch.ps1 @@ -39,7 +39,27 @@ Get a firmware package (using pipeline) [object[]] $Firmware, - # Include parent references + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] $WithParents diff --git a/tools/PSc8y/Public/Get-FirmwarePatchCollection.ps1 b/tools/PSc8y/Public/Get-FirmwarePatchCollection.ps1 index 593657019..0148a4da1 100644 --- a/tools/PSc8y/Public/Get-FirmwarePatchCollection.ps1 +++ b/tools/PSc8y/Public/Get-FirmwarePatchCollection.ps1 @@ -64,6 +64,26 @@ Get a list of firmware patches where the dependency version starts with '1.' [string] $Url, + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + # Include parent references [Parameter()] [switch] diff --git a/tools/PSc8y/Public/Get-FirmwareVersion.ps1 b/tools/PSc8y/Public/Get-FirmwareVersion.ps1 index 45bcff894..175765e4d 100644 --- a/tools/PSc8y/Public/Get-FirmwareVersion.ps1 +++ b/tools/PSc8y/Public/Get-FirmwareVersion.ps1 @@ -39,7 +39,27 @@ Get a firmware package (using pipeline) [object[]] $Firmware, - # Include parent references + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] $WithParents diff --git a/tools/PSc8y/Public/Get-FirmwareVersionCollection.ps1 b/tools/PSc8y/Public/Get-FirmwareVersionCollection.ps1 index d454256a3..6bb3e211e 100644 --- a/tools/PSc8y/Public/Get-FirmwareVersionCollection.ps1 +++ b/tools/PSc8y/Public/Get-FirmwareVersionCollection.ps1 @@ -54,6 +54,26 @@ Get a list of firmware package versions [string] $Url, + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + # Include parent references [Parameter()] [switch] diff --git a/tools/PSc8y/Public/Get-ManagedObject.ps1 b/tools/PSc8y/Public/Get-ManagedObject.ps1 index 6c3cc6603..86fc8b300 100644 --- a/tools/PSc8y/Public/Get-ManagedObject.ps1 +++ b/tools/PSc8y/Public/Get-ManagedObject.ps1 @@ -44,15 +44,25 @@ Get a managed object with parent references [switch] $SkipChildrenNames, - # include a flat list of all parents and grandparents of the given object + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. [Parameter()] [switch] - $WithParents, + $WithChildren, - # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] - $WithChildren + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-ManagedObjectChildCollection.ps1 b/tools/PSc8y/Public/Get-ManagedObjectChildCollection.ps1 index 462dcfc1a..e1b4b90da 100644 --- a/tools/PSc8y/Public/Get-ManagedObjectChildCollection.ps1 +++ b/tools/PSc8y/Public/Get-ManagedObjectChildCollection.ps1 @@ -58,7 +58,12 @@ Get a list of the child additions of an existing managed object (using pipeline) # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. [Parameter()] [switch] - $WithChildren + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Get-ManagedObjectCollection.ps1 b/tools/PSc8y/Public/Get-ManagedObjectCollection.ps1 index 6846495b5..3c5b36ec8 100644 --- a/tools/PSc8y/Public/Get-ManagedObjectCollection.ps1 +++ b/tools/PSc8y/Public/Get-ManagedObjectCollection.ps1 @@ -78,7 +78,7 @@ Get a list of managed objects by id [switch] $SkipChildrenNames, - # include a flat list of all parents and grandparents of the given object + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] $WithParents, @@ -88,6 +88,11 @@ Get a list of managed objects by id [switch] $WithChildren, + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. [Parameter()] [switch] diff --git a/tools/PSc8y/Public/Get-SmartGroup.ps1 b/tools/PSc8y/Public/Get-SmartGroup.ps1 index e8ecbc2e9..cb7281d2b 100644 --- a/tools/PSc8y/Public/Get-SmartGroup.ps1 +++ b/tools/PSc8y/Public/Get-SmartGroup.ps1 @@ -32,7 +32,32 @@ Get smart group by name ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Id + $Id, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-SmartGroupCollection.ps1 b/tools/PSc8y/Public/Get-SmartGroupCollection.ps1 index 73325f1f9..020cc5a42 100644 --- a/tools/PSc8y/Public/Get-SmartGroupCollection.ps1 +++ b/tools/PSc8y/Public/Get-SmartGroupCollection.ps1 @@ -73,6 +73,26 @@ Get a list of smart groups with the names starting with 'myText' [switch] $OnlyVisible, + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] diff --git a/tools/PSc8y/Public/Get-Software.ps1 b/tools/PSc8y/Public/Get-Software.ps1 index 52159df18..2764652ef 100644 --- a/tools/PSc8y/Public/Get-Software.ps1 +++ b/tools/PSc8y/Public/Get-Software.ps1 @@ -32,7 +32,32 @@ Get a software package (using pipeline) ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)] [object[]] - $Id + $Id, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get" diff --git a/tools/PSc8y/Public/Get-SoftwareCollection.ps1 b/tools/PSc8y/Public/Get-SoftwareCollection.ps1 index cf4358128..6a21f61fb 100644 --- a/tools/PSc8y/Public/Get-SoftwareCollection.ps1 +++ b/tools/PSc8y/Public/Get-SoftwareCollection.ps1 @@ -51,7 +51,32 @@ Get a list of software packages # Filter by description [Parameter()] [string] - $Description + $Description, + + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object + [Parameter()] + [switch] + $WithParents ) DynamicParam { Get-ClientCommonParameters -Type "Get", "Collection" diff --git a/tools/PSc8y/Public/Get-SoftwareVersion.ps1 b/tools/PSc8y/Public/Get-SoftwareVersion.ps1 index 35cfa4138..e71e13f0b 100644 --- a/tools/PSc8y/Public/Get-SoftwareVersion.ps1 +++ b/tools/PSc8y/Public/Get-SoftwareVersion.ps1 @@ -39,7 +39,27 @@ Get a software package version (using pipeline) [object[]] $Software, - # Include parent references + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + + # Include a flat list of all parents and grandparents of the given object [Parameter()] [switch] $WithParents diff --git a/tools/PSc8y/Public/Get-SoftwareVersionCollection.ps1 b/tools/PSc8y/Public/Get-SoftwareVersionCollection.ps1 index 6d920dd33..8709c630b 100644 --- a/tools/PSc8y/Public/Get-SoftwareVersionCollection.ps1 +++ b/tools/PSc8y/Public/Get-SoftwareVersionCollection.ps1 @@ -53,6 +53,26 @@ Get a list of software package versions [string] $Url, + # Don't include the child devices names in the response. This can improve the API response because the names don't need to be retrieved + [Parameter()] + [switch] + $SkipChildrenNames, + + # Determines if children with ID and name should be returned when fetching the managed object. Set it to false to improve query performance. + [Parameter()] + [switch] + $WithChildren, + + # When set to true, the returned result will contain the total number of children in the respective objects (childAdditions, childAssets and childDevices) + [Parameter()] + [switch] + $WithChildrenCount, + + # When set to true it returns additional information about the groups to which the searched managed object belongs. This results in setting the assetParents property with additional information about the groups. + [Parameter()] + [switch] + $WithGroups, + # Include parent references [Parameter()] [switch]