Create group
Creates a group in the zone (managed in Keycard). Groups synced from an external directory are created by that directory, not here.
Parameters
zoneID string
Returns
Create 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.New(
context.TODO(),
"zoneId",
keycard.ZoneGroupNewParams{
GroupCreate: keycard.GroupCreateParam{
Name: "x",
},
},
)
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"
]
}