Class: LiteLLMClient::OrganizationManagementApi
- Inherits:
-
Object
- Object
- LiteLLMClient::OrganizationManagementApi
- Defined in:
- lib/litellm_client/api/organization_management_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_organization_organization_delete_delete(delete_organization_request, opts = {}) ⇒ Array<LiteLLMOrganizationTableWithMembers>
Delete Organization Delete an organization # Parameters: - organization_ids: List - The organization ids to delete.
-
#delete_organization_organization_delete_delete_with_http_info(delete_organization_request, opts = {}) ⇒ Array<(Array<LiteLLMOrganizationTableWithMembers>, Integer, Hash)>
Delete Organization Delete an organization # Parameters: - organization_ids: List - The organization ids to delete.
-
#deprecated_info_organization_organization_info_post(organization_request, opts = {}) ⇒ Object
Deprecated Info Organization DEPRECATED: Use GET /organization/info instead.
-
#deprecated_info_organization_organization_info_post_with_http_info(organization_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Deprecated Info Organization DEPRECATED: Use GET /organization/info instead.
-
#info_organization_organization_info_get(organization_id, opts = {}) ⇒ LiteLLMOrganizationTableWithMembers
Info Organization Get the org specific information.
-
#info_organization_organization_info_get_with_http_info(organization_id, opts = {}) ⇒ Array<(LiteLLMOrganizationTableWithMembers, Integer, Hash)>
Info Organization Get the org specific information.
-
#initialize(api_client = ApiClient.default) ⇒ OrganizationManagementApi
constructor
A new instance of OrganizationManagementApi.
-
#list_organization_organization_list_get(opts = {}) ⇒ Array<LiteLLMOrganizationTableWithMembers>
List Organization “‘ curl –location –request GET ’0.0.0.0:4000/organization/list’ –header ‘Authorization: Bearer sk-1234’ “‘.
-
#list_organization_organization_list_get_with_http_info(opts = {}) ⇒ Array<(Array<LiteLLMOrganizationTableWithMembers>, Integer, Hash)>
List Organization ``` curl –location –request GET '0.0.0.0:4000/organization/list' –header 'Authorization: Bearer sk-1234' ```.
-
#new_organization_organization_new_post(new_organization_request, opts = {}) ⇒ NewOrganizationResponse
New Organization Allow orgs to own teams Set org level budgets + model access.
-
#new_organization_organization_new_post_with_http_info(new_organization_request, opts = {}) ⇒ Array<(NewOrganizationResponse, Integer, Hash)>
New Organization Allow orgs to own teams Set org level budgets + model access.
-
#organization_member_add_organization_member_add_post(organization_member_add_request, opts = {}) ⇒ OrganizationAddMemberResponse
Organization Member Add [BETA] Add new members (either via user_email or user_id) to an organization If user doesn’t exist, new user row will also be added to User Table Only proxy_admin or org_admin of organization, allowed to access this endpoint.
-
#organization_member_add_organization_member_add_post_with_http_info(organization_member_add_request, opts = {}) ⇒ Array<(OrganizationAddMemberResponse, Integer, Hash)>
Organization Member Add [BETA] Add new members (either via user_email or user_id) to an organization If user doesn't exist, new user row will also be added to User Table Only proxy_admin or org_admin of organization, allowed to access this endpoint.
-
#organization_member_delete_organization_member_delete_delete(organization_member_delete_request, opts = {}) ⇒ Object
Organization Member Delete Delete a member from an organization.
-
#organization_member_delete_organization_member_delete_delete_with_http_info(organization_member_delete_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Organization Member Delete Delete a member from an organization.
-
#organization_member_update_organization_member_update_patch(organization_member_update_request, opts = {}) ⇒ LiteLLMOrganizationMembershipTable
Organization Member Update Update a member’s role in an organization.
-
#organization_member_update_organization_member_update_patch_with_http_info(organization_member_update_request, opts = {}) ⇒ Array<(LiteLLMOrganizationMembershipTable, Integer, Hash)>
Organization Member Update Update a member's role in an organization.
-
#update_organization_organization_update_patch(lite_llm_organization_table_update, opts = {}) ⇒ LiteLLMOrganizationTableWithMembers
Update Organization Update an organization.
-
#update_organization_organization_update_patch_with_http_info(lite_llm_organization_table_update, opts = {}) ⇒ Array<(LiteLLMOrganizationTableWithMembers, Integer, Hash)>
Update Organization Update an organization.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ OrganizationManagementApi
Returns a new instance of OrganizationManagementApi.
19 20 21 |
# File 'lib/litellm_client/api/organization_management_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/litellm_client/api/organization_management_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_organization_organization_delete_delete(delete_organization_request, opts = {}) ⇒ Array<LiteLLMOrganizationTableWithMembers>
Delete Organization Delete an organization # Parameters: - organization_ids: List - The organization ids to delete.
27 28 29 30 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 27 def delete_organization_organization_delete_delete(delete_organization_request, opts = {}) data, _status_code, _headers = delete_organization_organization_delete_delete_with_http_info(delete_organization_request, opts) data end |
#delete_organization_organization_delete_delete_with_http_info(delete_organization_request, opts = {}) ⇒ Array<(Array<LiteLLMOrganizationTableWithMembers>, Integer, Hash)>
Delete Organization Delete an organization # Parameters: - organization_ids: List - The organization ids to delete.
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/litellm_client/api/organization_management_api.rb', line 37 def delete_organization_organization_delete_delete_with_http_info(delete_organization_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.delete_organization_organization_delete_delete ...' end # verify the required parameter 'delete_organization_request' is set if @api_client.config.client_side_validation && delete_organization_request.nil? fail ArgumentError, "Missing the required parameter 'delete_organization_request' when calling OrganizationManagementApi.delete_organization_organization_delete_delete" end # resource path local_var_path = '/organization/delete' # 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(delete_organization_request) # return_type return_type = opts[:debug_return_type] || 'Array<LiteLLMOrganizationTableWithMembers>' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.delete_organization_organization_delete_delete", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationManagementApi#delete_organization_organization_delete_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#deprecated_info_organization_organization_info_post(organization_request, opts = {}) ⇒ Object
Deprecated Info Organization DEPRECATED: Use GET /organization/info instead
95 96 97 98 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 95 def deprecated_info_organization_organization_info_post(organization_request, opts = {}) data, _status_code, _headers = deprecated_info_organization_organization_info_post_with_http_info(organization_request, opts) data end |
#deprecated_info_organization_organization_info_post_with_http_info(organization_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Deprecated Info Organization DEPRECATED: Use GET /organization/info instead
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 105 def deprecated_info_organization_organization_info_post_with_http_info(organization_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.deprecated_info_organization_organization_info_post ...' end # verify the required parameter 'organization_request' is set if @api_client.config.client_side_validation && organization_request.nil? fail ArgumentError, "Missing the required parameter 'organization_request' when calling OrganizationManagementApi.deprecated_info_organization_organization_info_post" end # resource path local_var_path = '/organization/info' # 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(organization_request) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.deprecated_info_organization_organization_info_post", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationManagementApi#deprecated_info_organization_organization_info_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#info_organization_organization_info_get(organization_id, opts = {}) ⇒ LiteLLMOrganizationTableWithMembers
Info Organization Get the org specific information
163 164 165 166 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 163 def info_organization_organization_info_get(organization_id, opts = {}) data, _status_code, _headers = info_organization_organization_info_get_with_http_info(organization_id, opts) data end |
#info_organization_organization_info_get_with_http_info(organization_id, opts = {}) ⇒ Array<(LiteLLMOrganizationTableWithMembers, Integer, Hash)>
Info Organization Get the org specific information
173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 173 def info_organization_organization_info_get_with_http_info(organization_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.info_organization_organization_info_get ...' end # verify the required parameter 'organization_id' is set if @api_client.config.client_side_validation && organization_id.nil? fail ArgumentError, "Missing the required parameter 'organization_id' when calling OrganizationManagementApi.info_organization_organization_info_get" end # resource path local_var_path = '/organization/info' # query parameters query_params = opts[:query_params] || {} query_params[:'organization_id'] = organization_id # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'LiteLLMOrganizationTableWithMembers' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.info_organization_organization_info_get", :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(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationManagementApi#info_organization_organization_info_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_organization_organization_list_get(opts = {}) ⇒ Array<LiteLLMOrganizationTableWithMembers>
List Organization “‘ curl –location –request GET ’0.0.0.0:4000/organization/list’ –header ‘Authorization: Bearer sk-1234’ “‘
226 227 228 229 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 226 def list_organization_organization_list_get(opts = {}) data, _status_code, _headers = list_organization_organization_list_get_with_http_info(opts) data end |
#list_organization_organization_list_get_with_http_info(opts = {}) ⇒ Array<(Array<LiteLLMOrganizationTableWithMembers>, Integer, Hash)>
List Organization ``` curl –location –request GET '0.0.0.0:4000/organization/list' –header 'Authorization: Bearer sk-1234' ```
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 235 def list_organization_organization_list_get_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.list_organization_organization_list_get ...' end # resource path local_var_path = '/organization/list' # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<LiteLLMOrganizationTableWithMembers>' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.list_organization_organization_list_get", :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(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationManagementApi#list_organization_organization_list_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#new_organization_organization_new_post(new_organization_request, opts = {}) ⇒ NewOrganizationResponse
New Organization Allow orgs to own teams Set org level budgets + model access. Only admins can create orgs. # Parameters - organization_alias: str - The name of the organization. - models: List - The models the organization has access to. - budget_id: Optional[str] - The id for a budget (tpm/rpm/max budget) for the organization. ### IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS ### - max_budget: Optional[float] - Max budget for org - tpm_limit: Optional[int] - Max tpm limit for org - rpm_limit: Optional[int] - Max rpm limit for org - max_parallel_requests: Optional[int] - [Not Implemented Yet] Max parallel requests for org - soft_budget: Optional[float] - [Not Implemented Yet] Get a slack alert when this soft budget is reached. Don’t block requests. - model_max_budget: Optional[dict] - Max budget for a specific model - budget_duration: Optional[str] - Frequency of reseting org budget - metadata: Optional[dict] - Metadata for organization, store information for organization. Example metadata - "some info" - blocked: bool - Flag indicating if the org is blocked or not - will stop all calls from keys with this org_id. - tags: Optional[List[str]] - Tags for [tracking spend](litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](litellm.vercel.app/docs/proxy/tag_routing). - organization_id: Optional[str] - The organization id of the team. Default is None. Create via ‘/organization/new`. - model_aliases: Optional - Model aliases for the team. [Docs](docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias) - object_permission: Optional - organization-specific object permission. Example - ["vector_store_1", "vector_store_2"]. IF null or {} then no object permission. Case 1: Create new org without a budget_id “`bash curl –location ’0.0.0.0:4000/organization/new’ –header ‘Authorization: Bearer sk-1234’ –header ‘Content-Type: application/json’ –data ‘{ "organization_alias": "my-secret-org", "models": ["model1", "model2"], "max_budget": 100 }’ “‘ Case 2: Create new org with a budget_id “`bash curl –location ’0.0.0.0:4000/organization/new’ –header ‘Authorization: Bearer sk-1234’ –header ‘Content-Type: application/json’ –data ‘{ "organization_alias": "my-secret-org", "models": ["model1", "model2"], "budget_id": "428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689" }’ “‘
284 285 286 287 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 284 def new_organization_organization_new_post(new_organization_request, opts = {}) data, _status_code, _headers = new_organization_organization_new_post_with_http_info(new_organization_request, opts) data end |
#new_organization_organization_new_post_with_http_info(new_organization_request, opts = {}) ⇒ Array<(NewOrganizationResponse, Integer, Hash)>
New Organization Allow orgs to own teams Set org level budgets + model access. Only admins can create orgs. # Parameters - organization_alias: str - The name of the organization. - models: List - The models the organization has access to. - budget_id: Optional[str] - The id for a budget (tpm/rpm/max budget) for the organization. ### IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS ### - max_budget: Optional[float] - Max budget for org - tpm_limit: Optional[int] - Max tpm limit for org - rpm_limit: Optional[int] - Max rpm limit for org - max_parallel_requests: Optional[int] - [Not Implemented Yet] Max parallel requests for org - soft_budget: Optional[float] - [Not Implemented Yet] Get a slack alert when this soft budget is reached. Don't block requests. - model_max_budget: Optional[dict] - Max budget for a specific model - budget_duration: Optional[str] - Frequency of reseting org budget - metadata: Optional[dict] - Metadata for organization, store information for organization. Example metadata - "some info" - blocked: bool - Flag indicating if the org is blocked or not - will stop all calls from keys with this org_id. - tags: Optional[List[str]] - Tags for [tracking spend](litellm.vercel.app/docs/proxy/enterprise#tracking-spend-for-custom-tags) and/or doing [tag-based routing](litellm.vercel.app/docs/proxy/tag_routing). - organization_id: Optional[str] - The organization id of the team. Default is None. Create via `/organization/new`. - model_aliases: Optional - Model aliases for the team. [Docs](docs.litellm.ai/docs/proxy/team_based_routing#create-team-with-model-alias) - object_permission: Optional - organization-specific object permission. Example - ["vector_store_1", "vector_store_2"]. IF null or {} then no object permission. Case 1: Create new org without a budget_id ```bash curl –location '0.0.0.0:4000/organization/new' –header 'Authorization: Bearer sk-1234' –header 'Content-Type: application/json' –data '{ "organization_alias": "my-secret-org", "models": ["model1", "model2"], "max_budget": 100 }' ``` Case 2: Create new org with a budget_id ```bash curl –location '0.0.0.0:4000/organization/new' –header 'Authorization: Bearer sk-1234' –header 'Content-Type: application/json' –data '{ "organization_alias": "my-secret-org", "models": ["model1", "model2"], "budget_id": "428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689" }' ```
294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 294 def new_organization_organization_new_post_with_http_info(new_organization_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.new_organization_organization_new_post ...' end # verify the required parameter 'new_organization_request' is set if @api_client.config.client_side_validation && new_organization_request.nil? fail ArgumentError, "Missing the required parameter 'new_organization_request' when calling OrganizationManagementApi.new_organization_organization_new_post" end # resource path local_var_path = '/organization/new' # 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(new_organization_request) # return_type return_type = opts[:debug_return_type] || 'NewOrganizationResponse' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.new_organization_organization_new_post", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationManagementApi#new_organization_organization_new_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#organization_member_add_organization_member_add_post(organization_member_add_request, opts = {}) ⇒ OrganizationAddMemberResponse
Organization Member Add
- BETA
-
Add new members (either via user_email or user_id) to an organization If user doesn’t exist, new user row will also be added to User Table Only proxy_admin or org_admin of organization, allowed to access this endpoint. # Parameters: - organization_id: str (required) - member: Union[List, Member] (required) - role: Literal (required) - user_id: Optional - user_email: Optional Note: Either user_id or user_email must be provided for each member. Example: “‘ curl -X POST ’0.0.0.0:4000/organization/member_add’ -H ‘Authorization: Bearer sk-1234’ -H ‘Content-Type: application/json’ -d ‘{ "organization_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": { "role": "internal_user", "user_id": "[email protected]" }, "max_budget_in_organization": 100.0 }’ “‘ The following is executed in this function: 1. Check if organization exists 2. Creates a new Internal User if the user_id or user_email is not found in LiteLLM_UserTable 3. Add Internal User to the `LiteLLM_OrganizationMembership` table
352 353 354 355 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 352 def organization_member_add_organization_member_add_post(organization_member_add_request, opts = {}) data, _status_code, _headers = organization_member_add_organization_member_add_post_with_http_info(organization_member_add_request, opts) data end |
#organization_member_add_organization_member_add_post_with_http_info(organization_member_add_request, opts = {}) ⇒ Array<(OrganizationAddMemberResponse, Integer, Hash)>
Organization Member Add
- BETA
-
Add new members (either via user_email or user_id) to an organization If user doesn't exist, new user row will also be added to User Table Only proxy_admin or org_admin of organization, allowed to access this endpoint. # Parameters: - organization_id: str (required) - member: Union[List, Member] (required) - role: Literal (required) - user_id: Optional - user_email: Optional Note: Either user_id or user_email must be provided for each member. Example: ``` curl -X POST '0.0.0.0:4000/organization/member_add' -H 'Authorization: Bearer sk-1234' -H 'Content-Type: application/json' -d '{ "organization_id": "45e3e396-ee08-4a61-a88e-16b3ce7e0849", "member": { "role": "internal_user", "user_id": "[email protected]" }, "max_budget_in_organization": 100.0 }' ``` The following is executed in this function: 1. Check if organization exists 2. Creates a new Internal User if the user_id or user_email is not found in LiteLLM_UserTable 3. Add Internal User to the `LiteLLM_OrganizationMembership` table
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 362 def organization_member_add_organization_member_add_post_with_http_info(organization_member_add_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.organization_member_add_organization_member_add_post ...' end # verify the required parameter 'organization_member_add_request' is set if @api_client.config.client_side_validation && organization_member_add_request.nil? fail ArgumentError, "Missing the required parameter 'organization_member_add_request' when calling OrganizationManagementApi.organization_member_add_organization_member_add_post" end # resource path local_var_path = '/organization/member_add' # 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(organization_member_add_request) # return_type return_type = opts[:debug_return_type] || 'OrganizationAddMemberResponse' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.organization_member_add_organization_member_add_post", :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(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationManagementApi#organization_member_add_organization_member_add_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#organization_member_delete_organization_member_delete_delete(organization_member_delete_request, opts = {}) ⇒ Object
Organization Member Delete Delete a member from an organization
420 421 422 423 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 420 def organization_member_delete_organization_member_delete_delete(organization_member_delete_request, opts = {}) data, _status_code, _headers = organization_member_delete_organization_member_delete_delete_with_http_info(organization_member_delete_request, opts) data end |
#organization_member_delete_organization_member_delete_delete_with_http_info(organization_member_delete_request, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Organization Member Delete Delete a member from an organization
430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 430 def organization_member_delete_organization_member_delete_delete_with_http_info(organization_member_delete_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.organization_member_delete_organization_member_delete_delete ...' end # verify the required parameter 'organization_member_delete_request' is set if @api_client.config.client_side_validation && organization_member_delete_request.nil? fail ArgumentError, "Missing the required parameter 'organization_member_delete_request' when calling OrganizationManagementApi.organization_member_delete_organization_member_delete_delete" end # resource path local_var_path = '/organization/member_delete' # 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(organization_member_delete_request) # return_type return_type = opts[:debug_return_type] || 'Object' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.organization_member_delete_organization_member_delete_delete", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: OrganizationManagementApi#organization_member_delete_organization_member_delete_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#organization_member_update_organization_member_update_patch(organization_member_update_request, opts = {}) ⇒ LiteLLMOrganizationMembershipTable
Organization Member Update Update a member’s role in an organization
488 489 490 491 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 488 def organization_member_update_organization_member_update_patch(organization_member_update_request, opts = {}) data, _status_code, _headers = organization_member_update_organization_member_update_patch_with_http_info(organization_member_update_request, opts) data end |
#organization_member_update_organization_member_update_patch_with_http_info(organization_member_update_request, opts = {}) ⇒ Array<(LiteLLMOrganizationMembershipTable, Integer, Hash)>
Organization Member Update Update a member's role in an organization
498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 498 def organization_member_update_organization_member_update_patch_with_http_info(organization_member_update_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.organization_member_update_organization_member_update_patch ...' end # verify the required parameter 'organization_member_update_request' is set if @api_client.config.client_side_validation && organization_member_update_request.nil? fail ArgumentError, "Missing the required parameter 'organization_member_update_request' when calling OrganizationManagementApi.organization_member_update_organization_member_update_patch" end # resource path local_var_path = '/organization/member_update' # 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(organization_member_update_request) # return_type return_type = opts[:debug_return_type] || 'LiteLLMOrganizationMembershipTable' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.organization_member_update_organization_member_update_patch", :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: OrganizationManagementApi#organization_member_update_organization_member_update_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_organization_organization_update_patch(lite_llm_organization_table_update, opts = {}) ⇒ LiteLLMOrganizationTableWithMembers
Update Organization Update an organization
556 557 558 559 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 556 def update_organization_organization_update_patch(lite_llm_organization_table_update, opts = {}) data, _status_code, _headers = update_organization_organization_update_patch_with_http_info(lite_llm_organization_table_update, opts) data end |
#update_organization_organization_update_patch_with_http_info(lite_llm_organization_table_update, opts = {}) ⇒ Array<(LiteLLMOrganizationTableWithMembers, Integer, Hash)>
Update Organization Update an organization
566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 |
# File 'lib/litellm_client/api/organization_management_api.rb', line 566 def update_organization_organization_update_patch_with_http_info(lite_llm_organization_table_update, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: OrganizationManagementApi.update_organization_organization_update_patch ...' end # verify the required parameter 'lite_llm_organization_table_update' is set if @api_client.config.client_side_validation && lite_llm_organization_table_update.nil? fail ArgumentError, "Missing the required parameter 'lite_llm_organization_table_update' when calling OrganizationManagementApi.update_organization_organization_update_patch" end # resource path local_var_path = '/organization/update' # 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(lite_llm_organization_table_update) # return_type return_type = opts[:debug_return_type] || 'LiteLLMOrganizationTableWithMembers' # auth_names auth_names = opts[:debug_auth_names] || ['APIKeyHeader'] = opts.merge( :operation => :"OrganizationManagementApi.update_organization_organization_update_patch", :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: OrganizationManagementApi#update_organization_organization_update_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |