Skip to content

List members

client.Member.List(ctx, query) (*MemberListResponse, error)
GET/v1/members

Returns a paginated list of members in your workspace. Use offset and limit to paginate through results. See List endpoints for more information about pagination.

Required scope: members:read

Rate limit category: Search

ParametersExpand Collapse
query MemberListParams
Limit param.Field[int64]Optional

Maximum number of records to return. Defaults to 25, maximum 25.

minimum1
maximum9007199254740991
Offset param.Field[int64]Optional

Number of records to skip for pagination. Defaults to 0.

minimum0
maximum9007199254740991
ReturnsExpand Collapse
type MemberListResponse struct{…}
Data []MemberListResponseData

Array of member objects for the current page.

ID string

Unique identifier for the member.

CreatedAt string

ISO 8601 timestamp of when the member was created.

Fields MemberListResponseDataFields

Map of field names to their typed values.

Email MemberListResponseDataFieldsEmail

The member’s email address.

Value string

The field value.

ValueType string

The data type of the field value.

Name MemberListResponseDataFieldsName

The member’s full name.

Value MemberListResponseDataFieldsNameValue
FirstName stringOptional

The contact’s first name.

LastName stringOptional

The contact’s last name.

ValueType string

The data type of the field value.

ProfileImage MemberListResponseDataFieldsProfileImage

URL of the member’s profile image, or null if unset.

Value string

The field value, or null if unset.

ValueType string

The data type of the field value.

Role MemberListResponseDataFieldsRole

The member’s workspace role.

Value string

The field value.

ValueType string

The data type of the field value.

Relationships any

Members do not expose writable or readable relationships in this API.

UpdatedAt string

ISO 8601 timestamp of when the member was last updated, or null.

Object string

The object type, always "list".

TotalCount int64

Total number of members in the workspace.

minimum0
maximum9007199254740991

List members

package main

import (
  "context"
  "fmt"

  "github.com/Lightfld/lightfield-go"
  "github.com/Lightfld/lightfield-go/option"
)

func main() {
  client := githubcomlightfldlightfieldgo.NewClient(
    option.WithAPIKey("My API Key"),
  )
  memberListResponse, err := client.Member.List(context.TODO(), githubcomlightfldlightfieldgo.MemberListParams{

  })
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", memberListResponse.Data)
}
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "fields": {
        "$email": {
          "value": "value",
          "valueType": "EMAIL"
        },
        "$name": {
          "value": {
            "firstName": "firstName",
            "lastName": "lastName"
          },
          "valueType": "FULL_NAME"
        },
        "$profileImage": {
          "value": "value",
          "valueType": "URL"
        },
        "$role": {
          "value": "value",
          "valueType": "TEXT"
        }
      },
      "httpLink": "httpLink",
      "relationships": {},
      "updatedAt": "updatedAt"
    }
  ],
  "object": "object",
  "totalCount": 0
}
Returns Examples
{
  "data": [
    {
      "id": "id",
      "createdAt": "createdAt",
      "fields": {
        "$email": {
          "value": "value",
          "valueType": "EMAIL"
        },
        "$name": {
          "value": {
            "firstName": "firstName",
            "lastName": "lastName"
          },
          "valueType": "FULL_NAME"
        },
        "$profileImage": {
          "value": "value",
          "valueType": "URL"
        },
        "$role": {
          "value": "value",
          "valueType": "TEXT"
        }
      },
      "httpLink": "httpLink",
      "relationships": {},
      "updatedAt": "updatedAt"
    }
  ],
  "object": "object",
  "totalCount": 0
}