Get group
Get group
client.Zones.Groups.Get(ctx, groupID, params) (*Group, error)
GET/zones/{zoneId}/groups/{groupId}
Returns a group by ID. Pass expand[]=member_count for its member count and expand[]=roles for the identifiers of its assigned roles.
Parameters
groupID string
Returns
Get group
package main
import (
"context"
"fmt"
"github.com/keycardai/keycard-go"
"github.com/keycardai/keycard-go/option"
)
func main() {
client := keycard.NewClient(
option.WithAPIKey("My API Key"),
)
group, err := client.Zones.Groups.Get(
context.TODO(),
"groupId",
keycard.ZoneGroupGetParams{
ZoneID: "zoneId",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", group.ID)
}
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"external": true,
"identifier": "identifier",
"name": "name",
"organization_id": "organization_id",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"member_count": 0,
"roles": [
"string"
]
}Returns Examples
{
"id": "id",
"created_at": "2019-12-27T18:11:19.117Z",
"external": true,
"identifier": "identifier",
"name": "name",
"organization_id": "organization_id",
"updated_at": "2019-12-27T18:11:19.117Z",
"zone_id": "zone_id",
"member_count": 0,
"roles": [
"string"
]
}