launchdarkly_api 15.0.0 → 15.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -5
- data/docs/AccountUsageBetaApi.md +152 -0
- data/docs/FeatureFlagBody.md +5 -1
- data/docs/FeatureFlagsApi.md +2 -2
- data/docs/InsightsChartsBetaApi.md +6 -6
- data/docs/InsightsFlagEventsBetaApi.md +2 -2
- data/docs/MetricListingRep.md +3 -3
- data/docs/MetricPost.md +8 -2
- data/docs/MetricRep.md +3 -3
- data/docs/Project.md +2 -0
- data/docs/ProjectRep.md +2 -0
- data/docs/ReleaseAudience.md +20 -0
- data/docs/ReleasePhase.md +1 -1
- data/lib/launchdarkly_api/api/account_usage_beta_api.rb +126 -0
- data/lib/launchdarkly_api/api/feature_flags_api.rb +4 -4
- data/lib/launchdarkly_api/api/insights_charts_beta_api.rb +4 -4
- data/lib/launchdarkly_api/api/insights_flag_events_beta_api.rb +2 -2
- data/lib/launchdarkly_api/models/feature_flag_body.rb +24 -4
- data/lib/launchdarkly_api/models/metric_listing_rep.rb +3 -3
- data/lib/launchdarkly_api/models/metric_post.rb +34 -5
- data/lib/launchdarkly_api/models/metric_rep.rb +3 -3
- data/lib/launchdarkly_api/models/project.rb +10 -1
- data/lib/launchdarkly_api/models/project_rep.rb +10 -1
- data/lib/launchdarkly_api/models/release_audience.rb +239 -0
- data/lib/launchdarkly_api/models/release_phase.rb +1 -1
- data/lib/launchdarkly_api/version.rb +1 -1
- data/lib/launchdarkly_api.rb +1 -0
- data/spec/api/account_usage_beta_api_spec.rb +26 -0
- data/spec/api/feature_flags_api_spec.rb +2 -2
- data/spec/api/insights_charts_beta_api_spec.rb +2 -2
- data/spec/api/insights_flag_events_beta_api_spec.rb +1 -1
- data/spec/models/feature_flag_body_spec.rb +12 -0
- data/spec/models/metric_post_spec.rb +18 -0
- data/spec/models/project_rep_spec.rb +6 -0
- data/spec/models/project_spec.rb +6 -0
- data/spec/models/release_audience_spec.rb +40 -0
- metadata +6 -2
@@ -19,6 +19,69 @@ module LaunchDarklyApi
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Get data export events usage
|
23
|
+
# Get a time-series array of the number of monthly data export events from your account. The granularity is always daily, with a maximum of 31 days.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [String] :from The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
|
26
|
+
# @option opts [String] :to The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
|
27
|
+
# @return [SeriesIntervalsRep]
|
28
|
+
def get_data_export_events_usage(opts = {})
|
29
|
+
data, _status_code, _headers = get_data_export_events_usage_with_http_info(opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Get data export events usage
|
34
|
+
# Get a time-series array of the number of monthly data export events from your account. The granularity is always daily, with a maximum of 31 days.
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @option opts [String] :from The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
|
37
|
+
# @option opts [String] :to The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
|
38
|
+
# @return [Array<(SeriesIntervalsRep, Integer, Hash)>] SeriesIntervalsRep data, response status code and response headers
|
39
|
+
def get_data_export_events_usage_with_http_info(opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_data_export_events_usage ...'
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/api/v2/usage/data-export-events'
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
49
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:debug_body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:debug_return_type] || 'SeriesIntervalsRep'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:operation => :"AccountUsageBetaApi.get_data_export_events_usage",
|
70
|
+
:header_params => header_params,
|
71
|
+
:query_params => query_params,
|
72
|
+
:form_params => form_params,
|
73
|
+
:body => post_body,
|
74
|
+
:auth_names => auth_names,
|
75
|
+
:return_type => return_type
|
76
|
+
)
|
77
|
+
|
78
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
79
|
+
if @api_client.config.debugging
|
80
|
+
@api_client.config.logger.debug "API called: AccountUsageBetaApi#get_data_export_events_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
81
|
+
end
|
82
|
+
return data, status_code, headers
|
83
|
+
end
|
84
|
+
|
22
85
|
# Get evaluations usage
|
23
86
|
# Get time-series arrays of the number of times a flag is evaluated, broken down by the variation that resulted from that evaluation. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.
|
24
87
|
# @param project_key [String] The project key
|
@@ -508,6 +571,69 @@ module LaunchDarklyApi
|
|
508
571
|
return data, status_code, headers
|
509
572
|
end
|
510
573
|
|
574
|
+
# Get service connection usage
|
575
|
+
# Get a time-series array of the number of monthly service connections from your account. The granularity is always daily, with a maximum of 31 days.
|
576
|
+
# @param [Hash] opts the optional parameters
|
577
|
+
# @option opts [String] :from The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
|
578
|
+
# @option opts [String] :to The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
|
579
|
+
# @return [SeriesIntervalsRep]
|
580
|
+
def get_service_connection_usage(opts = {})
|
581
|
+
data, _status_code, _headers = get_service_connection_usage_with_http_info(opts)
|
582
|
+
data
|
583
|
+
end
|
584
|
+
|
585
|
+
# Get service connection usage
|
586
|
+
# Get a time-series array of the number of monthly service connections from your account. The granularity is always daily, with a maximum of 31 days.
|
587
|
+
# @param [Hash] opts the optional parameters
|
588
|
+
# @option opts [String] :from The series of data returned starts from this timestamp (Unix seconds). Defaults to the beginning of the current month.
|
589
|
+
# @option opts [String] :to The series of data returned ends at this timestamp (Unix seconds). Defaults to the current time.
|
590
|
+
# @return [Array<(SeriesIntervalsRep, Integer, Hash)>] SeriesIntervalsRep data, response status code and response headers
|
591
|
+
def get_service_connection_usage_with_http_info(opts = {})
|
592
|
+
if @api_client.config.debugging
|
593
|
+
@api_client.config.logger.debug 'Calling API: AccountUsageBetaApi.get_service_connection_usage ...'
|
594
|
+
end
|
595
|
+
# resource path
|
596
|
+
local_var_path = '/api/v2/usage/service-connections'
|
597
|
+
|
598
|
+
# query parameters
|
599
|
+
query_params = opts[:query_params] || {}
|
600
|
+
query_params[:'from'] = opts[:'from'] if !opts[:'from'].nil?
|
601
|
+
query_params[:'to'] = opts[:'to'] if !opts[:'to'].nil?
|
602
|
+
|
603
|
+
# header parameters
|
604
|
+
header_params = opts[:header_params] || {}
|
605
|
+
# HTTP header 'Accept' (if needed)
|
606
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
607
|
+
|
608
|
+
# form parameters
|
609
|
+
form_params = opts[:form_params] || {}
|
610
|
+
|
611
|
+
# http body (model)
|
612
|
+
post_body = opts[:debug_body]
|
613
|
+
|
614
|
+
# return_type
|
615
|
+
return_type = opts[:debug_return_type] || 'SeriesIntervalsRep'
|
616
|
+
|
617
|
+
# auth_names
|
618
|
+
auth_names = opts[:debug_auth_names] || ['ApiKey']
|
619
|
+
|
620
|
+
new_options = opts.merge(
|
621
|
+
:operation => :"AccountUsageBetaApi.get_service_connection_usage",
|
622
|
+
:header_params => header_params,
|
623
|
+
:query_params => query_params,
|
624
|
+
:form_params => form_params,
|
625
|
+
:body => post_body,
|
626
|
+
:auth_names => auth_names,
|
627
|
+
:return_type => return_type
|
628
|
+
)
|
629
|
+
|
630
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
631
|
+
if @api_client.config.debugging
|
632
|
+
@api_client.config.logger.debug "API called: AccountUsageBetaApi#get_service_connection_usage\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
633
|
+
end
|
634
|
+
return data, status_code, headers
|
635
|
+
end
|
636
|
+
|
511
637
|
# Get stream usage
|
512
638
|
# Get a time-series array of the number of streaming connections to LaunchDarkly in each time period. The granularity of the data depends on the age of the data requested. If the requested range is within the past two hours, minutely data is returned. If it is within the last two days, hourly data is returned. Otherwise, daily data is returned.
|
513
639
|
# @param source [String] The source of streaming connections to describe. Must be either `client` or `server`.
|
@@ -610,7 +610,7 @@ module LaunchDarklyApi
|
|
610
610
|
end
|
611
611
|
|
612
612
|
# List feature flags
|
613
|
-
# Get a list of all feature flags in the given project. By default, each flag includes configurations for each environment. You can filter environments with the `env` query parameter. For example, setting `env=production` restricts the returned configurations to just your production environment. You can also filter feature flags by tag with the `tag` query parameter. > #### Recommended use > > This endpoint can return a large amount of information. We recommend using some or all of these query parameters to decrease response time and overall payload size: `limit`, `env`, `query`, and `filter=creationDate`. ### Filtering flags You can filter on certain fields using the `filter` query parameter. For example, setting `filter=query:dark-mode,tags:beta+test` matches flags with the string `dark-mode` in their key or name, ignoring case, which also have the tags `beta` and `test`. The `filter` query parameter supports the following arguments: | Filter argument | Description | Example | |-----------------------|-------------|----------------------| | `
|
613
|
+
# Get a list of all feature flags in the given project. By default, each flag includes configurations for each environment. You can filter environments with the `env` query parameter. For example, setting `env=production` restricts the returned configurations to just your production environment. You can also filter feature flags by tag with the `tag` query parameter. > #### Recommended use > > This endpoint can return a large amount of information. We recommend using some or all of these query parameters to decrease response time and overall payload size: `limit`, `env`, `query`, and `filter=creationDate`. ### Filtering flags You can filter on certain fields using the `filter` query parameter. For example, setting `filter=query:dark-mode,tags:beta+test` matches flags with the string `dark-mode` in their key or name, ignoring case, which also have the tags `beta` and `test`. The `filter` query parameter supports the following arguments: | Filter argument | Description | Example | |-----------------------|-------------|----------------------| | `applicationEvaluated` | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` | | `archived` | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead | | `contextKindsEvaluated` | A `+`-separated list of context kind keys. It filters the list to flags which have been evaluated in the past 30 days for all of the context kinds in the list. | `filter=contextKindsEvaluated:user+application` | | `contextKindTargeted` | A string. It filters the list to flags that are targeting the given context kind key. | `filter=contextKindTargeted:user` | | `codeReferences.max` | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` | | `codeReferences.min` | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` | | `creationDate` | An object with an optional `before` field whose value is Unix time in milliseconds. It filters the list to flags created before the date. | `filter=creationDate:{\"before\":1690527600000}` | | `evaluated` | An object that contains a key of `after` and a value in Unix time in milliseconds. It filters the list to all flags that have been evaluated since the time you specify, in the environment provided. This filter requires the `filterEnv` filter. | `filter=evaluation:{\"after\":1690527600000}` | | `filterEnv` | A string with the key of a valid environment. You must use this field for filters that are environment-specific. If there are multiple environment-specific filters, you only need to include this field once. | `filter=evaluated:{\"after\": 1590768455282},filterEnv:production,status:active` | | `followerId` | A valid member ID. It filters the list to flags that are being followed by this member. | `filter=followerId:12ab3c45de678910abc12345` | | `hasDataExport` | A boolean value. It filters the list to flags that are exporting data in the specified environment. This includes flags that are exporting data from Experimentation. This filter requires the `filterEnv` filter. | `filter=hasDataExport:true,filterEnv:production` | | `hasExperiment` | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` | | `maintainerId` | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` | | `maintainerTeamKey` | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` | | `query` | A string. It filters the list to flags that include the specified string in their key or name. It is not case sensitive. | `filter=query:example` | | `state` | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` | | `sdkAvailability` | A string, one of `client`, `mobile`, `anyClient`, `server`. Using `client` filters the list to flags whose client-side SDK availability is set to use the client-side ID. Using `mobile` filters to flags set to use the mobile key. Using `anyClient` filters to flags set to use either the client-side ID or the mobile key. Using `server` filters to flags set to use neither, that is, to flags only available in server-side SDKs. | `filter=sdkAvailability:client` | | `segmentTargeted` | A string. It filters the list to flags that target the segment with this key. This filter requires the `filterEnv` filter. | `filter=segmentTargeted:example-segment-key,filterEnv:production` | | `status` | A string, either `new`, `inactive`, `active`, or `launched`. It filters the list to flags with the specified status in the specified environment. This filter requires the `filterEnv` filter. | `filter=status:active,filterEnv:production` | | `tags` | A `+`-separated list of tags. It filters the list to flags that have all of the tags in the list. | `filter=tags:beta+test` | | `type` | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` | The documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`. By default, this endpoint returns all flags. You can page through the list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the returned `_links` field. These links will not be present if the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page. ### Sorting flags You can sort flags based on the following fields: - `creationDate` sorts by the creation date of the flag. - `key` sorts by the key of the flag. - `maintainerId` sorts by the flag maintainer. - `name` sorts by flag name. - `tags` sorts by tags. - `targetingModifiedDate` sorts by the date that the flag's targeting rules were last modified in a given environment. It must be used with `env` parameter and it can not be combined with any other sort. If multiple `env` values are provided, it will perform sort using the first one. For example, `sort=-targetingModifiedDate&env=production&env=staging` returns results sorted by `targetingModifiedDate` for the `production` environment. - `type` sorts by flag type All fields are sorted in ascending order by default. To sort in descending order, prefix the field with a dash ( - ). For example, `sort=-name` sorts the response by flag name in descending order. ### Expanding response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `codeReferences` includes code references for the feature flag - `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days - `migrationSettings` includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where `purpose` is `migration`. For example, `expand=evaluation` includes the `evaluation` field in the response. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag's response, and default cohort information is included in the `fallthrough` property of a flag's response. To learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flag-types/migration-flags).
|
614
614
|
# @param project_key [String] The project key
|
615
615
|
# @param [Hash] opts the optional parameters
|
616
616
|
# @option opts [String] :env Filter configurations by environment
|
@@ -630,7 +630,7 @@ module LaunchDarklyApi
|
|
630
630
|
end
|
631
631
|
|
632
632
|
# List feature flags
|
633
|
-
# Get a list of all feature flags in the given project. By default, each flag includes configurations for each environment. You can filter environments with the `env` query parameter. For example, setting `env=production` restricts the returned configurations to just your production environment. You can also filter feature flags by tag with the `tag` query parameter. > #### Recommended use > > This endpoint can return a large amount of information. We recommend using some or all of these query parameters to decrease response time and overall payload size: `limit`, `env`, `query`, and `filter=creationDate`. ### Filtering flags You can filter on certain fields using the `filter` query parameter. For example, setting `filter=query:dark-mode,tags:beta+test` matches flags with the string `dark-mode` in their key or name, ignoring case, which also have the tags `beta` and `test`. The `filter` query parameter supports the following arguments: | Filter argument | Description | Example | |-----------------------|-------------|----------------------| | `
|
633
|
+
# Get a list of all feature flags in the given project. By default, each flag includes configurations for each environment. You can filter environments with the `env` query parameter. For example, setting `env=production` restricts the returned configurations to just your production environment. You can also filter feature flags by tag with the `tag` query parameter. > #### Recommended use > > This endpoint can return a large amount of information. We recommend using some or all of these query parameters to decrease response time and overall payload size: `limit`, `env`, `query`, and `filter=creationDate`. ### Filtering flags You can filter on certain fields using the `filter` query parameter. For example, setting `filter=query:dark-mode,tags:beta+test` matches flags with the string `dark-mode` in their key or name, ignoring case, which also have the tags `beta` and `test`. The `filter` query parameter supports the following arguments: | Filter argument | Description | Example | |-----------------------|-------------|----------------------| | `applicationEvaluated` | A string. It filters the list to flags that are evaluated in the application with the given key. | `filter=applicationEvaluated:com.launchdarkly.cafe` | | `archived` | (deprecated) A boolean value. It filters the list to archived flags. | Use `filter=state:archived` instead | | `contextKindsEvaluated` | A `+`-separated list of context kind keys. It filters the list to flags which have been evaluated in the past 30 days for all of the context kinds in the list. | `filter=contextKindsEvaluated:user+application` | | `contextKindTargeted` | A string. It filters the list to flags that are targeting the given context kind key. | `filter=contextKindTargeted:user` | | `codeReferences.max` | An integer value. Use `0` to return flags that do not have code references. | `filter=codeReferences.max:0` | | `codeReferences.min` | An integer value. Use `1` to return flags that do have code references. | `filter=codeReferences.min:1` | | `creationDate` | An object with an optional `before` field whose value is Unix time in milliseconds. It filters the list to flags created before the date. | `filter=creationDate:{\"before\":1690527600000}` | | `evaluated` | An object that contains a key of `after` and a value in Unix time in milliseconds. It filters the list to all flags that have been evaluated since the time you specify, in the environment provided. This filter requires the `filterEnv` filter. | `filter=evaluation:{\"after\":1690527600000}` | | `filterEnv` | A string with the key of a valid environment. You must use this field for filters that are environment-specific. If there are multiple environment-specific filters, you only need to include this field once. | `filter=evaluated:{\"after\": 1590768455282},filterEnv:production,status:active` | | `followerId` | A valid member ID. It filters the list to flags that are being followed by this member. | `filter=followerId:12ab3c45de678910abc12345` | | `hasDataExport` | A boolean value. It filters the list to flags that are exporting data in the specified environment. This includes flags that are exporting data from Experimentation. This filter requires the `filterEnv` filter. | `filter=hasDataExport:true,filterEnv:production` | | `hasExperiment` | A boolean value. It filters the list to flags that are used in an experiment. | `filter=hasExperiment:true` | | `maintainerId` | A valid member ID. It filters the list to flags that are maintained by this member. | `filter=maintainerId:12ab3c45de678910abc12345` | | `maintainerTeamKey` | A string. It filters the list to flags that are maintained by the team with this key. | `filter=maintainerTeamKey:example-team-key` | | `query` | A string. It filters the list to flags that include the specified string in their key or name. It is not case sensitive. | `filter=query:example` | | `state` | A string, either `live`, `deprecated`, or `archived`. It filters the list to flags in this state. | `filter=state:archived` | | `sdkAvailability` | A string, one of `client`, `mobile`, `anyClient`, `server`. Using `client` filters the list to flags whose client-side SDK availability is set to use the client-side ID. Using `mobile` filters to flags set to use the mobile key. Using `anyClient` filters to flags set to use either the client-side ID or the mobile key. Using `server` filters to flags set to use neither, that is, to flags only available in server-side SDKs. | `filter=sdkAvailability:client` | | `segmentTargeted` | A string. It filters the list to flags that target the segment with this key. This filter requires the `filterEnv` filter. | `filter=segmentTargeted:example-segment-key,filterEnv:production` | | `status` | A string, either `new`, `inactive`, `active`, or `launched`. It filters the list to flags with the specified status in the specified environment. This filter requires the `filterEnv` filter. | `filter=status:active,filterEnv:production` | | `tags` | A `+`-separated list of tags. It filters the list to flags that have all of the tags in the list. | `filter=tags:beta+test` | | `type` | A string, either `temporary` or `permanent`. It filters the list to flags with the specified type. | `filter=type:permanent` | The documented values for the `filter` query are prior to URL encoding. For example, the `+` in `filter=tags:beta+test` must be encoded to `%2B`. By default, this endpoint returns all flags. You can page through the list with the `limit` parameter and by following the `first`, `prev`, `next`, and `last` links in the returned `_links` field. These links will not be present if the pages they refer to don't exist. For example, the `first` and `prev` links will be missing from the response on the first page. ### Sorting flags You can sort flags based on the following fields: - `creationDate` sorts by the creation date of the flag. - `key` sorts by the key of the flag. - `maintainerId` sorts by the flag maintainer. - `name` sorts by flag name. - `tags` sorts by tags. - `targetingModifiedDate` sorts by the date that the flag's targeting rules were last modified in a given environment. It must be used with `env` parameter and it can not be combined with any other sort. If multiple `env` values are provided, it will perform sort using the first one. For example, `sort=-targetingModifiedDate&env=production&env=staging` returns results sorted by `targetingModifiedDate` for the `production` environment. - `type` sorts by flag type All fields are sorted in ascending order by default. To sort in descending order, prefix the field with a dash ( - ). For example, `sort=-name` sorts the response by flag name in descending order. ### Expanding response LaunchDarkly supports the `expand` query param to include additional fields in the response, with the following fields: - `codeReferences` includes code references for the feature flag - `evaluation` includes evaluation information within returned environments, including which context kinds the flag has been evaluated for in the past 30 days - `migrationSettings` includes migration settings information within the flag and within returned environments. These settings are only included for migration flags, that is, where `purpose` is `migration`. For example, `expand=evaluation` includes the `evaluation` field in the response. ### Migration flags For migration flags, the cohort information is included in the `rules` property of a flag's response, and default cohort information is included in the `fallthrough` property of a flag's response. To learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flag-types/migration-flags).
|
634
634
|
# @param project_key [String] The project key
|
635
635
|
# @param [Hash] opts the optional parameters
|
636
636
|
# @option opts [String] :env Filter configurations by environment
|
@@ -955,7 +955,7 @@ module LaunchDarklyApi
|
|
955
955
|
end
|
956
956
|
|
957
957
|
# Create a feature flag
|
958
|
-
# Create a feature flag with the given name, key, and variations. ### Creating a migration flag When you create a migration flag, the variations are pre-determined based on the number of stages in the migration.
|
958
|
+
# Create a feature flag with the given name, key, and variations. <details> <summary>Click to expand instructions for <strong>creating a migration flag</strong></summary> ### Creating a migration flag When you create a migration flag, the variations are pre-determined based on the number of stages in the migration. To create a migration flag, omit the `variations` and `defaults` information. Instead, provide a `purpose` of `migration`, and `migrationSettings`. If you create a migration flag with six stages, `contextKind` is required. Otherwise, it should be omitted. Here's an example: ```json { \"key\": \"flag-key-123\", \"purpose\": \"migration\", \"migrationSettings\": { \"stageCount\": 6, \"contextKind\": \"account\" } } ``` To learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flag-types/migration-flags). </details>
|
959
959
|
# @param project_key [String] The project key
|
960
960
|
# @param feature_flag_body [FeatureFlagBody]
|
961
961
|
# @param [Hash] opts the optional parameters
|
@@ -967,7 +967,7 @@ module LaunchDarklyApi
|
|
967
967
|
end
|
968
968
|
|
969
969
|
# Create a feature flag
|
970
|
-
# Create a feature flag with the given name, key, and variations. ### Creating a migration flag When you create a migration flag, the variations are pre-determined based on the number of stages in the migration.
|
970
|
+
# Create a feature flag with the given name, key, and variations. <details> <summary>Click to expand instructions for <strong>creating a migration flag</strong></summary> ### Creating a migration flag When you create a migration flag, the variations are pre-determined based on the number of stages in the migration. To create a migration flag, omit the `variations` and `defaults` information. Instead, provide a `purpose` of `migration`, and `migrationSettings`. If you create a migration flag with six stages, `contextKind` is required. Otherwise, it should be omitted. Here's an example: ```json { \"key\": \"flag-key-123\", \"purpose\": \"migration\", \"migrationSettings\": { \"stageCount\": 6, \"contextKind\": \"account\" } } ``` To learn more, read [Migration Flags](https://docs.launchdarkly.com/home/flag-types/migration-flags). </details>
|
971
971
|
# @param project_key [String] The project key
|
972
972
|
# @param feature_flag_body [FeatureFlagBody]
|
973
973
|
# @param [Hash] opts the optional parameters
|
@@ -265,13 +265,13 @@ module LaunchDarklyApi
|
|
265
265
|
return data, status_code, headers
|
266
266
|
end
|
267
267
|
|
268
|
-
# Get
|
268
|
+
# Get release frequency chart data
|
269
269
|
# Get release frequency chart data. Engineering insights displays release frequency data in the [release frequency metric view](https://docs.launchdarkly.com/home/engineering-insights/metrics/release).
|
270
270
|
# @param project_key [String] The project key
|
271
271
|
# @param environment_key [String] The environment key
|
272
272
|
# @param [Hash] opts the optional parameters
|
273
273
|
# @option opts [String] :application_key Comma separated list of application keys
|
274
|
-
# @option opts [Boolean] :has_experiments Filter events to those associated with an experiment
|
274
|
+
# @option opts [Boolean] :has_experiments Filter events to those associated with an experiment (`true`) or without an experiment (`false`)
|
275
275
|
# @option opts [String] :global Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`
|
276
276
|
# @option opts [String] :group_by Property to group results by. Options: `impact`
|
277
277
|
# @option opts [Time] :from Unix timestamp in milliseconds. Default value is 7 days ago.
|
@@ -285,13 +285,13 @@ module LaunchDarklyApi
|
|
285
285
|
data
|
286
286
|
end
|
287
287
|
|
288
|
-
# Get
|
288
|
+
# Get release frequency chart data
|
289
289
|
# Get release frequency chart data. Engineering insights displays release frequency data in the [release frequency metric view](https://docs.launchdarkly.com/home/engineering-insights/metrics/release).
|
290
290
|
# @param project_key [String] The project key
|
291
291
|
# @param environment_key [String] The environment key
|
292
292
|
# @param [Hash] opts the optional parameters
|
293
293
|
# @option opts [String] :application_key Comma separated list of application keys
|
294
|
-
# @option opts [Boolean] :has_experiments Filter events to those associated with an experiment
|
294
|
+
# @option opts [Boolean] :has_experiments Filter events to those associated with an experiment (`true`) or without an experiment (`false`)
|
295
295
|
# @option opts [String] :global Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`
|
296
296
|
# @option opts [String] :group_by Property to group results by. Options: `impact`
|
297
297
|
# @option opts [Time] :from Unix timestamp in milliseconds. Default value is 7 days ago.
|
@@ -27,7 +27,7 @@ module LaunchDarklyApi
|
|
27
27
|
# @option opts [String] :application_key Comma separated list of application keys
|
28
28
|
# @option opts [String] :query Filter events by flag key
|
29
29
|
# @option opts [String] :impact_size Filter events by impact size. A small impact created a less than 20% change in the proportion of end users receiving one or more flag variations. A medium impact created between a 20%-80% change. A large impact created a more than 80% change. Options: `none`, `small`, `medium`, `large`
|
30
|
-
# @option opts [Boolean] :has_experiments Filter events to those associated with an experiment
|
30
|
+
# @option opts [Boolean] :has_experiments Filter events to those associated with an experiment (`true`) or without an experiment (`false`)
|
31
31
|
# @option opts [String] :global Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`
|
32
32
|
# @option opts [String] :expand Expand properties in response. Options: `experiments`
|
33
33
|
# @option opts [Integer] :limit The number of deployments to return. Default is 20. Maximum allowed is 100.
|
@@ -49,7 +49,7 @@ module LaunchDarklyApi
|
|
49
49
|
# @option opts [String] :application_key Comma separated list of application keys
|
50
50
|
# @option opts [String] :query Filter events by flag key
|
51
51
|
# @option opts [String] :impact_size Filter events by impact size. A small impact created a less than 20% change in the proportion of end users receiving one or more flag variations. A medium impact created between a 20%-80% change. A large impact created a more than 80% change. Options: `none`, `small`, `medium`, `large`
|
52
|
-
# @option opts [Boolean] :has_experiments Filter events to those associated with an experiment
|
52
|
+
# @option opts [Boolean] :has_experiments Filter events to those associated with an experiment (`true`) or without an experiment (`false`)
|
53
53
|
# @option opts [String] :global Filter to include or exclude global events. Default value is `include`. Options: `include`, `exclude`
|
54
54
|
# @option opts [String] :expand Expand properties in response. Options: `experiments`
|
55
55
|
# @option opts [Integer] :limit The number of deployments to return. Default is 20. Maximum allowed is 100.
|
@@ -47,6 +47,12 @@ module LaunchDarklyApi
|
|
47
47
|
|
48
48
|
attr_accessor :migration_settings
|
49
49
|
|
50
|
+
# The ID of the member who maintains this feature flag
|
51
|
+
attr_accessor :maintainer_id
|
52
|
+
|
53
|
+
# The key of the team that maintains this feature flag
|
54
|
+
attr_accessor :maintainer_team_key
|
55
|
+
|
50
56
|
class EnumAttributeValidator
|
51
57
|
attr_reader :datatype
|
52
58
|
attr_reader :allowable_values
|
@@ -83,7 +89,9 @@ module LaunchDarklyApi
|
|
83
89
|
:'custom_properties' => :'customProperties',
|
84
90
|
:'defaults' => :'defaults',
|
85
91
|
:'purpose' => :'purpose',
|
86
|
-
:'migration_settings' => :'migrationSettings'
|
92
|
+
:'migration_settings' => :'migrationSettings',
|
93
|
+
:'maintainer_id' => :'maintainerId',
|
94
|
+
:'maintainer_team_key' => :'maintainerTeamKey'
|
87
95
|
}
|
88
96
|
end
|
89
97
|
|
@@ -106,7 +114,9 @@ module LaunchDarklyApi
|
|
106
114
|
:'custom_properties' => :'Hash<String, CustomProperty>',
|
107
115
|
:'defaults' => :'Defaults',
|
108
116
|
:'purpose' => :'String',
|
109
|
-
:'migration_settings' => :'MigrationSettingsPost'
|
117
|
+
:'migration_settings' => :'MigrationSettingsPost',
|
118
|
+
:'maintainer_id' => :'String',
|
119
|
+
:'maintainer_team_key' => :'String'
|
110
120
|
}
|
111
121
|
end
|
112
122
|
|
@@ -184,6 +194,14 @@ module LaunchDarklyApi
|
|
184
194
|
if attributes.key?(:'migration_settings')
|
185
195
|
self.migration_settings = attributes[:'migration_settings']
|
186
196
|
end
|
197
|
+
|
198
|
+
if attributes.key?(:'maintainer_id')
|
199
|
+
self.maintainer_id = attributes[:'maintainer_id']
|
200
|
+
end
|
201
|
+
|
202
|
+
if attributes.key?(:'maintainer_team_key')
|
203
|
+
self.maintainer_team_key = attributes[:'maintainer_team_key']
|
204
|
+
end
|
187
205
|
end
|
188
206
|
|
189
207
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -237,7 +255,9 @@ module LaunchDarklyApi
|
|
237
255
|
custom_properties == o.custom_properties &&
|
238
256
|
defaults == o.defaults &&
|
239
257
|
purpose == o.purpose &&
|
240
|
-
migration_settings == o.migration_settings
|
258
|
+
migration_settings == o.migration_settings &&
|
259
|
+
maintainer_id == o.maintainer_id &&
|
260
|
+
maintainer_team_key == o.maintainer_team_key
|
241
261
|
end
|
242
262
|
|
243
263
|
# @see the `==` method
|
@@ -249,7 +269,7 @@ module LaunchDarklyApi
|
|
249
269
|
# Calculates hash code according to all attributes.
|
250
270
|
# @return [Integer] Hash code
|
251
271
|
def hash
|
252
|
-
[name, key, description, include_in_snippet, client_side_availability, variations, temporary, tags, custom_properties, defaults, purpose, migration_settings].hash
|
272
|
+
[name, key, description, include_in_snippet, client_side_availability, variations, temporary, tags, custom_properties, defaults, purpose, migration_settings, maintainer_id, maintainer_team_key].hash
|
253
273
|
end
|
254
274
|
|
255
275
|
# Builds the object from hash
|
@@ -76,13 +76,13 @@ module LaunchDarklyApi
|
|
76
76
|
# An array of randomization units allowed for this metric
|
77
77
|
attr_accessor :randomization_units
|
78
78
|
|
79
|
-
# The method
|
79
|
+
# The method by which multiple unit event values are aggregated
|
80
80
|
attr_accessor :unit_aggregation_type
|
81
81
|
|
82
|
-
# The
|
82
|
+
# The method for analyzing metric events
|
83
83
|
attr_accessor :analysis_type
|
84
84
|
|
85
|
-
# The percentile
|
85
|
+
# The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>.
|
86
86
|
attr_accessor :percentile_value
|
87
87
|
|
88
88
|
attr_accessor :event_default
|
@@ -54,9 +54,17 @@ module LaunchDarklyApi
|
|
54
54
|
# An array of randomization units allowed for this metric
|
55
55
|
attr_accessor :randomization_units
|
56
56
|
|
57
|
-
# The method
|
57
|
+
# The method by which multiple unit event values are aggregated
|
58
58
|
attr_accessor :unit_aggregation_type
|
59
59
|
|
60
|
+
# The method for analyzing metric events
|
61
|
+
attr_accessor :analysis_type
|
62
|
+
|
63
|
+
# The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>.
|
64
|
+
attr_accessor :percentile_value
|
65
|
+
|
66
|
+
attr_accessor :event_default
|
67
|
+
|
60
68
|
class EnumAttributeValidator
|
61
69
|
attr_reader :datatype
|
62
70
|
attr_reader :allowable_values
|
@@ -95,7 +103,10 @@ module LaunchDarklyApi
|
|
95
103
|
:'success_criteria' => :'successCriteria',
|
96
104
|
:'tags' => :'tags',
|
97
105
|
:'randomization_units' => :'randomizationUnits',
|
98
|
-
:'unit_aggregation_type' => :'unitAggregationType'
|
106
|
+
:'unit_aggregation_type' => :'unitAggregationType',
|
107
|
+
:'analysis_type' => :'analysisType',
|
108
|
+
:'percentile_value' => :'percentileValue',
|
109
|
+
:'event_default' => :'eventDefault'
|
99
110
|
}
|
100
111
|
end
|
101
112
|
|
@@ -120,7 +131,10 @@ module LaunchDarklyApi
|
|
120
131
|
:'success_criteria' => :'String',
|
121
132
|
:'tags' => :'Array<String>',
|
122
133
|
:'randomization_units' => :'Array<String>',
|
123
|
-
:'unit_aggregation_type' => :'String'
|
134
|
+
:'unit_aggregation_type' => :'String',
|
135
|
+
:'analysis_type' => :'String',
|
136
|
+
:'percentile_value' => :'Integer',
|
137
|
+
:'event_default' => :'MetricEventDefaultRep'
|
124
138
|
}
|
125
139
|
end
|
126
140
|
|
@@ -206,6 +220,18 @@ module LaunchDarklyApi
|
|
206
220
|
if attributes.key?(:'unit_aggregation_type')
|
207
221
|
self.unit_aggregation_type = attributes[:'unit_aggregation_type']
|
208
222
|
end
|
223
|
+
|
224
|
+
if attributes.key?(:'analysis_type')
|
225
|
+
self.analysis_type = attributes[:'analysis_type']
|
226
|
+
end
|
227
|
+
|
228
|
+
if attributes.key?(:'percentile_value')
|
229
|
+
self.percentile_value = attributes[:'percentile_value']
|
230
|
+
end
|
231
|
+
|
232
|
+
if attributes.key?(:'event_default')
|
233
|
+
self.event_default = attributes[:'event_default']
|
234
|
+
end
|
209
235
|
end
|
210
236
|
|
211
237
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -285,7 +311,10 @@ module LaunchDarklyApi
|
|
285
311
|
success_criteria == o.success_criteria &&
|
286
312
|
tags == o.tags &&
|
287
313
|
randomization_units == o.randomization_units &&
|
288
|
-
unit_aggregation_type == o.unit_aggregation_type
|
314
|
+
unit_aggregation_type == o.unit_aggregation_type &&
|
315
|
+
analysis_type == o.analysis_type &&
|
316
|
+
percentile_value == o.percentile_value &&
|
317
|
+
event_default == o.event_default
|
289
318
|
end
|
290
319
|
|
291
320
|
# @see the `==` method
|
@@ -297,7 +326,7 @@ module LaunchDarklyApi
|
|
297
326
|
# Calculates hash code according to all attributes.
|
298
327
|
# @return [Integer] Hash code
|
299
328
|
def hash
|
300
|
-
[key, name, description, kind, selector, urls, is_active, is_numeric, unit, event_key, success_criteria, tags, randomization_units, unit_aggregation_type].hash
|
329
|
+
[key, name, description, kind, selector, urls, is_active, is_numeric, unit, event_key, success_criteria, tags, randomization_units, unit_aggregation_type, analysis_type, percentile_value, event_default].hash
|
301
330
|
end
|
302
331
|
|
303
332
|
# Builds the object from hash
|
@@ -76,13 +76,13 @@ module LaunchDarklyApi
|
|
76
76
|
# An array of randomization units allowed for this metric
|
77
77
|
attr_accessor :randomization_units
|
78
78
|
|
79
|
-
# The method
|
79
|
+
# The method by which multiple unit event values are aggregated
|
80
80
|
attr_accessor :unit_aggregation_type
|
81
81
|
|
82
|
-
# The
|
82
|
+
# The method for analyzing metric events
|
83
83
|
attr_accessor :analysis_type
|
84
84
|
|
85
|
-
# The percentile
|
85
|
+
# The percentile for the analysis method. An integer denoting the target percentile between 0 and 100. Required when <code>analysisType</code> is <code>percentile</code>.
|
86
86
|
attr_accessor :percentile_value
|
87
87
|
|
88
88
|
attr_accessor :event_default
|
@@ -32,6 +32,8 @@ module LaunchDarklyApi
|
|
32
32
|
# A human-friendly name for the project
|
33
33
|
attr_accessor :name
|
34
34
|
|
35
|
+
attr_accessor :_access
|
36
|
+
|
35
37
|
# A list of tags for the project
|
36
38
|
attr_accessor :tags
|
37
39
|
|
@@ -49,6 +51,7 @@ module LaunchDarklyApi
|
|
49
51
|
:'include_in_snippet_by_default' => :'includeInSnippetByDefault',
|
50
52
|
:'default_client_side_availability' => :'defaultClientSideAvailability',
|
51
53
|
:'name' => :'name',
|
54
|
+
:'_access' => :'_access',
|
52
55
|
:'tags' => :'tags',
|
53
56
|
:'default_release_pipeline_key' => :'defaultReleasePipelineKey',
|
54
57
|
:'environments' => :'environments'
|
@@ -69,6 +72,7 @@ module LaunchDarklyApi
|
|
69
72
|
:'include_in_snippet_by_default' => :'Boolean',
|
70
73
|
:'default_client_side_availability' => :'ClientSideAvailability',
|
71
74
|
:'name' => :'String',
|
75
|
+
:'_access' => :'Access',
|
72
76
|
:'tags' => :'Array<String>',
|
73
77
|
:'default_release_pipeline_key' => :'String',
|
74
78
|
:'environments' => :'Environments'
|
@@ -122,6 +126,10 @@ module LaunchDarklyApi
|
|
122
126
|
self.name = attributes[:'name']
|
123
127
|
end
|
124
128
|
|
129
|
+
if attributes.key?(:'_access')
|
130
|
+
self._access = attributes[:'_access']
|
131
|
+
end
|
132
|
+
|
125
133
|
if attributes.key?(:'tags')
|
126
134
|
if (value = attributes[:'tags']).is_a?(Array)
|
127
135
|
self.tags = value
|
@@ -191,6 +199,7 @@ module LaunchDarklyApi
|
|
191
199
|
include_in_snippet_by_default == o.include_in_snippet_by_default &&
|
192
200
|
default_client_side_availability == o.default_client_side_availability &&
|
193
201
|
name == o.name &&
|
202
|
+
_access == o._access &&
|
194
203
|
tags == o.tags &&
|
195
204
|
default_release_pipeline_key == o.default_release_pipeline_key &&
|
196
205
|
environments == o.environments
|
@@ -205,7 +214,7 @@ module LaunchDarklyApi
|
|
205
214
|
# Calculates hash code according to all attributes.
|
206
215
|
# @return [Integer] Hash code
|
207
216
|
def hash
|
208
|
-
[_links, _id, key, include_in_snippet_by_default, default_client_side_availability, name, tags, default_release_pipeline_key, environments].hash
|
217
|
+
[_links, _id, key, include_in_snippet_by_default, default_client_side_availability, name, _access, tags, default_release_pipeline_key, environments].hash
|
209
218
|
end
|
210
219
|
|
211
220
|
# Builds the object from hash
|
@@ -32,6 +32,8 @@ module LaunchDarklyApi
|
|
32
32
|
# A human-friendly name for the project
|
33
33
|
attr_accessor :name
|
34
34
|
|
35
|
+
attr_accessor :_access
|
36
|
+
|
35
37
|
# A list of tags for the project
|
36
38
|
attr_accessor :tags
|
37
39
|
|
@@ -50,6 +52,7 @@ module LaunchDarklyApi
|
|
50
52
|
:'include_in_snippet_by_default' => :'includeInSnippetByDefault',
|
51
53
|
:'default_client_side_availability' => :'defaultClientSideAvailability',
|
52
54
|
:'name' => :'name',
|
55
|
+
:'_access' => :'_access',
|
53
56
|
:'tags' => :'tags',
|
54
57
|
:'default_release_pipeline_key' => :'defaultReleasePipelineKey',
|
55
58
|
:'environments' => :'environments'
|
@@ -70,6 +73,7 @@ module LaunchDarklyApi
|
|
70
73
|
:'include_in_snippet_by_default' => :'Boolean',
|
71
74
|
:'default_client_side_availability' => :'ClientSideAvailability',
|
72
75
|
:'name' => :'String',
|
76
|
+
:'_access' => :'Access',
|
73
77
|
:'tags' => :'Array<String>',
|
74
78
|
:'default_release_pipeline_key' => :'String',
|
75
79
|
:'environments' => :'Array<Environment>'
|
@@ -123,6 +127,10 @@ module LaunchDarklyApi
|
|
123
127
|
self.name = attributes[:'name']
|
124
128
|
end
|
125
129
|
|
130
|
+
if attributes.key?(:'_access')
|
131
|
+
self._access = attributes[:'_access']
|
132
|
+
end
|
133
|
+
|
126
134
|
if attributes.key?(:'tags')
|
127
135
|
if (value = attributes[:'tags']).is_a?(Array)
|
128
136
|
self.tags = value
|
@@ -199,6 +207,7 @@ module LaunchDarklyApi
|
|
199
207
|
include_in_snippet_by_default == o.include_in_snippet_by_default &&
|
200
208
|
default_client_side_availability == o.default_client_side_availability &&
|
201
209
|
name == o.name &&
|
210
|
+
_access == o._access &&
|
202
211
|
tags == o.tags &&
|
203
212
|
default_release_pipeline_key == o.default_release_pipeline_key &&
|
204
213
|
environments == o.environments
|
@@ -213,7 +222,7 @@ module LaunchDarklyApi
|
|
213
222
|
# Calculates hash code according to all attributes.
|
214
223
|
# @return [Integer] Hash code
|
215
224
|
def hash
|
216
|
-
[_links, _id, key, include_in_snippet_by_default, default_client_side_availability, name, tags, default_release_pipeline_key, environments].hash
|
225
|
+
[_links, _id, key, include_in_snippet_by_default, default_client_side_availability, name, _access, tags, default_release_pipeline_key, environments].hash
|
217
226
|
end
|
218
227
|
|
219
228
|
# Builds the object from hash
|