Creation of groups using POST API call

What product/components do you use and which version/fix level are you on?

latest version.

Is your question related to the free trial, or to a production (customer) instance?

Production customer

What are you trying to achieve? Please describe it in detail.

Creation of Groups using the POST API call. Please provide us the document which describes the creation of groups using POST API call.

Do you get any error messages? Please provide a full error message screenshot and log file.

Have you installed all the latest fixes for the products and systems you are using?

yes.

https://cumulocity.com/api/10.13.0/#tag/Groups

1 Like

Hello,

We would like to create similar asset hirearchy Group using POST API call as shown below.

If its a device group then it’s the Inventory API rather than Group API.

https://cumulocity.com/api/10.13.0/#operation/postManagedObjectCollectionResource

You can create a group with POST to …/inventory/managedObjects

Payload…

{type: “c8y_DeviceGroup”, c8y_IsDeviceGroup: {}, name: “aaaaaaaaaa”, c8y_Notes: “”}

Then add a device to it.

POST to …inventory/managedObjects//childAssets

Payload…

{references: [{managedObject: {id: “”}}]}

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.