Class: LaunchDarklyApi::AccountMembersBetaApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::AccountMembersBetaApi
- Defined in:
- lib/launchdarkly_api/api/account_members_beta_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ AccountMembersBetaApi
constructor
A new instance of AccountMembersBetaApi.
-
#patch_members(members_patch_input, opts = {}) ⇒ BulkEditMembersRep
Modify account members > ### Full use of this API resource is an Enterprise feature > > The ability to perform a partial update to multiple members is available to customers on an Enterprise plan.
-
#patch_members_with_http_info(members_patch_input, opts = {}) ⇒ Array<(BulkEditMembersRep, Integer, Hash)>
Modify account members > ### Full use of this API resource is an Enterprise feature > > The ability to perform a partial update to multiple members is available to customers on an Enterprise plan.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AccountMembersBetaApi
Returns a new instance of AccountMembersBetaApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/account_members_beta_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/launchdarkly_api/api/account_members_beta_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#patch_members(members_patch_input, opts = {}) ⇒ BulkEditMembersRep
Modify account members > ### Full use of this API resource is an Enterprise feature > > The ability to perform a partial update to multiple members is available to customers on an Enterprise plan. If you are on another plan, you can update members individually. To learn more, [read about our pricing](launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](launchdarkly.com/contact-sales/). Perform a partial update to multiple members. Updating members uses the semantic patch format. To make a semantic patch request, you must append ‘domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating members. <details> <summary>Click to expand instructions for <strong>updating members</strong></summary> #### replaceMembersRoles Replaces the roles of the specified members. This also removes all custom roles assigned to the specified members. ##### Parameters - `value`: The new role. Must be a valid [base role](launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](launchdarkly.com/docs/home/account/roles). - `memberIDs`: List of member IDs. Here’s an example: “‘json { "instructions": [{ "kind": "replaceMemberRoles", "value": "reader", "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } “` #### replaceAllMembersRoles Replaces the roles of all members. This also removes all custom roles assigned to the specified members. Members that match any of the filters are excluded from the update. ##### Parameters - `value`: The new role. Must be a valid [base role](launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](launchdarkly.com/docs/home/account/roles). - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `true` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `true` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `1608672063611` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members’ emails and names. It is not case sensitive. - ‘filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here’s an example: “‘json { "instructions": [{ "kind": "replaceAllMembersRoles", "value": "reader", "filterLastSeen": { "never": true } }] } “` #### replaceMembersCustomRoles Replaces the custom roles of the specified members. ##### Parameters - `values`: List of new custom roles. Must be a valid custom role key or ID. - `memberIDs`: List of member IDs. Here’s an example: “‘json { "instructions": [{ "kind": "replaceMembersCustomRoles", "values": [ "example-custom-role" ], "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } “` #### replaceAllMembersCustomRoles Replaces the custom roles of all members. Members that match any of the filters are excluded from the update. ##### Parameters - `values`: List of new roles. Must be a valid custom role key or ID. - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `true` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `true` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `1608672063611` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members’ emails and names. It is not case sensitive. - ‘filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here’s an example: “‘json { "instructions": [{ "kind": "replaceAllMembersCustomRoles", "values": [ "example-custom-role" ], "filterLastSeen": { "never": true } }] } “` #### replaceMembersRoleAttributes Replaces the role attributes of the specified members. ##### Parameters - `value`: Map of role attribute keys to lists of values. - `memberIDs`: List of member IDs. Here’s an example: “‘json { "instructions": [{ "kind": "replaceMembersRoleAttributes", "value": { "myRoleProjectKey": ["mobile", "web"], "myRoleEnvironmentKey": ["production"] }, "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } “` </details>
27 28 29 30 |
# File 'lib/launchdarkly_api/api/account_members_beta_api.rb', line 27 def patch_members(members_patch_input, opts = {}) data, _status_code, _headers = patch_members_with_http_info(members_patch_input, opts) data end |
#patch_members_with_http_info(members_patch_input, opts = {}) ⇒ Array<(BulkEditMembersRep, Integer, Hash)>
Modify account members > ### Full use of this API resource is an Enterprise feature > > The ability to perform a partial update to multiple members is available to customers on an Enterprise plan. If you are on another plan, you can update members individually. To learn more, [read about our pricing](launchdarkly.com/pricing/). To upgrade your plan, [contact Sales](launchdarkly.com/contact-sales/). Perform a partial update to multiple members. Updating members uses the semantic patch format. To make a semantic patch request, you must append `domain-model=launchdarkly.semanticpatch` to your `Content-Type` header. To learn more, read [Updates using semantic patch](launchdarkly.com/docs/api#updates-using-semantic-patch). ### Instructions Semantic patch requests support the following `kind` instructions for updating members. <details> <summary>Click to expand instructions for <strong>updating members</strong></summary> #### replaceMembersRoles Replaces the roles of the specified members. This also removes all custom roles assigned to the specified members. ##### Parameters - `value`: The new role. Must be a valid [base role](launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](launchdarkly.com/docs/home/account/roles). - `memberIDs`: List of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceMemberRoles", "value": "reader", "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### replaceAllMembersRoles Replaces the roles of all members. This also removes all custom roles assigned to the specified members. Members that match any of the filters are excluded from the update. ##### Parameters - `value`: The new role. Must be a valid [base role](launchdarkly.com/docs/home/getting-started/vocabulary#base-role). To learn more, read [Roles](launchdarkly.com/docs/home/account/roles). - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `true` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `true` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `1608672063611` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive. - `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceAllMembersRoles", "value": "reader", "filterLastSeen": { "never": true } }] } ``` #### replaceMembersCustomRoles Replaces the custom roles of the specified members. ##### Parameters - `values`: List of new custom roles. Must be a valid custom role key or ID. - `memberIDs`: List of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceMembersCustomRoles", "values": [ "example-custom-role" ], "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` #### replaceAllMembersCustomRoles Replaces the custom roles of all members. Members that match any of the filters are excluded from the update. ##### Parameters - `values`: List of new roles. Must be a valid custom role key or ID. - `filterLastSeen`: (Optional) A JSON object with one of the following formats: - `true` - Members that have never been active, such as those who have not accepted their invitation to LaunchDarkly, or have not logged in after being provisioned via SCIM. - `true` - Members that have not been active since LaunchDarkly began recording last seen timestamps. - `1608672063611` - Members that have not been active since the provided value, which should be a timestamp in Unix epoch milliseconds. - `filterQuery`: (Optional) A string that matches against the members' emails and names. It is not case sensitive. - `filterRoles`: (Optional) A `|` separated list of roles and custom roles. For the purposes of this filtering, `Owner` counts as `Admin`. - `filterTeamKey`: (Optional) A string that matches against the key of the team the members belong to. It is not case sensitive. - `ignoredMemberIDs`: (Optional) A list of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceAllMembersCustomRoles", "values": [ "example-custom-role" ], "filterLastSeen": { "never": true } }] } ``` #### replaceMembersRoleAttributes Replaces the role attributes of the specified members. ##### Parameters - `value`: Map of role attribute keys to lists of values. - `memberIDs`: List of member IDs. Here's an example: ```json { "instructions": [{ "kind": "replaceMembersRoleAttributes", "value": { "myRoleProjectKey": ["mobile", "web"], "myRoleEnvironmentKey": ["production"] }, "memberIDs": [ "1234a56b7c89d012345e678f", "507f1f77bcf86cd799439011" ] }] } ``` </details>
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/launchdarkly_api/api/account_members_beta_api.rb', line 37 def patch_members_with_http_info(members_patch_input, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: AccountMembersBetaApi.patch_members ...' end # verify the required parameter 'members_patch_input' is set if @api_client.config.client_side_validation && members_patch_input.nil? fail ArgumentError, "Missing the required parameter 'members_patch_input' when calling AccountMembersBetaApi.patch_members" end # resource path local_var_path = '/api/v2/members' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(members_patch_input) # return_type return_type = opts[:debug_return_type] || 'BulkEditMembersRep' # auth_names auth_names = opts[:debug_auth_names] || ['ApiKey'] = opts.merge( :operation => :"AccountMembersBetaApi.patch_members", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: AccountMembersBetaApi#patch_members\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |