listLabelGroups

Retrieve a list of all the groups used by the existing labels

Tip If your application plans on creating many groups, you can use a delimiter character, such as the forward slash / in your group names to create a group hierarchy. Include the delimiter after each part of the hierarchy and at the end of the group name. You can use the "partialGroupFilter" filter to return subsets of groups in the hierarchy. For example, you if have groups named "product/size/", "product/weight/", "product/ranking/", "person/gender/", and "person/ranking/", you can set the "partialGroupFilter" filter to "product/" to return the product groups.

 

Request examples

Minimal

{
  "action": "listLabelGroups",
  "params": { },
  "authToken": "replaceWithAuthTokenFromCreateSession"
}
 
 

Maximal

{
  "api": "admin",
  "action": "listLabelGroups",
  "params": {
    "partialGroupFilter": "my group"
  },
  "responseOptions": {
    "dataFormat": "objects",
    "numberFormat": "string",
    "binaryFormat": "hex"
  },
  "authToken": "replaceWithAuthTokenFromCreateSession",
  "apiVersion": "1.0",
  "requestId": "2",
  "debug": "max"
}
 
 

 

Response example

Minimal

{
  "result": {
    "groups": []
  },
  "requestId": "2",
  "debugInfo": {
    "request": {
      "authToken": "authToken",
      "action": "listLabelGroups",
      "params": {
        "partialGroupFilter": "my group"
      },
      "apiVersion": "1.0",
      "requestId": "2",
      "responseOptions": {
        "dataFormat": "objects",
        "numberFormat": "string",
        "binaryFormat": "hex"
      },
      "debug": "max"
    }
  },
  "authToken": "authToken",
  "errorCode": 0,
  "errorMessage": ""
}
 
 

 

Request properties ("params")

Property Description Default Type Limits (inclusive)

partialGroupFilter

The "partialGroupFilter" property filters the results of the action. It defaults to null, which provides no filtering. The string is the partial or full name of a group. A label's group must match the partial or complete value of this property to be included in the results. The empty string "" and null match all groups.

Note The "groupFilter" and "partialGroupFilter" properties are mutually exclusive.

Warning When deleting properties, ensure each partial and full group name in the array properly filters the labels; otherwise, the "changeLabels" action will delete more labels than you want.

Optional with default of "" string 1 to 64 bytes