All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
DeleteProject | Delete /api/v2/projects/{projectKey} | Delete project |
GetFlagDefaultsByProject | Get /api/v2/projects/{projectKey}/flag-defaults | Get flag defaults for project |
GetProject | Get /api/v2/projects/{projectKey} | Get project |
GetProjects | Get /api/v2/projects | List projects |
PatchFlagDefaultsByProject | Patch /api/v2/projects/{projectKey}/flag-defaults | Update flag default for project |
PatchProject | Patch /api/v2/projects/{projectKey} | Update project |
PostProject | Post /api/v2/projects | Create project |
PutFlagDefaultsByProject | Put /api/v2/projects/{projectKey}/flag-defaults | Create or update flag defaults for project |
DeleteProject(ctx, projectKey).Execute()
Delete project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsApi.DeleteProject(context.Background(), projectKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsApi.DeleteProject``: %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. | |
projectKey | string | The project key |
Other parameters are passed through a pointer to a apiDeleteProjectRequest 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]
FlagDefaultsRep GetFlagDefaultsByProject(ctx, projectKey).Execute()
Get flag defaults for project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsApi.GetFlagDefaultsByProject(context.Background(), projectKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsApi.GetFlagDefaultsByProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFlagDefaultsByProject`: FlagDefaultsRep
fmt.Fprintf(os.Stdout, "Response from `ProjectsApi.GetFlagDefaultsByProject`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key |
Other parameters are passed through a pointer to a apiGetFlagDefaultsByProjectRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Project GetProject(ctx, projectKey).Expand(expand).Execute()
Get project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project 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.ProjectsApi.GetProject(context.Background(), projectKey).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsApi.GetProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProject`: Project
fmt.Fprintf(os.Stdout, "Response from `ProjectsApi.GetProject`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key. |
Other parameters are passed through a pointer to a apiGetProjectRequest 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]
Projects GetProjects(ctx).Limit(limit).Offset(offset).Filter(filter).Sort(sort).Expand(expand).Execute()
List projects
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
limit := int64(789) // int64 | The number of projects 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)
sort := "sort_example" // string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. (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.ProjectsApi.GetProjects(context.Background()).Limit(limit).Offset(offset).Filter(filter).Sort(sort).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsApi.GetProjects``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetProjects`: Projects
fmt.Fprintf(os.Stdout, "Response from `ProjectsApi.GetProjects`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetProjectsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int64 | The number of projects 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`. | |
sort | string | A comma-separated list of fields to sort by. Fields prefixed by a dash ( - ) sort in descending order. | |
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]
UpsertPayloadRep PatchFlagDefaultsByProject(ctx, projectKey).PatchOperation(patchOperation).Execute()
Update flag default for project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
patchOperation := []openapiclient.PatchOperation{*openapiclient.NewPatchOperation("replace", "/exampleField", interface{}(new example value))} // []PatchOperation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsApi.PatchFlagDefaultsByProject(context.Background(), projectKey).PatchOperation(patchOperation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsApi.PatchFlagDefaultsByProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchFlagDefaultsByProject`: UpsertPayloadRep
fmt.Fprintf(os.Stdout, "Response from `ProjectsApi.PatchFlagDefaultsByProject`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key |
Other parameters are passed through a pointer to a apiPatchFlagDefaultsByProjectRequest 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]
ProjectRep PatchProject(ctx, projectKey).PatchOperation(patchOperation).Execute()
Update project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
patchOperation := []openapiclient.PatchOperation{*openapiclient.NewPatchOperation("replace", "/exampleField", interface{}(new example value))} // []PatchOperation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsApi.PatchProject(context.Background(), projectKey).PatchOperation(patchOperation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsApi.PatchProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchProject`: ProjectRep
fmt.Fprintf(os.Stdout, "Response from `ProjectsApi.PatchProject`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key |
Other parameters are passed through a pointer to a apiPatchProjectRequest 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]
ProjectRep PostProject(ctx).ProjectPost(projectPost).Execute()
Create project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectPost := *openapiclient.NewProjectPost("My Project", "my-project") // ProjectPost |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsApi.PostProject(context.Background()).ProjectPost(projectPost).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsApi.PostProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostProject`: ProjectRep
fmt.Fprintf(os.Stdout, "Response from `ProjectsApi.PostProject`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostProjectRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
projectPost | ProjectPost |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpsertPayloadRep PutFlagDefaultsByProject(ctx, projectKey).UpsertFlagDefaultsPayload(upsertFlagDefaultsPayload).Execute()
Create or update flag defaults for project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
upsertFlagDefaultsPayload := *openapiclient.NewUpsertFlagDefaultsPayload([]string{"Tags_example"}, false, *openapiclient.NewDefaultClientSideAvailability(false, false), *openapiclient.NewBooleanFlagDefaults("TrueDisplayName_example", "FalseDisplayName_example", "TrueDescription_example", "FalseDescription_example", int32(123), int32(123))) // UpsertFlagDefaultsPayload |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ProjectsApi.PutFlagDefaultsByProject(context.Background(), projectKey).UpsertFlagDefaultsPayload(upsertFlagDefaultsPayload).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ProjectsApi.PutFlagDefaultsByProject``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PutFlagDefaultsByProject`: UpsertPayloadRep
fmt.Fprintf(os.Stdout, "Response from `ProjectsApi.PutFlagDefaultsByProject`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key |
Other parameters are passed through a pointer to a apiPutFlagDefaultsByProjectRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
upsertFlagDefaultsPayload | UpsertFlagDefaultsPayload | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]