# Target Groups

APIs to create and manage Feature Flag Target Groups

## Returns all Target Groups

 - [GET /cf/admin/segments](https://apidocs.harness.io/target-groups/getallsegments.md): Returns Target Group details for the given account

## Creates a Target Group

 - [POST /cf/admin/segments](https://apidocs.harness.io/target-groups/createsegment.md): Creates a Target Group in the given Project

## Deletes a Target Group

 - [DELETE /cf/admin/segments/{identifier}](https://apidocs.harness.io/target-groups/deletesegment.md): Deletes a Target Group for the given ID

## Returns Target Group details for the given identifier

 - [GET /cf/admin/segments/{identifier}](https://apidocs.harness.io/target-groups/getsegment.md): Returns Target Group details for the given ID

## Updates a Target Group

 - [PATCH /cf/admin/segments/{identifier}](https://apidocs.harness.io/target-groups/patchsegment.md): Updates a Target Group for the given identifier

## Returns Feature Flags that are available to be added to the given Target Group

 - [GET /cf/admin/segments/{identifier}/available_flags](https://apidocs.harness.io/target-groups/getavailableflagsforsegment.md): Returns the list of Feature Flags that the Target Group can be added to.  This list will exclude any Feature Flag that the Target Group is already part of.

## Returns Feature Flags in a Target Group

 - [GET /cf/admin/segments/{identifier}/flags](https://apidocs.harness.io/target-groups/getsegmentflags.md): Returns the details of a Feature Flag in a Target Group for the given identifier

