Label Groups Reference
This topic provides properties, parameters, and examples for label groups.
Query parameters for label groups
Parameter | Description | Type | Required |
---|---|---|---|
| Organization | Integer | Yes |
| Security Policy Version | String | Yes |
| Label Group UUID, for | String | Yes |
| Include label usage flags. | Boolean | No |
Properties for label groups
Property | Description | Type |
---|---|---|
| URI of this label group | String |
| The specific name of a label group to return. Supports partial matches | String |
| Key by which to filter | String |
| Timestamp when this label group was first created | String date/time |
| Timestamp when this label group was last updated | String date/time |
| Timestamp when this label group was deleted | String, null |
| The user who originally created this label group "$ref": "../common/href_object.schema.json" | |
| The user who last updated this label group "$ref": "../common/href_object.schema.json" | |
| Users who deleted this label group "$ref": "../common/href_object.schema.json" | Null |
| Label Group is referenced by Blocked Connection Reject Scopes. Replaces the property | Boolean |
| Label Group is referenced by Loopback Interfaces in Policy Scopes. | Boolean |
| IP Forwarding Enabled Scopes reference Label Group. | Boolean |
Curl Command to Get Label Groups
curl -i -X GET https://pce.my-company.com:8443/api/v2/orgs/3/sec_policy/draft/label_groups -H "Accept: application/json" -u $KEY:$TOKEN
Response
When you get a collection of label groups, each label group is identified by an HREF. You need the HREF to update or delete an individual label group using the API.
{ "href": "/orgs/2/sec_policy/draft/label_groups/4c8e3325-c6dd-4dc2-aadc-971e9de270e4", "created_at": "2020-07-25T00:46:52.552Z", "updated_at": "2020-07-25T00:59:00.177Z", "deleted_at": null, "created_by": { "href": "/users/3" }, "updated_by": { "href": "/users/3" }, "deleted_by": null, "name": "AppGroup1", "description": null, "key": "app", "labels": [], "sub_groups": [ { "href": "/orgs/2/sec_policy/draft/label_groups/9b30081e-e105-44d8-9945-4c8a30dbe849", "name": "AppGroup3" } ] },
Request body to update a label group
This example request body updates the labels contained within a label group.
{ "labels": [ { "href": "/orgs/28/labels/1100" }, { "href": "/orgs/28/labels/1098" }, { "href": "/orgs/28/labels/1099" }, { "href": "/orgs/28/labels/1101" } ], "sub_groups": [] }
Curl Command to Update Label Groups
In this example, the label group being updated with the request body from the code example above is identified by the its label group HREF.
curl -i -X PUT https://pce.my-company.com:8443/api/v2/orgs/2/sec_policy/draft/label_groups/3307b3d8-2ca2-48f5-877a-03ada95cd6de -H "Content-Type:application/json" -u $KEY:$TOKEN -d '{"labels":[{"href":"/orgs/28/labels/1100"},{"href":"/orgs/28/labels/1098"},{"href":"/orgs/28/labels/1099"},{"href":"/orgs/28/labels/1101"}],"sub_groups":[]}'
Curl Command to Delete a Label Group
curl -i -X DELETE https://pce.my-company.com:8443/api/v2/orgs/2/sec_policy/draft/label_groups/3307b3d8-2ca2-48f5-877a-03ada95cd6de -u $KEY:$TOKEN