All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| DeleteMember | Delete /api/v2/members/{id} | Delete account member |
| GetMember | Get /api/v2/members/{id} | Get account member |
| GetMembers | Get /api/v2/members | List account members |
| PatchMember | Patch /api/v2/members/{id} | Modify an account member |
| PatchMembers | Patch /api/v2/members | Modify account members |
| PostMemberTeams | Post /api/v2/members/{id}/teams | Add a member to teams |
| PostMembers | Post /api/v2/members | Invite new members |
DeleteMember(ctx, id).Execute()
Delete account member
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
id := "id_example" // string | The member ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.AccountMembersApi.DeleteMember(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountMembersApi.DeleteMember``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | The member ID |
Other parameters are passed through a pointer to a apiDeleteMemberRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Member GetMember(ctx, id).Expand(expand).Execute()
Get account member
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
id := "id_example" // string | The member ID
expand := "expand_example" // string | A comma-separated list of properties that can reveal additional information in the response. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountMembersApi.GetMember(context.Background(), id).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountMembersApi.GetMember``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMember`: Member
fmt.Fprintf(os.Stdout, "Response from `AccountMembersApi.GetMember`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | The member ID |
Other parameters are passed through a pointer to a apiGetMemberRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
expand | string | A comma-separated list of properties that can reveal additional information in the response. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Members GetMembers(ctx).Limit(limit).Offset(offset).Filter(filter).Expand(expand).Sort(sort).Execute()
List account members
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
limit := int64(789) // int64 | The number of members to return in the response. Defaults to 20. (optional)
offset := int64(789) // int64 | Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
filter := "filter_example" // string | A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above. (optional)
expand := "expand_example" // string | A comma-separated list of properties that can reveal additional information in the response. (optional)
sort := "sort_example" // string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountMembersApi.GetMembers(context.Background()).Limit(limit).Offset(offset).Filter(filter).Expand(expand).Sort(sort).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountMembersApi.GetMembers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetMembers`: Members
fmt.Fprintf(os.Stdout, "Response from `AccountMembersApi.GetMembers`: %v\n", resp)
}Other parameters are passed through a pointer to a apiGetMembersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| limit | int64 | The number of members to return in the response. Defaults to 20. | |
| offset | int64 | Where to start in the list. This is for use with pagination. For example, an offset of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. | |
| filter | string | A comma-separated list of filters. Each filter is of the form `field:value`. Supported fields are explained above. | |
| expand | string | A comma-separated list of properties that can reveal additional information in the response. | |
| sort | string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Member PatchMember(ctx, id).PatchOperation(patchOperation).Execute()
Modify an account member
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
id := "id_example" // string | The member ID
patchOperation := []openapiclient.PatchOperation{*openapiclient.NewPatchOperation("replace", "/exampleField")} // []PatchOperation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountMembersApi.PatchMember(context.Background(), id).PatchOperation(patchOperation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountMembersApi.PatchMember``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchMember`: Member
fmt.Fprintf(os.Stdout, "Response from `AccountMembersApi.PatchMember`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | The member ID |
Other parameters are passed through a pointer to a apiPatchMemberRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
patchOperation | []PatchOperation | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BulkEditMembersRep PatchMembers(ctx).MembersPatchInput(membersPatchInput).Execute()
Modify account members
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
membersPatchInput := *openapiclient.NewMembersPatchInput([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}}) // MembersPatchInput |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountMembersApi.PatchMembers(context.Background()).MembersPatchInput(membersPatchInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountMembersApi.PatchMembers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchMembers`: BulkEditMembersRep
fmt.Fprintf(os.Stdout, "Response from `AccountMembersApi.PatchMembers`: %v\n", resp)
}Other parameters are passed through a pointer to a apiPatchMembersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| membersPatchInput | MembersPatchInput |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Member PostMemberTeams(ctx, id).MemberTeamsPostInput(memberTeamsPostInput).Execute()
Add a member to teams
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
id := "id_example" // string | The member ID
memberTeamsPostInput := *openapiclient.NewMemberTeamsPostInput([]string{"TeamKeys_example"}) // MemberTeamsPostInput |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountMembersApi.PostMemberTeams(context.Background(), id).MemberTeamsPostInput(memberTeamsPostInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountMembersApi.PostMemberTeams``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostMemberTeams`: Member
fmt.Fprintf(os.Stdout, "Response from `AccountMembersApi.PostMemberTeams`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | The member ID |
Other parameters are passed through a pointer to a apiPostMemberTeamsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
memberTeamsPostInput | MemberTeamsPostInput | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Members PostMembers(ctx).NewMemberForm(newMemberForm).Execute()
Invite new members
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
newMemberForm := []openapiclient.NewMemberForm{*openapiclient.NewNewMemberForm("sandy@acme.com")} // []NewMemberForm |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AccountMembersApi.PostMembers(context.Background()).NewMemberForm(newMemberForm).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AccountMembersApi.PostMembers``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostMembers`: Members
fmt.Fprintf(os.Stdout, "Response from `AccountMembersApi.PostMembers`: %v\n", resp)
}Other parameters are passed through a pointer to a apiPostMembersRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| newMemberForm | []NewMemberForm |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]