Skip to content

Commit a859777

Browse files
committed
SCALRCORE-21781 Add include for created-by user
1 parent a127b16 commit a859777

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

service_account.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ type ServiceAccountListOptions struct {
6565
Account *string `url:"filter[account],omitempty"`
6666
Email *string `url:"filter[email],omitempty"`
6767
Query *string `url:"query,omitempty"`
68+
Include *string `url:"include,omitempty"`
6869
}
6970

7071
// ServiceAccountCreateOptions represents the options for creating a new service account.
@@ -107,8 +108,13 @@ func (s *serviceAccounts) Read(ctx context.Context, serviceAccountID string) (*S
107108
return nil, errors.New("invalid value for service account ID")
108109
}
109110

111+
options := struct {
112+
Include string `url:"include"`
113+
}{
114+
Include: "created-by",
115+
}
110116
u := fmt.Sprintf("service-accounts/%s", url.QueryEscape(serviceAccountID))
111-
req, err := s.client.newRequest("GET", u, nil)
117+
req, err := s.client.newRequest("GET", u, options)
112118
if err != nil {
113119
return nil, err
114120
}

0 commit comments

Comments
 (0)