All URIs are relative to http://localhost:8090
Method | HTTP request | Description |
---|---|---|
create_organization | POST /api/organization | Create Organization |
delete_organization_by_id | DELETE /api/organization/{organization_id} | Delete Organization |
get_organization_by_id | GET /api/organization/{organization_id} | Get Organization |
get_organization_usage | GET /api/organization/usage/{organization_id} | Get Organization Usage |
get_organization_users | GET /api/organization/users/{organization_id} | Get Organization Users |
update_organization | PUT /api/organization | Update Organization |
create_organization(create_organization_data)
Create Organization
Create Organization Create a new organization. The auth'ed user who creates the organization will be the default owner of the organization.
require 'time'
require 'trieve_ruby_client'
# setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::OrganizationApi.new
create_organization_data = TrieveRubyClient::CreateOrganizationData.new({name: 'name_example'}) # CreateOrganizationData | The organization data that you want to create
begin
# Create Organization
result = api_instance.create_organization(create_organization_data)
p result
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->create_organization: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> create_organization_with_http_info(create_organization_data)
begin
# Create Organization
data, status_code, headers = api_instance.create_organization_with_http_info(create_organization_data)
p status_code # => 2xx
p headers # => { ... }
p data # => <Organization>
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->create_organization_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
create_organization_data | CreateOrganizationData | The organization data that you want to create |
- Content-Type: application/json
- Accept: application/json
delete_organization_by_id(tr_organization, organization_id)
Delete Organization
Delete Organization Delete an organization by its id. The auth'ed user must be an owner of the organization to delete it.
require 'time'
require 'trieve_ruby_client'
# setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::OrganizationApi.new
tr_organization = 'tr_organization_example' # String | The organization id to use for the request
organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the organization you want to fetch.
begin
# Delete Organization
result = api_instance.delete_organization_by_id(tr_organization, organization_id)
p result
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->delete_organization_by_id: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> delete_organization_by_id_with_http_info(tr_organization, organization_id)
begin
# Delete Organization
data, status_code, headers = api_instance.delete_organization_by_id_with_http_info(tr_organization, organization_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <Organization>
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->delete_organization_by_id_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | String | The organization id to use for the request | |
organization_id | String | The id of the organization you want to fetch. |
- Content-Type: Not defined
- Accept: application/json
get_organization_by_id(tr_organization, organization_id)
Get Organization
Get Organization Fetch the details of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.
require 'time'
require 'trieve_ruby_client'
# setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::OrganizationApi.new
tr_organization = 'tr_organization_example' # String | The organization id to use for the request
organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the organization you want to fetch.
begin
# Get Organization
result = api_instance.get_organization_by_id(tr_organization, organization_id)
p result
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->get_organization_by_id: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_organization_by_id_with_http_info(tr_organization, organization_id)
begin
# Get Organization
data, status_code, headers = api_instance.get_organization_by_id_with_http_info(tr_organization, organization_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <Organization>
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->get_organization_by_id_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | String | The organization id to use for the request | |
organization_id | String | The id of the organization you want to fetch. |
- Content-Type: Not defined
- Accept: application/json
get_organization_usage(tr_organization, organization_id)
Get Organization Usage
Get Organization Usage Fetch the current usage specification of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.
require 'time'
require 'trieve_ruby_client'
# setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::OrganizationApi.new
tr_organization = 'tr_organization_example' # String | The organization id to use for the request
organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the organization you want to fetch the usage of.
begin
# Get Organization Usage
result = api_instance.get_organization_usage(tr_organization, organization_id)
p result
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->get_organization_usage: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_organization_usage_with_http_info(tr_organization, organization_id)
begin
# Get Organization Usage
data, status_code, headers = api_instance.get_organization_usage_with_http_info(tr_organization, organization_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <OrganizationUsageCount>
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->get_organization_usage_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | String | The organization id to use for the request | |
organization_id | String | The id of the organization you want to fetch the usage of. |
- Content-Type: Not defined
- Accept: application/json
<Array> get_organization_users(tr_organization, organization_id)
Get Organization Users
Get Organization Users Fetch the users of an organization by its id. The auth'ed user must be an admin or owner of the organization to fetch it.
require 'time'
require 'trieve_ruby_client'
# setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::OrganizationApi.new
tr_organization = 'tr_organization_example' # String | The organization id to use for the request
organization_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String | The id of the organization you want to fetch the users of.
begin
# Get Organization Users
result = api_instance.get_organization_users(tr_organization, organization_id)
p result
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->get_organization_users: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(<Array>, Integer, Hash)> get_organization_users_with_http_info(tr_organization, organization_id)
begin
# Get Organization Users
data, status_code, headers = api_instance.get_organization_users_with_http_info(tr_organization, organization_id)
p status_code # => 2xx
p headers # => { ... }
p data # => <Array<SlimUser>>
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->get_organization_users_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | String | The organization id to use for the request | |
organization_id | String | The id of the organization you want to fetch the users of. |
- Content-Type: Not defined
- Accept: application/json
update_organization(tr_organization, update_organization_data)
Update Organization
Update Organization Update an organization. Only the owner of the organization can update it.
require 'time'
require 'trieve_ruby_client'
# setup authorization
TrieveRubyClient.configure do |config|
# Configure API key authorization: ApiKey
config.api_key['ApiKey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
# config.api_key_prefix['ApiKey'] = 'Bearer'
end
api_instance = TrieveRubyClient::OrganizationApi.new
tr_organization = 'tr_organization_example' # String | The organization id to use for the request
update_organization_data = TrieveRubyClient::UpdateOrganizationData.new({organization_id: 'organization_id_example'}) # UpdateOrganizationData | The organization data that you want to update
begin
# Update Organization
result = api_instance.update_organization(tr_organization, update_organization_data)
p result
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->update_organization: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> update_organization_with_http_info(tr_organization, update_organization_data)
begin
# Update Organization
data, status_code, headers = api_instance.update_organization_with_http_info(tr_organization, update_organization_data)
p status_code # => 2xx
p headers # => { ... }
p data # => <Organization>
rescue TrieveRubyClient::ApiError => e
puts "Error when calling OrganizationApi->update_organization_with_http_info: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
tr_organization | String | The organization id to use for the request | |
update_organization_data | UpdateOrganizationData | The organization data that you want to update |
- Content-Type: application/json
- Accept: application/json