Skip to content

Latest commit

 

History

History
590 lines (380 loc) · 17.3 KB

TeamsApi.md

File metadata and controls

590 lines (380 loc) · 17.3 KB

\TeamsApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
DeleteTeam Delete /api/v2/teams/{teamKey} Delete team
GetTeam Get /api/v2/teams/{teamKey} Get team
GetTeamMaintainers Get /api/v2/teams/{teamKey}/maintainers Get team maintainers
GetTeamRoles Get /api/v2/teams/{teamKey}/roles Get team custom roles
GetTeams Get /api/v2/teams List teams
PatchTeam Patch /api/v2/teams/{teamKey} Update team
PostTeam Post /api/v2/teams Create team
PostTeamMembers Post /api/v2/teams/{teamKey}/members Add multiple members to team

DeleteTeam

DeleteTeam(ctx, teamKey).Execute()

Delete team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    teamKey := "teamKey_example" // string | The team key

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.TeamsApi.DeleteTeam(context.Background(), teamKey).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.DeleteTeam``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamKey string The team key

Other Parameters

Other parameters are passed through a pointer to a apiDeleteTeamRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTeam

Team GetTeam(ctx, teamKey).Expand(expand).Execute()

Get team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    teamKey := "teamKey_example" // string | The team key.
    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.TeamsApi.GetTeam(context.Background(), teamKey).Expand(expand).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.GetTeam``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetTeam`: Team
    fmt.Fprintf(os.Stdout, "Response from `TeamsApi.GetTeam`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamKey string The team key.

Other Parameters

Other parameters are passed through a pointer to a apiGetTeamRequest 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. |

Return type

Team

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTeamMaintainers

TeamMaintainers GetTeamMaintainers(ctx, teamKey).Limit(limit).Offset(offset).Execute()

Get team maintainers

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    teamKey := "teamKey_example" // string | The team key
    limit := int64(789) // int64 | The number of maintainers 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)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.TeamsApi.GetTeamMaintainers(context.Background(), teamKey).Limit(limit).Offset(offset).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.GetTeamMaintainers``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetTeamMaintainers`: TeamMaintainers
    fmt.Fprintf(os.Stdout, "Response from `TeamsApi.GetTeamMaintainers`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamKey string The team key

Other Parameters

Other parameters are passed through a pointer to a apiGetTeamMaintainersRequest struct via the builder pattern

Name Type Description Notes

limit | int64 | The number of maintainers 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`. |

Return type

TeamMaintainers

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTeamRoles

TeamCustomRoles GetTeamRoles(ctx, teamKey).Limit(limit).Offset(offset).Execute()

Get team custom roles

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    teamKey := "teamKey_example" // string | The team key
    limit := int64(789) // int64 | The number of roles 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)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.TeamsApi.GetTeamRoles(context.Background(), teamKey).Limit(limit).Offset(offset).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.GetTeamRoles``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetTeamRoles`: TeamCustomRoles
    fmt.Fprintf(os.Stdout, "Response from `TeamsApi.GetTeamRoles`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamKey string The team key

Other Parameters

Other parameters are passed through a pointer to a apiGetTeamRolesRequest struct via the builder pattern

Name Type Description Notes

limit | int64 | The number of roles 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`. |

Return type

TeamCustomRoles

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetTeams

Teams GetTeams(ctx).Limit(limit).Offset(offset).Filter(filter).Expand(expand).Execute()

List teams

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    limit := int64(789) // int64 | The number of teams to return in the response. Defaults to 20. (optional)
    offset := int64(789) // int64 | Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items. (optional)
    filter := "filter_example" // string | A comma-separated list of filters. Each filter is constructed as `field:value`. (optional)
    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.TeamsApi.GetTeams(context.Background()).Limit(limit).Offset(offset).Filter(filter).Expand(expand).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.GetTeams``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetTeams`: Teams
    fmt.Fprintf(os.Stdout, "Response from `TeamsApi.GetTeams`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetTeamsRequest struct via the builder pattern

Name Type Description Notes
limit int64 The number of teams to return in the response. Defaults to 20.
offset int64 Where to start in the list. Use this with pagination. For example, an offset of 10 skips the first ten items and returns the next `limit` items.
filter string A comma-separated list of filters. Each filter is constructed as `field:value`.
expand string A comma-separated list of properties that can reveal additional information in the response.

Return type

Teams

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PatchTeam

Team PatchTeam(ctx, teamKey).TeamPatchInput(teamPatchInput).Expand(expand).Execute()

Update team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    teamKey := "teamKey_example" // string | The team key
    teamPatchInput := *openapiclient.NewTeamPatchInput([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}}) // TeamPatchInput | 
    expand := "expand_example" // string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.TeamsApi.PatchTeam(context.Background(), teamKey).TeamPatchInput(teamPatchInput).Expand(expand).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.PatchTeam``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchTeam`: Team
    fmt.Fprintf(os.Stdout, "Response from `TeamsApi.PatchTeam`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamKey string The team key

Other Parameters

Other parameters are passed through a pointer to a apiPatchTeamRequest struct via the builder pattern

Name Type Description Notes

teamPatchInput | TeamPatchInput | | expand | string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. |

Return type

Team

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostTeam

Team PostTeam(ctx).TeamPostInput(teamPostInput).Expand(expand).Execute()

Create team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    teamPostInput := *openapiclient.NewTeamPostInput("example-team", "Example team") // TeamPostInput | 
    expand := "expand_example" // string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.TeamsApi.PostTeam(context.Background()).TeamPostInput(teamPostInput).Expand(expand).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.PostTeam``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostTeam`: Team
    fmt.Fprintf(os.Stdout, "Response from `TeamsApi.PostTeam`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostTeamRequest struct via the builder pattern

Name Type Description Notes
teamPostInput TeamPostInput
expand string A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above.

Return type

Team

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostTeamMembers

TeamImportsRep PostTeamMembers(ctx, teamKey).File(file).Execute()

Add multiple members to team

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    teamKey := "teamKey_example" // string | The team key
    file := os.NewFile(1234, "some_file") // *os.File | CSV file containing email addresses (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.TeamsApi.PostTeamMembers(context.Background(), teamKey).File(file).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `TeamsApi.PostTeamMembers``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostTeamMembers`: TeamImportsRep
    fmt.Fprintf(os.Stdout, "Response from `TeamsApi.PostTeamMembers`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
teamKey string The team key

Other Parameters

Other parameters are passed through a pointer to a apiPostTeamMembersRequest struct via the builder pattern

Name Type Description Notes

file | *os.File | CSV file containing email addresses |

Return type

TeamImportsRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]