Skip to main content

GetGroup

Retrieves a specific group by its resource identifier within the hierarchy.

Provides access to a single group's complete metadata and organizational context if accessible within the executing group's scope.

Method Options​

Authorisation specification of the GetGroup method.

TypeMETHOD_TYPE_READ
Access LevelMETHOD_ACCESS_LEVEL_AUTHORISED
Roles
  • ROLE_IAM_ADMIN
  • ROLE_IAM_VIEWER
  • ROLE_IAM_GROUP_ADMIN
  • ROLE_IAM_GROUP_VIEWER

Parameters​

Request and response parameter message overview:

Input: GetGroupRequest Message​

FieldTypeRequiredDescription
Name

string

True

The resource name of the group to retrieve in format groups/{group_id}.

Returns: Group Message​

Code Examples​

Select supported SDK in the language of your choice for a full example of how to invoke the this method:

package main

import (
"context"
"log"

groupv1 "github.com/meshtrade/api/go/iam/group/v1"
)

func main() {
ctx := context.Background()

// Default configuration is used and credentials come from MESH_API_CREDENTIALS
// environment variable or default discovery methods. Zero config required
// unless you want custom configuration.
service, err := groupv1.NewGroupService()
if err != nil {
log.Fatalf("Failed to create service: %v", err)
}
defer service.Close()

// Create request with group resource name
request := &groupv1.GetGroupRequest{
Name: "groups/01HZ2XWFQ4QV2J5K8MN0PQRSTU", // Group ULIDv2 identifier
}

// Call the GetGroup method
group, err := service.GetGroup(ctx, request)
if err != nil {
log.Fatalf("GetGroup failed: %v", err)
}

// Access group details and hierarchy information
log.Printf("Group retrieved successfully:")
log.Printf(" Name: %s", group.Name)
log.Printf(" Display Name: %s", group.DisplayName)
log.Printf(" Description: %s", group.Description)
log.Printf(" Direct Owner: %s", group.Owner)
// System maintains hierarchical ownership relationships internally

// Use group information for resource ownership validation
log.Printf("Group is available for resource ownership and access control")
}

Advanced Configuration​

For advanced client configuration options (custom endpoints, TLS settings, timeouts), see the SDK Configuration Guide.

Other Methods​