github.com/launchdarkly/api-client-go@v5.3.0+incompatible/README.md (about) 1 This repository contains a client library for LaunchDarkly's REST API. This client was automatically 2 generated from our [OpenAPI specification](https://github.com/launchdarkly/ld-openapi). 3 4 This REST API is for custom integrations, data export, or automating your feature flag workflows. *DO NOT* use this client library to include feature flags in your web or mobile application. To integrate feature flags with your application, please see the [SDK documentation](https://docs.launchdarkly.com/v2.0/docs) 5 6 # Go API client for ldapi 7 8 Build custom integrations with the LaunchDarkly REST API 9 10 ## Overview 11 This API client was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. By using the [swagger-spec](https://github.com/swagger-api/swagger-spec) from a remote server, you can easily generate an API client. 12 13 - API version: 5.3.0 14 - Package version: 1.0.0 15 - Build package: io.swagger.codegen.languages.GoClientCodegen 16 For more information, please visit [https://support.launchdarkly.com](https://support.launchdarkly.com) 17 18 ## Installation 19 20 ```golang 21 import "github.com/launchdarkly/api-client-go" 22 ``` 23 24 ## Documentation for API Endpoints 25 26 All URIs are relative to *https://app.launchdarkly.com/api/v2* 27 28 Class | Method | HTTP request | Description 29 ------------ | ------------- | ------------- | ------------- 30 *AccessTokensApi* | [**DeleteToken**](docs/AccessTokensApi.md#deletetoken) | **Delete** /tokens/{tokenId} | Delete an access token by ID. 31 *AccessTokensApi* | [**GetToken**](docs/AccessTokensApi.md#gettoken) | **Get** /tokens/{tokenId} | Get a single access token by ID. 32 *AccessTokensApi* | [**GetTokens**](docs/AccessTokensApi.md#gettokens) | **Get** /tokens | Returns a list of tokens in the account. 33 *AccessTokensApi* | [**PatchToken**](docs/AccessTokensApi.md#patchtoken) | **Patch** /tokens/{tokenId} | Modify an access token by ID. 34 *AccessTokensApi* | [**PostToken**](docs/AccessTokensApi.md#posttoken) | **Post** /tokens | Create a new token. 35 *AccessTokensApi* | [**ResetToken**](docs/AccessTokensApi.md#resettoken) | **Post** /tokens/{tokenId}/reset | Reset an access token's secret key with an optional expiry time for the old key. 36 *AuditLogApi* | [**GetAuditLogEntries**](docs/AuditLogApi.md#getauditlogentries) | **Get** /auditlog | Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query. 37 *AuditLogApi* | [**GetAuditLogEntry**](docs/AuditLogApi.md#getauditlogentry) | **Get** /auditlog/{resourceId} | Use this endpoint to fetch a single audit log entry by its resouce ID. 38 *CustomRolesApi* | [**DeleteCustomRole**](docs/CustomRolesApi.md#deletecustomrole) | **Delete** /roles/{customRoleKey} | Delete a custom role by key. 39 *CustomRolesApi* | [**GetCustomRole**](docs/CustomRolesApi.md#getcustomrole) | **Get** /roles/{customRoleKey} | Get one custom role by key. 40 *CustomRolesApi* | [**GetCustomRoles**](docs/CustomRolesApi.md#getcustomroles) | **Get** /roles | Return a complete list of custom roles. 41 *CustomRolesApi* | [**PatchCustomRole**](docs/CustomRolesApi.md#patchcustomrole) | **Patch** /roles/{customRoleKey} | Modify a custom role by key. 42 *CustomRolesApi* | [**PostCustomRole**](docs/CustomRolesApi.md#postcustomrole) | **Post** /roles | Create a new custom role. 43 *CustomerMetricsApi* | [**GetEvaluations**](docs/CustomerMetricsApi.md#getevaluations) | **Get** /usage/evaluations/{envId}/{flagKey} | Get events usage by event id and the feature flag key. 44 *CustomerMetricsApi* | [**GetEvent**](docs/CustomerMetricsApi.md#getevent) | **Get** /usage/events/{type} | Get events usage by event type. 45 *CustomerMetricsApi* | [**GetEvents**](docs/CustomerMetricsApi.md#getevents) | **Get** /usage/events | Get events usage endpoints. 46 *CustomerMetricsApi* | [**GetMAU**](docs/CustomerMetricsApi.md#getmau) | **Get** /usage/mau | Get monthly active user data. 47 *CustomerMetricsApi* | [**GetMAUByCategory**](docs/CustomerMetricsApi.md#getmaubycategory) | **Get** /usage/mau/bycategory | Get monthly active user data by category. 48 *CustomerMetricsApi* | [**GetStream**](docs/CustomerMetricsApi.md#getstream) | **Get** /usage/streams/{source} | Get a stream endpoint and return timeseries data. 49 *CustomerMetricsApi* | [**GetStreamBySDK**](docs/CustomerMetricsApi.md#getstreambysdk) | **Get** /usage/streams/{source}/bysdkversion | Get a stream timeseries data by source show sdk version metadata. 50 *CustomerMetricsApi* | [**GetStreamSDKVersion**](docs/CustomerMetricsApi.md#getstreamsdkversion) | **Get** /usage/streams/{source}/sdkversions | Get a stream timeseries data by source and show all sdk version associated. 51 *CustomerMetricsApi* | [**GetStreams**](docs/CustomerMetricsApi.md#getstreams) | **Get** /usage/streams | Returns a list of all streams. 52 *CustomerMetricsApi* | [**GetUsage**](docs/CustomerMetricsApi.md#getusage) | **Get** /usage | Returns of the usage endpoints available. 53 *DataExportDestinationsApi* | [**DeleteDestination**](docs/DataExportDestinationsApi.md#deletedestination) | **Delete** /destinations/{projectKey}/{environmentKey}/{destinationId} | Get a single data export destination by ID 54 *DataExportDestinationsApi* | [**GetDestination**](docs/DataExportDestinationsApi.md#getdestination) | **Get** /destinations/{projectKey}/{environmentKey}/{destinationId} | Get a single data export destination by ID 55 *DataExportDestinationsApi* | [**GetDestinations**](docs/DataExportDestinationsApi.md#getdestinations) | **Get** /destinations | Returns a list of all data export destinations. 56 *DataExportDestinationsApi* | [**PatchDestination**](docs/DataExportDestinationsApi.md#patchdestination) | **Patch** /destinations/{projectKey}/{environmentKey}/{destinationId} | Perform a partial update to a data export destination. 57 *DataExportDestinationsApi* | [**PostDestination**](docs/DataExportDestinationsApi.md#postdestination) | **Post** /destinations/{projectKey}/{environmentKey} | Create a new data export destination 58 *EnvironmentsApi* | [**DeleteEnvironment**](docs/EnvironmentsApi.md#deleteenvironment) | **Delete** /projects/{projectKey}/environments/{environmentKey} | Delete an environment in a specific project. 59 *EnvironmentsApi* | [**GetEnvironment**](docs/EnvironmentsApi.md#getenvironment) | **Get** /projects/{projectKey}/environments/{environmentKey} | Get an environment given a project and key. 60 *EnvironmentsApi* | [**PatchEnvironment**](docs/EnvironmentsApi.md#patchenvironment) | **Patch** /projects/{projectKey}/environments/{environmentKey} | Modify an environment by ID. If you try to patch the environment by setting both required and requiredApprovalTags, it will result in an error. Users can specify either required approvals for all flags in an environment or those with specific tags, but not both. Only customers on an Enterprise plan can require approval for flag updates with either mechanism. 61 *EnvironmentsApi* | [**PostEnvironment**](docs/EnvironmentsApi.md#postenvironment) | **Post** /projects/{projectKey}/environments | Create a new environment in a specified project with a given name, key, and swatch color. 62 *EnvironmentsApi* | [**ResetEnvironmentMobileKey**](docs/EnvironmentsApi.md#resetenvironmentmobilekey) | **Post** /projects/{projectKey}/environments/{environmentKey}/mobileKey | Reset an environment's mobile key. The optional expiry for the old key is deprecated for this endpoint, so the old key will always expire immediately. 63 *EnvironmentsApi* | [**ResetEnvironmentSDKKey**](docs/EnvironmentsApi.md#resetenvironmentsdkkey) | **Post** /projects/{projectKey}/environments/{environmentKey}/apiKey | Reset an environment's SDK key with an optional expiry time for the old key. 64 *FeatureFlagsApi* | [**CopyFeatureFlag**](docs/FeatureFlagsApi.md#copyfeatureflag) | **Post** /flags/{projectKey}/{featureFlagKey}/copy | Copies the feature flag configuration from one environment to the same feature flag in another environment. 65 *FeatureFlagsApi* | [**DeleteApprovalRequest**](docs/FeatureFlagsApi.md#deleteapprovalrequest) | **Delete** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} | Delete an approval request for a feature flag config 66 *FeatureFlagsApi* | [**DeleteFeatureFlag**](docs/FeatureFlagsApi.md#deletefeatureflag) | **Delete** /flags/{projectKey}/{featureFlagKey} | Delete a feature flag in all environments. Be careful-- only delete feature flags that are no longer being used by your application. 67 *FeatureFlagsApi* | [**DeleteFlagConfigScheduledChanges**](docs/FeatureFlagsApi.md#deleteflagconfigscheduledchanges) | **Delete** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} | Delete a scheduled change on a feature flag in an environment. 68 *FeatureFlagsApi* | [**FlagsProjectKeyEnvironmentKeyFeatureFlagKeyDependentFlagsGet**](docs/FeatureFlagsApi.md#flagsprojectkeyenvironmentkeyfeatureflagkeydependentflagsget) | **Get** /flags/{projectKey}/{environmentKey}/{featureFlagKey}/dependent-flags | Get dependent flags for the flag in the environment specified in path parameters 69 *FeatureFlagsApi* | [**FlagsProjectKeyFeatureFlagKeyDependentFlagsGet**](docs/FeatureFlagsApi.md#flagsprojectkeyfeatureflagkeydependentflagsget) | **Get** /flags/{projectKey}/{featureFlagKey}/dependent-flags | Get dependent flags across all environments for the flag specified in the path parameters 70 *FeatureFlagsApi* | [**GetApprovalRequest**](docs/FeatureFlagsApi.md#getapprovalrequest) | **Get** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} | Get a single approval request for a feature flag config 71 *FeatureFlagsApi* | [**GetApprovalRequests**](docs/FeatureFlagsApi.md#getapprovalrequests) | **Get** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests | Get all approval requests for a feature flag config 72 *FeatureFlagsApi* | [**GetExpiringUserTargets**](docs/FeatureFlagsApi.md#getexpiringusertargets) | **Get** /flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} | Get expiring user targets for feature flag 73 *FeatureFlagsApi* | [**GetFeatureFlag**](docs/FeatureFlagsApi.md#getfeatureflag) | **Get** /flags/{projectKey}/{featureFlagKey} | Get a single feature flag by key. 74 *FeatureFlagsApi* | [**GetFeatureFlagStatus**](docs/FeatureFlagsApi.md#getfeatureflagstatus) | **Get** /flag-statuses/{projectKey}/{environmentKey}/{featureFlagKey} | Get the status for a particular feature flag. 75 *FeatureFlagsApi* | [**GetFeatureFlagStatusAcrossEnvironments**](docs/FeatureFlagsApi.md#getfeatureflagstatusacrossenvironments) | **Get** /flag-status/{projectKey}/{featureFlagKey} | Get the status for a particular feature flag across environments 76 *FeatureFlagsApi* | [**GetFeatureFlagStatuses**](docs/FeatureFlagsApi.md#getfeatureflagstatuses) | **Get** /flag-statuses/{projectKey}/{environmentKey} | Get a list of statuses for all feature flags. The status includes the last time the feature flag was requested, as well as the state of the flag. 77 *FeatureFlagsApi* | [**GetFeatureFlags**](docs/FeatureFlagsApi.md#getfeatureflags) | **Get** /flags/{projectKey} | Get a list of all features in the given project. 78 *FeatureFlagsApi* | [**GetFlagConfigScheduledChange**](docs/FeatureFlagsApi.md#getflagconfigscheduledchange) | **Get** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} | Get a scheduled change on a feature flag by id. 79 *FeatureFlagsApi* | [**GetFlagConfigScheduledChanges**](docs/FeatureFlagsApi.md#getflagconfigscheduledchanges) | **Get** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes | Get all scheduled workflows for a feature flag by key. 80 *FeatureFlagsApi* | [**GetFlagConfigScheduledChangesConflicts**](docs/FeatureFlagsApi.md#getflagconfigscheduledchangesconflicts) | **Post** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes-conflicts | Lists conflicts between the given instructions and any existing scheduled changes for the feature flag. The actual HTTP verb should be REPORT, not POST. 81 *FeatureFlagsApi* | [**PatchExpiringUserTargets**](docs/FeatureFlagsApi.md#patchexpiringusertargets) | **Patch** /flags/{projectKey}/{featureFlagKey}/expiring-user-targets/{environmentKey} | Update, add, or delete expiring user targets on feature flag 82 *FeatureFlagsApi* | [**PatchFeatureFlag**](docs/FeatureFlagsApi.md#patchfeatureflag) | **Patch** /flags/{projectKey}/{featureFlagKey} | Perform a partial update to a feature. 83 *FeatureFlagsApi* | [**PatchFlagConfigScheduledChange**](docs/FeatureFlagsApi.md#patchflagconfigscheduledchange) | **Patch** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes/{scheduledChangeId} | Updates an existing scheduled-change on a feature flag in an environment. 84 *FeatureFlagsApi* | [**PostApplyApprovalRequest**](docs/FeatureFlagsApi.md#postapplyapprovalrequest) | **Post** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/apply | Apply approval request for a feature flag config 85 *FeatureFlagsApi* | [**PostApprovalRequest**](docs/FeatureFlagsApi.md#postapprovalrequest) | **Post** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId} | Create an approval request for a feature flag config 86 *FeatureFlagsApi* | [**PostFeatureFlag**](docs/FeatureFlagsApi.md#postfeatureflag) | **Post** /flags/{projectKey} | Creates a new feature flag. 87 *FeatureFlagsApi* | [**PostFlagConfigScheduledChanges**](docs/FeatureFlagsApi.md#postflagconfigscheduledchanges) | **Post** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/scheduled-changes | Creates a new scheduled change for a feature flag. 88 *FeatureFlagsApi* | [**PostReviewApprovalRequest**](docs/FeatureFlagsApi.md#postreviewapprovalrequest) | **Post** /projects/{projectKey}/flags/{featureFlagKey}/environments/{environmentKey}/approval-requests/{approvalRequestId}/review | Review approval request for a feature flag config 89 *IntegrationsApi* | [**DeleteIntegrationSubscription**](docs/IntegrationsApi.md#deleteintegrationsubscription) | **Delete** /integrations/{integrationKey}/{integrationId} | Delete an integration subscription by ID. 90 *IntegrationsApi* | [**GetIntegrationSubscription**](docs/IntegrationsApi.md#getintegrationsubscription) | **Get** /integrations/{integrationKey}/{integrationId} | Get a single integration subscription by ID. 91 *IntegrationsApi* | [**GetIntegrationSubscriptions**](docs/IntegrationsApi.md#getintegrationsubscriptions) | **Get** /integrations/{integrationKey} | Get a list of all configured integrations of a given kind. 92 *IntegrationsApi* | [**GetIntegrations**](docs/IntegrationsApi.md#getintegrations) | **Get** /integrations | Get a list of all configured audit log event integrations associated with this account. 93 *IntegrationsApi* | [**PatchIntegrationSubscription**](docs/IntegrationsApi.md#patchintegrationsubscription) | **Patch** /integrations/{integrationKey}/{integrationId} | Modify an integration subscription by ID. 94 *IntegrationsApi* | [**PostIntegrationSubscription**](docs/IntegrationsApi.md#postintegrationsubscription) | **Post** /integrations/{integrationKey} | Create a new integration subscription of a given kind. 95 *ProjectsApi* | [**DeleteProject**](docs/ProjectsApi.md#deleteproject) | **Delete** /projects/{projectKey} | Delete a project by key. Caution-- deleting a project will delete all associated environments and feature flags. You cannot delete the last project in an account. 96 *ProjectsApi* | [**GetProject**](docs/ProjectsApi.md#getproject) | **Get** /projects/{projectKey} | Fetch a single project by key. 97 *ProjectsApi* | [**GetProjects**](docs/ProjectsApi.md#getprojects) | **Get** /projects | Returns a list of all projects in the account. 98 *ProjectsApi* | [**PatchProject**](docs/ProjectsApi.md#patchproject) | **Patch** /projects/{projectKey} | Modify a project by ID. 99 *ProjectsApi* | [**PostProject**](docs/ProjectsApi.md#postproject) | **Post** /projects | Create a new project with the given key and name. 100 *RelayProxyConfigurationsApi* | [**DeleteRelayProxyConfig**](docs/RelayProxyConfigurationsApi.md#deleterelayproxyconfig) | **Delete** /account/relay-auto-configs/{id} | Delete a relay proxy configuration by ID. 101 *RelayProxyConfigurationsApi* | [**GetRelayProxyConfig**](docs/RelayProxyConfigurationsApi.md#getrelayproxyconfig) | **Get** /account/relay-auto-configs/{id} | Get a single relay proxy configuration by ID. 102 *RelayProxyConfigurationsApi* | [**GetRelayProxyConfigs**](docs/RelayProxyConfigurationsApi.md#getrelayproxyconfigs) | **Get** /account/relay-auto-configs | Returns a list of relay proxy configurations in the account. 103 *RelayProxyConfigurationsApi* | [**PatchRelayProxyConfig**](docs/RelayProxyConfigurationsApi.md#patchrelayproxyconfig) | **Patch** /account/relay-auto-configs/{id} | Modify a relay proxy configuration by ID. 104 *RelayProxyConfigurationsApi* | [**PostRelayAutoConfig**](docs/RelayProxyConfigurationsApi.md#postrelayautoconfig) | **Post** /account/relay-auto-configs | Create a new relay proxy config. 105 *RelayProxyConfigurationsApi* | [**ResetRelayProxyConfig**](docs/RelayProxyConfigurationsApi.md#resetrelayproxyconfig) | **Post** /account/relay-auto-configs/{id}/reset | Reset a relay proxy configuration's secret key with an optional expiry time for the old key. 106 *RootApi* | [**GetRoot**](docs/RootApi.md#getroot) | **Get** / | 107 *TeamMembersApi* | [**DeleteMember**](docs/TeamMembersApi.md#deletemember) | **Delete** /members/{memberId} | Delete a team member by ID. 108 *TeamMembersApi* | [**GetMe**](docs/TeamMembersApi.md#getme) | **Get** /members/me | Get the current team member associated with the token 109 *TeamMembersApi* | [**GetMember**](docs/TeamMembersApi.md#getmember) | **Get** /members/{memberId} | Get a single team member by ID. 110 *TeamMembersApi* | [**GetMembers**](docs/TeamMembersApi.md#getmembers) | **Get** /members | Returns a list of all members in the account. 111 *TeamMembersApi* | [**PatchMember**](docs/TeamMembersApi.md#patchmember) | **Patch** /members/{memberId} | Modify a team member by ID. 112 *TeamMembersApi* | [**PostMembers**](docs/TeamMembersApi.md#postmembers) | **Post** /members | Invite new members. 113 *UserSegmentsApi* | [**DeleteUserSegment**](docs/UserSegmentsApi.md#deleteusersegment) | **Delete** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Delete a user segment. 114 *UserSegmentsApi* | [**GetExpiringUserTargetsOnSegment**](docs/UserSegmentsApi.md#getexpiringusertargetsonsegment) | **Get** /segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey} | Get expiring user targets for user segment 115 *UserSegmentsApi* | [**GetUserSegment**](docs/UserSegmentsApi.md#getusersegment) | **Get** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Get a single user segment by key. 116 *UserSegmentsApi* | [**GetUserSegments**](docs/UserSegmentsApi.md#getusersegments) | **Get** /segments/{projectKey}/{environmentKey} | Get a list of all user segments in the given project. 117 *UserSegmentsApi* | [**PatchExpiringUserTargetsOnSegment**](docs/UserSegmentsApi.md#patchexpiringusertargetsonsegment) | **Patch** /segments/{projectKey}/{userSegmentKey}/expiring-user-targets/{environmentKey} | Update, add, or delete expiring user targets on user segment 118 *UserSegmentsApi* | [**PatchUserSegment**](docs/UserSegmentsApi.md#patchusersegment) | **Patch** /segments/{projectKey}/{environmentKey}/{userSegmentKey} | Perform a partial update to a user segment. 119 *UserSegmentsApi* | [**PostUserSegment**](docs/UserSegmentsApi.md#postusersegment) | **Post** /segments/{projectKey}/{environmentKey} | Creates a new user segment. 120 *UserSegmentsApi* | [**UpdateBigSegmentTargets**](docs/UserSegmentsApi.md#updatebigsegmenttargets) | **Post** /segments/{projectKey}/{environmentKey}/{userSegmentKey}/users | Update targets included or excluded in a big segment 121 *UserSettingsApi* | [**GetExpiringUserTargetsForUser**](docs/UserSettingsApi.md#getexpiringusertargetsforuser) | **Get** /users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} | Get expiring dates on flags for user 122 *UserSettingsApi* | [**GetUserFlagSetting**](docs/UserSettingsApi.md#getuserflagsetting) | **Get** /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} | Fetch a single flag setting for a user by key. 123 *UserSettingsApi* | [**GetUserFlagSettings**](docs/UserSettingsApi.md#getuserflagsettings) | **Get** /users/{projectKey}/{environmentKey}/{userKey}/flags | Fetch a single flag setting for a user by key. 124 *UserSettingsApi* | [**PatchExpiringUserTargetsForFlags**](docs/UserSettingsApi.md#patchexpiringusertargetsforflags) | **Patch** /users/{projectKey}/{userKey}/expiring-user-targets/{environmentKey} | Update, add, or delete expiring user targets for a single user on all flags 125 *UserSettingsApi* | [**PutFlagSetting**](docs/UserSettingsApi.md#putflagsetting) | **Put** /users/{projectKey}/{environmentKey}/{userKey}/flags/{featureFlagKey} | Specifically enable or disable a feature flag for a user based on their key. 126 *UsersApi* | [**DeleteUser**](docs/UsersApi.md#deleteuser) | **Delete** /users/{projectKey}/{environmentKey}/{userKey} | Delete a user by ID. 127 *UsersApi* | [**GetSearchUsers**](docs/UsersApi.md#getsearchusers) | **Get** /user-search/{projectKey}/{environmentKey} | Search users in LaunchDarkly based on their last active date, or a search query. It should not be used to enumerate all users in LaunchDarkly-- use the List users API resource. 128 *UsersApi* | [**GetUser**](docs/UsersApi.md#getuser) | **Get** /users/{projectKey}/{environmentKey}/{userKey} | Get a user by key. 129 *UsersApi* | [**GetUsers**](docs/UsersApi.md#getusers) | **Get** /users/{projectKey}/{environmentKey} | List all users in the environment. Includes the total count of users. In each page, there will be up to 'limit' users returned (default 20). This is useful for exporting all users in the system for further analysis. Paginated collections will include a next link containing a URL with the next set of elements in the collection. 130 *WebhooksApi* | [**DeleteWebhook**](docs/WebhooksApi.md#deletewebhook) | **Delete** /webhooks/{resourceId} | Delete a webhook by ID. 131 *WebhooksApi* | [**GetWebhook**](docs/WebhooksApi.md#getwebhook) | **Get** /webhooks/{resourceId} | Get a webhook by ID. 132 *WebhooksApi* | [**GetWebhooks**](docs/WebhooksApi.md#getwebhooks) | **Get** /webhooks | Fetch a list of all webhooks. 133 *WebhooksApi* | [**PatchWebhook**](docs/WebhooksApi.md#patchwebhook) | **Patch** /webhooks/{resourceId} | Modify a webhook by ID. 134 *WebhooksApi* | [**PostWebhook**](docs/WebhooksApi.md#postwebhook) | **Post** /webhooks | Create a webhook. 135 136 137 ## Documentation For Models 138 139 - [ApprovalRequest](docs/ApprovalRequest.md) 140 - [ApprovalRequestApplyConfigBody](docs/ApprovalRequestApplyConfigBody.md) 141 - [ApprovalRequestConfigBody](docs/ApprovalRequestConfigBody.md) 142 - [ApprovalRequestReview](docs/ApprovalRequestReview.md) 143 - [ApprovalRequestReviewConfigBody](docs/ApprovalRequestReviewConfigBody.md) 144 - [ApprovalRequestReviewStatus](docs/ApprovalRequestReviewStatus.md) 145 - [ApprovalRequests](docs/ApprovalRequests.md) 146 - [AuditLogEntries](docs/AuditLogEntries.md) 147 - [AuditLogEntry](docs/AuditLogEntry.md) 148 - [AuditLogEntryTarget](docs/AuditLogEntryTarget.md) 149 - [BigSegmentTargetChanges](docs/BigSegmentTargetChanges.md) 150 - [BigSegmentTargetsBody](docs/BigSegmentTargetsBody.md) 151 - [Clause](docs/Clause.md) 152 - [ClientSideAvailability](docs/ClientSideAvailability.md) 153 - [CopyActions](docs/CopyActions.md) 154 - [CustomProperty](docs/CustomProperty.md) 155 - [CustomPropertyValues](docs/CustomPropertyValues.md) 156 - [CustomRole](docs/CustomRole.md) 157 - [CustomRoleBody](docs/CustomRoleBody.md) 158 - [CustomRoles](docs/CustomRoles.md) 159 - [Defaults](docs/Defaults.md) 160 - [DependentFlag](docs/DependentFlag.md) 161 - [DependentFlagEnvironment](docs/DependentFlagEnvironment.md) 162 - [DependentFlagEnvironmentLinks](docs/DependentFlagEnvironmentLinks.md) 163 - [DependentFlagLinks](docs/DependentFlagLinks.md) 164 - [DependentFlagsByEnvironment](docs/DependentFlagsByEnvironment.md) 165 - [DependentFlagsLinks](docs/DependentFlagsLinks.md) 166 - [Destination](docs/Destination.md) 167 - [DestinationAmazonKinesis](docs/DestinationAmazonKinesis.md) 168 - [DestinationBody](docs/DestinationBody.md) 169 - [DestinationGooglePubSub](docs/DestinationGooglePubSub.md) 170 - [DestinationMParticle](docs/DestinationMParticle.md) 171 - [DestinationSegment](docs/DestinationSegment.md) 172 - [Destinations](docs/Destinations.md) 173 - [Environment](docs/Environment.md) 174 - [EnvironmentApprovalSettings](docs/EnvironmentApprovalSettings.md) 175 - [EnvironmentPost](docs/EnvironmentPost.md) 176 - [EvaluationUsageError](docs/EvaluationUsageError.md) 177 - [Events](docs/Events.md) 178 - [FeatureFlag](docs/FeatureFlag.md) 179 - [FeatureFlagBody](docs/FeatureFlagBody.md) 180 - [FeatureFlagConfig](docs/FeatureFlagConfig.md) 181 - [FeatureFlagCopyBody](docs/FeatureFlagCopyBody.md) 182 - [FeatureFlagCopyObject](docs/FeatureFlagCopyObject.md) 183 - [FeatureFlagScheduledChange](docs/FeatureFlagScheduledChange.md) 184 - [FeatureFlagScheduledChanges](docs/FeatureFlagScheduledChanges.md) 185 - [FeatureFlagScheduledChangesConflicts](docs/FeatureFlagScheduledChangesConflicts.md) 186 - [FeatureFlagScheduledChangesConflictsInstructions](docs/FeatureFlagScheduledChangesConflictsInstructions.md) 187 - [FeatureFlagStatus](docs/FeatureFlagStatus.md) 188 - [FeatureFlagStatusAcrossEnvironments](docs/FeatureFlagStatusAcrossEnvironments.md) 189 - [FeatureFlagStatusForQueriedEnvironment](docs/FeatureFlagStatusForQueriedEnvironment.md) 190 - [FeatureFlagStatusLinks](docs/FeatureFlagStatusLinks.md) 191 - [FeatureFlagStatuses](docs/FeatureFlagStatuses.md) 192 - [FeatureFlags](docs/FeatureFlags.md) 193 - [FlagConfigScheduledChangesConflictsBody](docs/FlagConfigScheduledChangesConflictsBody.md) 194 - [FlagConfigScheduledChangesPatchBody](docs/FlagConfigScheduledChangesPatchBody.md) 195 - [FlagConfigScheduledChangesPostBody](docs/FlagConfigScheduledChangesPostBody.md) 196 - [FlagListItem](docs/FlagListItem.md) 197 - [HierarchicalLinks](docs/HierarchicalLinks.md) 198 - [Id](docs/Id.md) 199 - [Integration](docs/Integration.md) 200 - [IntegrationSubscription](docs/IntegrationSubscription.md) 201 - [IntegrationSubscriptionStatus](docs/IntegrationSubscriptionStatus.md) 202 - [Integrations](docs/Integrations.md) 203 - [Link](docs/Link.md) 204 - [Links](docs/Links.md) 205 - [MaUbyCategory](docs/MaUbyCategory.md) 206 - [Mau](docs/Mau.md) 207 - [MauMetadata](docs/MauMetadata.md) 208 - [Member](docs/Member.md) 209 - [MemberLastSeenMetadata](docs/MemberLastSeenMetadata.md) 210 - [Members](docs/Members.md) 211 - [MembersBody](docs/MembersBody.md) 212 - [ModelFallthrough](docs/ModelFallthrough.md) 213 - [MultiEnvironmentDependentFlag](docs/MultiEnvironmentDependentFlag.md) 214 - [MultiEnvironmentDependentFlags](docs/MultiEnvironmentDependentFlags.md) 215 - [PatchComment](docs/PatchComment.md) 216 - [PatchOperation](docs/PatchOperation.md) 217 - [Policy](docs/Policy.md) 218 - [Prerequisite](docs/Prerequisite.md) 219 - [Project](docs/Project.md) 220 - [ProjectBody](docs/ProjectBody.md) 221 - [Projects](docs/Projects.md) 222 - [RelayProxyConfig](docs/RelayProxyConfig.md) 223 - [RelayProxyConfigBody](docs/RelayProxyConfigBody.md) 224 - [RelayProxyConfigs](docs/RelayProxyConfigs.md) 225 - [Role](docs/Role.md) 226 - [Rollout](docs/Rollout.md) 227 - [Rule](docs/Rule.md) 228 - [ScheduledChangesFeatureFlagConflict](docs/ScheduledChangesFeatureFlagConflict.md) 229 - [SemanticPatchInstruction](docs/SemanticPatchInstruction.md) 230 - [SemanticPatchInstructionInner](docs/SemanticPatchInstructionInner.md) 231 - [SemanticPatchOperation](docs/SemanticPatchOperation.md) 232 - [Site](docs/Site.md) 233 - [Statement](docs/Statement.md) 234 - [Stream](docs/Stream.md) 235 - [StreamBySdk](docs/StreamBySdk.md) 236 - [StreamBySdkLinks](docs/StreamBySdkLinks.md) 237 - [StreamBySdkLinksMetadata](docs/StreamBySdkLinksMetadata.md) 238 - [StreamLinks](docs/StreamLinks.md) 239 - [StreamSdkVersion](docs/StreamSdkVersion.md) 240 - [StreamSdkVersionData](docs/StreamSdkVersionData.md) 241 - [StreamUsageError](docs/StreamUsageError.md) 242 - [StreamUsageLinks](docs/StreamUsageLinks.md) 243 - [StreamUsageMetadata](docs/StreamUsageMetadata.md) 244 - [StreamUsageSeries](docs/StreamUsageSeries.md) 245 - [Streams](docs/Streams.md) 246 - [SubscriptionBody](docs/SubscriptionBody.md) 247 - [Target](docs/Target.md) 248 - [Token](docs/Token.md) 249 - [TokenBody](docs/TokenBody.md) 250 - [Tokens](docs/Tokens.md) 251 - [Usage](docs/Usage.md) 252 - [UsageError](docs/UsageError.md) 253 - [UsageLinks](docs/UsageLinks.md) 254 - [User](docs/User.md) 255 - [UserFlagSetting](docs/UserFlagSetting.md) 256 - [UserFlagSettings](docs/UserFlagSettings.md) 257 - [UserRecord](docs/UserRecord.md) 258 - [UserSegment](docs/UserSegment.md) 259 - [UserSegmentBody](docs/UserSegmentBody.md) 260 - [UserSegmentRule](docs/UserSegmentRule.md) 261 - [UserSegments](docs/UserSegments.md) 262 - [UserSettingsBody](docs/UserSettingsBody.md) 263 - [UserTargetingExpirationForFlag](docs/UserTargetingExpirationForFlag.md) 264 - [UserTargetingExpirationForFlags](docs/UserTargetingExpirationForFlags.md) 265 - [UserTargetingExpirationForSegment](docs/UserTargetingExpirationForSegment.md) 266 - [UserTargetingExpirationOnFlagsForUser](docs/UserTargetingExpirationOnFlagsForUser.md) 267 - [UserTargetingExpirationResourceIdForFlag](docs/UserTargetingExpirationResourceIdForFlag.md) 268 - [Users](docs/Users.md) 269 - [Variation](docs/Variation.md) 270 - [Webhook](docs/Webhook.md) 271 - [WebhookBody](docs/WebhookBody.md) 272 - [Webhooks](docs/Webhooks.md) 273 - [WeightedVariation](docs/WeightedVariation.md) 274 275 276 ## Author 277 278 support@launchdarkly.com 279 280 ## Sample Code 281 282 ```go 283 package main 284 285 import ( 286 "context" 287 "fmt" 288 "os" 289 290 "github.com/launchdarkly/api-client-go" 291 ) 292 293 func main() { 294 apiKey := os.Getenv("LD_API_KEY") 295 if apiKey == "" { 296 panic("LD_API_KEY env var was empty!") 297 } 298 client := ldapi.NewAPIClient(ldapi.NewConfiguration()) 299 ctx := context.WithValue(context.Background(), ldapi.ContextAPIKey, ldapi.APIKey{ 300 Key: apiKey, 301 }) 302 303 // Create a multi-variate feature flag 304 body := ldapi.FeatureFlagBody{ 305 Name: "Test Flag Go", 306 Key: "test-go", 307 Variations: []ldapi.Variation{ 308 {Value: intfPtr([]interface{}{1, 2})}, 309 {Value: intfPtr([]interface{}{3, 4})}, 310 {Value: intfPtr([]interface{}{5})}}} 311 flag, _, err := client.FeatureFlagsApi.PostFeatureFlag(ctx, "openapi", body, nil) 312 if err != nil { 313 panic(fmt.Errorf("create failed: %s", err)) 314 } 315 fmt.Printf("Created flag: %+v\n", flag) 316 // Clean up new flag 317 defer func() { 318 if _, err := client.FeatureFlagsApi.DeleteFeatureFlag(ctx, "openapi", body.Key); err != nil { 319 panic(fmt.Errorf("delete failed: %s", err)) 320 } 321 }() 322 } 323 324 func intfPtr(i interface{}) *interface{} { 325 return &i 326 } 327 ```