Skip to content

Permissions API

Metabase docs

The request and response types can be imported from github.com/bnjns/metabase-sdk-go/service/permissions.

Permissions Group

Create a permissions group

ctx := context.Background()
groupId, err := client.Permissions.CreateGroup(ctx, &permissions.CreateGroupRequest{
    Name: "Permissions group name",
})

Get a permissions group

ctx := context.Background()
group, err := client.Permissions.GetGroup(ctx, 1)

See permissions.Group for the fields returned by the SDK.

Update a permissions group

ctx := context.Background()
groupId, err := client.Permissions.UpdateGroup(ctx, &permissions.UpdateGroupRequest{
    Name: "Updated group name",
})

Delete a permissions group

ctx := context.Background()
err := client.Permissions.DeleteGroup(ctx, 1)