Skip to content
Get started

List workspace members

client.WorkspaceAdmin.Members.List(ctx, workspaceID, query) (*CursorPagination[WorkspaceMember], error)
GET/v1/account/workspaces/{workspaceId}/members

Lists the members of a workspace. Admin only.

ParametersExpand Collapse
workspaceID string
query WorkspaceAdminMemberListParams
Cursor param.Field[string]Optional

Pagination cursor from previous response

Limit param.Field[int64]Optional

Maximum number of results to return

formatint32
ReturnsExpand Collapse
type WorkspaceMember struct{…}

A member of a workspace: the profile granted access plus the actor row that links it to the workspace. Returned by member list/add operations.

ActorID string

The actor row linking the profile to the workspace (the junction record).

ProfileID string

The account profile that has access to the workspace.

AddedAt TimeOptional

When the member was added to the workspace.

formatdate-time
Email stringOptional

Email address of the member’s profile.

Name stringOptional

Display name of the member’s profile.

List workspace members

package main

import (
  "context"
  "fmt"

  "github.com/cadenya/cadenya-go"
  "github.com/cadenya/cadenya-go/option"
)

func main() {
  client := cadenya.NewClient(
    option.WithAPIKey("My API Key"),
  )
  page, err := client.WorkspaceAdmin.Members.List(
    context.TODO(),
    "workspaceId",
    cadenya.WorkspaceAdminMemberListParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", page)
}
{
  "items": [
    {
      "actorId": "actorId",
      "profileId": "profileId",
      "addedAt": "2019-12-27T18:11:19.117Z",
      "email": "email",
      "name": "name"
    }
  ],
  "pagination": {
    "nextCursor": "nextCursor",
    "total": 0
  }
}
Returns Examples
{
  "items": [
    {
      "actorId": "actorId",
      "profileId": "profileId",
      "addedAt": "2019-12-27T18:11:19.117Z",
      "email": "email",
      "name": "name"
    }
  ],
  "pagination": {
    "nextCursor": "nextCursor",
    "total": 0
  }
}