zyphr 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +41 -0
- data/docs/AddOrganizationMemberRequest.md +20 -0
- data/docs/AuthOrganizationsApi.md +864 -0
- data/docs/AuthUserProfileApi.md +76 -0
- data/docs/CreateOrganizationRequest.md +22 -0
- data/docs/LoginRequest.md +3 -1
- data/docs/MuseApi.md +681 -0
- data/docs/Organization.md +34 -0
- data/docs/OrganizationListResponse.md +20 -0
- data/docs/OrganizationListResponseMeta.md +20 -0
- data/docs/OrganizationMembersListResponse.md +20 -0
- data/docs/OrganizationMembership.md +30 -0
- data/docs/OrganizationMembershipResponse.md +20 -0
- data/docs/OrganizationMembershipWithUser.md +34 -0
- data/docs/OrganizationResponse.md +20 -0
- data/docs/RegisterRequest.md +5 -1
- data/docs/SwitchOrganizationRequest.md +20 -0
- data/docs/SwitchOrganizationResponse.md +20 -0
- data/docs/SwitchOrganizationResponseData.md +22 -0
- data/docs/SwitchOrganizationResponseDataTokens.md +24 -0
- data/docs/SwitchOrganizationResponseDataUser.md +20 -0
- data/docs/UpdateOrganizationMemberRoleRequest.md +18 -0
- data/docs/UpdateOrganizationRequest.md +22 -0
- data/docs/V1MuseSubjectsSuggestPostRequest.md +24 -0
- data/lib/zyphr/api/auth_organizations_api.rb +773 -0
- data/lib/zyphr/api/auth_user_profile_api.rb +61 -0
- data/lib/zyphr/api/muse_api.rb +644 -0
- data/lib/zyphr/models/add_organization_member_request.rb +248 -0
- data/lib/zyphr/models/create_organization_request.rb +258 -0
- data/lib/zyphr/models/login_request.rb +14 -4
- data/lib/zyphr/models/organization.rb +434 -0
- data/lib/zyphr/models/organization_list_response.rb +265 -0
- data/lib/zyphr/models/organization_list_response_meta.rb +230 -0
- data/lib/zyphr/models/organization_members_list_response.rb +265 -0
- data/lib/zyphr/models/organization_membership.rb +379 -0
- data/lib/zyphr/models/organization_membership_response.rb +263 -0
- data/lib/zyphr/models/organization_membership_with_user.rb +405 -0
- data/lib/zyphr/models/organization_response.rb +263 -0
- data/lib/zyphr/models/register_request.rb +43 -4
- data/lib/zyphr/models/switch_organization_request.rb +263 -0
- data/lib/zyphr/models/switch_organization_response.rb +263 -0
- data/lib/zyphr/models/switch_organization_response_data.rb +289 -0
- data/lib/zyphr/models/switch_organization_response_data_tokens.rb +339 -0
- data/lib/zyphr/models/switch_organization_response_data_user.rb +230 -0
- data/lib/zyphr/models/update_organization_member_role_request.rb +223 -0
- data/lib/zyphr/models/update_organization_request.rb +239 -0
- data/lib/zyphr/models/v1_muse_subjects_suggest_post_request.rb +326 -0
- data/lib/zyphr.rb +20 -0
- data/spec/api/auth_organizations_api_spec.rb +171 -0
- data/spec/api/auth_user_profile_api_spec.rb +12 -0
- data/spec/api/muse_api_spec.rb +156 -0
- data/spec/models/add_organization_member_request_spec.rb +42 -0
- data/spec/models/create_organization_request_spec.rb +48 -0
- data/spec/models/login_request_spec.rb +6 -0
- data/spec/models/organization_list_response_meta_spec.rb +42 -0
- data/spec/models/organization_list_response_spec.rb +42 -0
- data/spec/models/organization_members_list_response_spec.rb +42 -0
- data/spec/models/organization_membership_response_spec.rb +42 -0
- data/spec/models/organization_membership_spec.rb +72 -0
- data/spec/models/organization_membership_with_user_spec.rb +84 -0
- data/spec/models/organization_response_spec.rb +42 -0
- data/spec/models/organization_spec.rb +84 -0
- data/spec/models/register_request_spec.rb +12 -0
- data/spec/models/switch_organization_request_spec.rb +42 -0
- data/spec/models/switch_organization_response_data_spec.rb +48 -0
- data/spec/models/switch_organization_response_data_tokens_spec.rb +58 -0
- data/spec/models/switch_organization_response_data_user_spec.rb +42 -0
- data/spec/models/switch_organization_response_spec.rb +42 -0
- data/spec/models/update_organization_member_role_request_spec.rb +36 -0
- data/spec/models/update_organization_request_spec.rb +48 -0
- data/spec/models/v1_muse_subjects_suggest_post_request_spec.rb +58 -0
- data/zyphr.gemspec +1 -1
- metadata +82 -2
|
@@ -0,0 +1,864 @@
|
|
|
1
|
+
# Zyphr::AuthOrganizationsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.zyphr.dev/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**add_organization_member**](AuthOrganizationsApi.md#add_organization_member) | **POST** /auth/organizations/{id}/members | Add a member to an organization |
|
|
8
|
+
| [**create_organization**](AuthOrganizationsApi.md#create_organization) | **POST** /auth/organizations | Create an organization |
|
|
9
|
+
| [**delete_organization**](AuthOrganizationsApi.md#delete_organization) | **DELETE** /auth/organizations/{id} | Delete an organization |
|
|
10
|
+
| [**get_organization**](AuthOrganizationsApi.md#get_organization) | **GET** /auth/organizations/{id} | Get organization by id |
|
|
11
|
+
| [**list_organization_members**](AuthOrganizationsApi.md#list_organization_members) | **GET** /auth/organizations/{id}/members | List organization members |
|
|
12
|
+
| [**list_organizations**](AuthOrganizationsApi.md#list_organizations) | **GET** /auth/organizations | List organizations |
|
|
13
|
+
| [**list_organizations_for_end_user**](AuthOrganizationsApi.md#list_organizations_for_end_user) | **GET** /auth/end-users/{user_id}/organizations | List organizations an end user belongs to |
|
|
14
|
+
| [**remove_organization_member**](AuthOrganizationsApi.md#remove_organization_member) | **DELETE** /auth/organizations/{id}/members/{user_id} | Remove a member from an organization |
|
|
15
|
+
| [**switch_organization**](AuthOrganizationsApi.md#switch_organization) | **POST** /auth/sessions/switch-organization | Switch the active organization on a session |
|
|
16
|
+
| [**update_organization**](AuthOrganizationsApi.md#update_organization) | **PATCH** /auth/organizations/{id} | Update an organization |
|
|
17
|
+
| [**update_organization_member_role**](AuthOrganizationsApi.md#update_organization_member_role) | **PATCH** /auth/organizations/{id}/members/{user_id} | Update a member's role |
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## add_organization_member
|
|
21
|
+
|
|
22
|
+
> <OrganizationMembershipResponse> add_organization_member(id, add_organization_member_request)
|
|
23
|
+
|
|
24
|
+
Add a member to an organization
|
|
25
|
+
|
|
26
|
+
### Examples
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
require 'time'
|
|
30
|
+
require 'zyphr'
|
|
31
|
+
# setup authorization
|
|
32
|
+
Zyphr.configure do |config|
|
|
33
|
+
# Configure API key authorization: ApplicationSecret
|
|
34
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
35
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
36
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
37
|
+
|
|
38
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
39
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
40
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
41
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
45
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
46
|
+
add_organization_member_request = Zyphr::AddOrganizationMemberRequest.new({user_id: 'user_id_example'}) # AddOrganizationMemberRequest |
|
|
47
|
+
|
|
48
|
+
begin
|
|
49
|
+
# Add a member to an organization
|
|
50
|
+
result = api_instance.add_organization_member(id, add_organization_member_request)
|
|
51
|
+
p result
|
|
52
|
+
rescue Zyphr::ApiError => e
|
|
53
|
+
puts "Error when calling AuthOrganizationsApi->add_organization_member: #{e}"
|
|
54
|
+
end
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Using the add_organization_member_with_http_info variant
|
|
58
|
+
|
|
59
|
+
This returns an Array which contains the response data, status code and headers.
|
|
60
|
+
|
|
61
|
+
> <Array(<OrganizationMembershipResponse>, Integer, Hash)> add_organization_member_with_http_info(id, add_organization_member_request)
|
|
62
|
+
|
|
63
|
+
```ruby
|
|
64
|
+
begin
|
|
65
|
+
# Add a member to an organization
|
|
66
|
+
data, status_code, headers = api_instance.add_organization_member_with_http_info(id, add_organization_member_request)
|
|
67
|
+
p status_code # => 2xx
|
|
68
|
+
p headers # => { ... }
|
|
69
|
+
p data # => <OrganizationMembershipResponse>
|
|
70
|
+
rescue Zyphr::ApiError => e
|
|
71
|
+
puts "Error when calling AuthOrganizationsApi->add_organization_member_with_http_info: #{e}"
|
|
72
|
+
end
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Parameters
|
|
76
|
+
|
|
77
|
+
| Name | Type | Description | Notes |
|
|
78
|
+
| ---- | ---- | ----------- | ----- |
|
|
79
|
+
| **id** | **String** | | |
|
|
80
|
+
| **add_organization_member_request** | [**AddOrganizationMemberRequest**](AddOrganizationMemberRequest.md) | | |
|
|
81
|
+
|
|
82
|
+
### Return type
|
|
83
|
+
|
|
84
|
+
[**OrganizationMembershipResponse**](OrganizationMembershipResponse.md)
|
|
85
|
+
|
|
86
|
+
### Authorization
|
|
87
|
+
|
|
88
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
89
|
+
|
|
90
|
+
### HTTP request headers
|
|
91
|
+
|
|
92
|
+
- **Content-Type**: application/json
|
|
93
|
+
- **Accept**: application/json
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## create_organization
|
|
97
|
+
|
|
98
|
+
> <OrganizationResponse> create_organization(create_organization_request)
|
|
99
|
+
|
|
100
|
+
Create an organization
|
|
101
|
+
|
|
102
|
+
Create a new organization inside the current application × environment. Membership is many-to-many — add end users via POST /auth/organizations/{id}/members. The Default organization for the environment is auto-created at migration time and cannot be created via API.
|
|
103
|
+
|
|
104
|
+
### Examples
|
|
105
|
+
|
|
106
|
+
```ruby
|
|
107
|
+
require 'time'
|
|
108
|
+
require 'zyphr'
|
|
109
|
+
# setup authorization
|
|
110
|
+
Zyphr.configure do |config|
|
|
111
|
+
# Configure API key authorization: ApplicationSecret
|
|
112
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
113
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
114
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
115
|
+
|
|
116
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
117
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
118
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
119
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
123
|
+
create_organization_request = Zyphr::CreateOrganizationRequest.new({name: 'Acme Inc'}) # CreateOrganizationRequest |
|
|
124
|
+
|
|
125
|
+
begin
|
|
126
|
+
# Create an organization
|
|
127
|
+
result = api_instance.create_organization(create_organization_request)
|
|
128
|
+
p result
|
|
129
|
+
rescue Zyphr::ApiError => e
|
|
130
|
+
puts "Error when calling AuthOrganizationsApi->create_organization: #{e}"
|
|
131
|
+
end
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
#### Using the create_organization_with_http_info variant
|
|
135
|
+
|
|
136
|
+
This returns an Array which contains the response data, status code and headers.
|
|
137
|
+
|
|
138
|
+
> <Array(<OrganizationResponse>, Integer, Hash)> create_organization_with_http_info(create_organization_request)
|
|
139
|
+
|
|
140
|
+
```ruby
|
|
141
|
+
begin
|
|
142
|
+
# Create an organization
|
|
143
|
+
data, status_code, headers = api_instance.create_organization_with_http_info(create_organization_request)
|
|
144
|
+
p status_code # => 2xx
|
|
145
|
+
p headers # => { ... }
|
|
146
|
+
p data # => <OrganizationResponse>
|
|
147
|
+
rescue Zyphr::ApiError => e
|
|
148
|
+
puts "Error when calling AuthOrganizationsApi->create_organization_with_http_info: #{e}"
|
|
149
|
+
end
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Parameters
|
|
153
|
+
|
|
154
|
+
| Name | Type | Description | Notes |
|
|
155
|
+
| ---- | ---- | ----------- | ----- |
|
|
156
|
+
| **create_organization_request** | [**CreateOrganizationRequest**](CreateOrganizationRequest.md) | | |
|
|
157
|
+
|
|
158
|
+
### Return type
|
|
159
|
+
|
|
160
|
+
[**OrganizationResponse**](OrganizationResponse.md)
|
|
161
|
+
|
|
162
|
+
### Authorization
|
|
163
|
+
|
|
164
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
165
|
+
|
|
166
|
+
### HTTP request headers
|
|
167
|
+
|
|
168
|
+
- **Content-Type**: application/json
|
|
169
|
+
- **Accept**: application/json
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## delete_organization
|
|
173
|
+
|
|
174
|
+
> delete_organization(id)
|
|
175
|
+
|
|
176
|
+
Delete an organization
|
|
177
|
+
|
|
178
|
+
Hard-deletes the org and cascades memberships. The Default organization cannot be deleted.
|
|
179
|
+
|
|
180
|
+
### Examples
|
|
181
|
+
|
|
182
|
+
```ruby
|
|
183
|
+
require 'time'
|
|
184
|
+
require 'zyphr'
|
|
185
|
+
# setup authorization
|
|
186
|
+
Zyphr.configure do |config|
|
|
187
|
+
# Configure API key authorization: ApplicationSecret
|
|
188
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
189
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
190
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
191
|
+
|
|
192
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
193
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
194
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
195
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
199
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
200
|
+
|
|
201
|
+
begin
|
|
202
|
+
# Delete an organization
|
|
203
|
+
api_instance.delete_organization(id)
|
|
204
|
+
rescue Zyphr::ApiError => e
|
|
205
|
+
puts "Error when calling AuthOrganizationsApi->delete_organization: #{e}"
|
|
206
|
+
end
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
#### Using the delete_organization_with_http_info variant
|
|
210
|
+
|
|
211
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
212
|
+
|
|
213
|
+
> <Array(nil, Integer, Hash)> delete_organization_with_http_info(id)
|
|
214
|
+
|
|
215
|
+
```ruby
|
|
216
|
+
begin
|
|
217
|
+
# Delete an organization
|
|
218
|
+
data, status_code, headers = api_instance.delete_organization_with_http_info(id)
|
|
219
|
+
p status_code # => 2xx
|
|
220
|
+
p headers # => { ... }
|
|
221
|
+
p data # => nil
|
|
222
|
+
rescue Zyphr::ApiError => e
|
|
223
|
+
puts "Error when calling AuthOrganizationsApi->delete_organization_with_http_info: #{e}"
|
|
224
|
+
end
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Parameters
|
|
228
|
+
|
|
229
|
+
| Name | Type | Description | Notes |
|
|
230
|
+
| ---- | ---- | ----------- | ----- |
|
|
231
|
+
| **id** | **String** | | |
|
|
232
|
+
|
|
233
|
+
### Return type
|
|
234
|
+
|
|
235
|
+
nil (empty response body)
|
|
236
|
+
|
|
237
|
+
### Authorization
|
|
238
|
+
|
|
239
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
240
|
+
|
|
241
|
+
### HTTP request headers
|
|
242
|
+
|
|
243
|
+
- **Content-Type**: Not defined
|
|
244
|
+
- **Accept**: Not defined
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
## get_organization
|
|
248
|
+
|
|
249
|
+
> <OrganizationResponse> get_organization(id)
|
|
250
|
+
|
|
251
|
+
Get organization by id
|
|
252
|
+
|
|
253
|
+
### Examples
|
|
254
|
+
|
|
255
|
+
```ruby
|
|
256
|
+
require 'time'
|
|
257
|
+
require 'zyphr'
|
|
258
|
+
# setup authorization
|
|
259
|
+
Zyphr.configure do |config|
|
|
260
|
+
# Configure API key authorization: ApplicationSecret
|
|
261
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
262
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
263
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
264
|
+
|
|
265
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
266
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
267
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
268
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
272
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
273
|
+
|
|
274
|
+
begin
|
|
275
|
+
# Get organization by id
|
|
276
|
+
result = api_instance.get_organization(id)
|
|
277
|
+
p result
|
|
278
|
+
rescue Zyphr::ApiError => e
|
|
279
|
+
puts "Error when calling AuthOrganizationsApi->get_organization: #{e}"
|
|
280
|
+
end
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
#### Using the get_organization_with_http_info variant
|
|
284
|
+
|
|
285
|
+
This returns an Array which contains the response data, status code and headers.
|
|
286
|
+
|
|
287
|
+
> <Array(<OrganizationResponse>, Integer, Hash)> get_organization_with_http_info(id)
|
|
288
|
+
|
|
289
|
+
```ruby
|
|
290
|
+
begin
|
|
291
|
+
# Get organization by id
|
|
292
|
+
data, status_code, headers = api_instance.get_organization_with_http_info(id)
|
|
293
|
+
p status_code # => 2xx
|
|
294
|
+
p headers # => { ... }
|
|
295
|
+
p data # => <OrganizationResponse>
|
|
296
|
+
rescue Zyphr::ApiError => e
|
|
297
|
+
puts "Error when calling AuthOrganizationsApi->get_organization_with_http_info: #{e}"
|
|
298
|
+
end
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Parameters
|
|
302
|
+
|
|
303
|
+
| Name | Type | Description | Notes |
|
|
304
|
+
| ---- | ---- | ----------- | ----- |
|
|
305
|
+
| **id** | **String** | | |
|
|
306
|
+
|
|
307
|
+
### Return type
|
|
308
|
+
|
|
309
|
+
[**OrganizationResponse**](OrganizationResponse.md)
|
|
310
|
+
|
|
311
|
+
### Authorization
|
|
312
|
+
|
|
313
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
314
|
+
|
|
315
|
+
### HTTP request headers
|
|
316
|
+
|
|
317
|
+
- **Content-Type**: Not defined
|
|
318
|
+
- **Accept**: application/json
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
## list_organization_members
|
|
322
|
+
|
|
323
|
+
> <OrganizationMembersListResponse> list_organization_members(id, opts)
|
|
324
|
+
|
|
325
|
+
List organization members
|
|
326
|
+
|
|
327
|
+
### Examples
|
|
328
|
+
|
|
329
|
+
```ruby
|
|
330
|
+
require 'time'
|
|
331
|
+
require 'zyphr'
|
|
332
|
+
# setup authorization
|
|
333
|
+
Zyphr.configure do |config|
|
|
334
|
+
# Configure API key authorization: ApplicationSecret
|
|
335
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
336
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
337
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
338
|
+
|
|
339
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
340
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
341
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
342
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
343
|
+
end
|
|
344
|
+
|
|
345
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
346
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
347
|
+
opts = {
|
|
348
|
+
limit: 56, # Integer |
|
|
349
|
+
cursor: 'cursor_example' # String |
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
begin
|
|
353
|
+
# List organization members
|
|
354
|
+
result = api_instance.list_organization_members(id, opts)
|
|
355
|
+
p result
|
|
356
|
+
rescue Zyphr::ApiError => e
|
|
357
|
+
puts "Error when calling AuthOrganizationsApi->list_organization_members: #{e}"
|
|
358
|
+
end
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
#### Using the list_organization_members_with_http_info variant
|
|
362
|
+
|
|
363
|
+
This returns an Array which contains the response data, status code and headers.
|
|
364
|
+
|
|
365
|
+
> <Array(<OrganizationMembersListResponse>, Integer, Hash)> list_organization_members_with_http_info(id, opts)
|
|
366
|
+
|
|
367
|
+
```ruby
|
|
368
|
+
begin
|
|
369
|
+
# List organization members
|
|
370
|
+
data, status_code, headers = api_instance.list_organization_members_with_http_info(id, opts)
|
|
371
|
+
p status_code # => 2xx
|
|
372
|
+
p headers # => { ... }
|
|
373
|
+
p data # => <OrganizationMembersListResponse>
|
|
374
|
+
rescue Zyphr::ApiError => e
|
|
375
|
+
puts "Error when calling AuthOrganizationsApi->list_organization_members_with_http_info: #{e}"
|
|
376
|
+
end
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
### Parameters
|
|
380
|
+
|
|
381
|
+
| Name | Type | Description | Notes |
|
|
382
|
+
| ---- | ---- | ----------- | ----- |
|
|
383
|
+
| **id** | **String** | | |
|
|
384
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
385
|
+
| **cursor** | **String** | | [optional] |
|
|
386
|
+
|
|
387
|
+
### Return type
|
|
388
|
+
|
|
389
|
+
[**OrganizationMembersListResponse**](OrganizationMembersListResponse.md)
|
|
390
|
+
|
|
391
|
+
### Authorization
|
|
392
|
+
|
|
393
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
394
|
+
|
|
395
|
+
### HTTP request headers
|
|
396
|
+
|
|
397
|
+
- **Content-Type**: Not defined
|
|
398
|
+
- **Accept**: application/json
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
## list_organizations
|
|
402
|
+
|
|
403
|
+
> <OrganizationListResponse> list_organizations(opts)
|
|
404
|
+
|
|
405
|
+
List organizations
|
|
406
|
+
|
|
407
|
+
List organizations in the current environment. Cursor-paginated.
|
|
408
|
+
|
|
409
|
+
### Examples
|
|
410
|
+
|
|
411
|
+
```ruby
|
|
412
|
+
require 'time'
|
|
413
|
+
require 'zyphr'
|
|
414
|
+
# setup authorization
|
|
415
|
+
Zyphr.configure do |config|
|
|
416
|
+
# Configure API key authorization: ApplicationSecret
|
|
417
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
418
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
419
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
420
|
+
|
|
421
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
422
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
423
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
424
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
428
|
+
opts = {
|
|
429
|
+
limit: 56, # Integer |
|
|
430
|
+
cursor: 'cursor_example', # String |
|
|
431
|
+
search: 'search_example' # String | ILIKE match on name OR slug
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
begin
|
|
435
|
+
# List organizations
|
|
436
|
+
result = api_instance.list_organizations(opts)
|
|
437
|
+
p result
|
|
438
|
+
rescue Zyphr::ApiError => e
|
|
439
|
+
puts "Error when calling AuthOrganizationsApi->list_organizations: #{e}"
|
|
440
|
+
end
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
#### Using the list_organizations_with_http_info variant
|
|
444
|
+
|
|
445
|
+
This returns an Array which contains the response data, status code and headers.
|
|
446
|
+
|
|
447
|
+
> <Array(<OrganizationListResponse>, Integer, Hash)> list_organizations_with_http_info(opts)
|
|
448
|
+
|
|
449
|
+
```ruby
|
|
450
|
+
begin
|
|
451
|
+
# List organizations
|
|
452
|
+
data, status_code, headers = api_instance.list_organizations_with_http_info(opts)
|
|
453
|
+
p status_code # => 2xx
|
|
454
|
+
p headers # => { ... }
|
|
455
|
+
p data # => <OrganizationListResponse>
|
|
456
|
+
rescue Zyphr::ApiError => e
|
|
457
|
+
puts "Error when calling AuthOrganizationsApi->list_organizations_with_http_info: #{e}"
|
|
458
|
+
end
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
### Parameters
|
|
462
|
+
|
|
463
|
+
| Name | Type | Description | Notes |
|
|
464
|
+
| ---- | ---- | ----------- | ----- |
|
|
465
|
+
| **limit** | **Integer** | | [optional][default to 50] |
|
|
466
|
+
| **cursor** | **String** | | [optional] |
|
|
467
|
+
| **search** | **String** | ILIKE match on name OR slug | [optional] |
|
|
468
|
+
|
|
469
|
+
### Return type
|
|
470
|
+
|
|
471
|
+
[**OrganizationListResponse**](OrganizationListResponse.md)
|
|
472
|
+
|
|
473
|
+
### Authorization
|
|
474
|
+
|
|
475
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
476
|
+
|
|
477
|
+
### HTTP request headers
|
|
478
|
+
|
|
479
|
+
- **Content-Type**: Not defined
|
|
480
|
+
- **Accept**: application/json
|
|
481
|
+
|
|
482
|
+
|
|
483
|
+
## list_organizations_for_end_user
|
|
484
|
+
|
|
485
|
+
> <OrganizationListResponse> list_organizations_for_end_user(user_id)
|
|
486
|
+
|
|
487
|
+
List organizations an end user belongs to
|
|
488
|
+
|
|
489
|
+
Inverse of the membership list — returns all orgs the user is a member of within the current environment. Use this when the orgs[] JWT claim is omitted because the user belongs to more than 50.
|
|
490
|
+
|
|
491
|
+
### Examples
|
|
492
|
+
|
|
493
|
+
```ruby
|
|
494
|
+
require 'time'
|
|
495
|
+
require 'zyphr'
|
|
496
|
+
# setup authorization
|
|
497
|
+
Zyphr.configure do |config|
|
|
498
|
+
# Configure API key authorization: ApplicationSecret
|
|
499
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
500
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
501
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
502
|
+
|
|
503
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
504
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
505
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
506
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
507
|
+
end
|
|
508
|
+
|
|
509
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
510
|
+
user_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
511
|
+
|
|
512
|
+
begin
|
|
513
|
+
# List organizations an end user belongs to
|
|
514
|
+
result = api_instance.list_organizations_for_end_user(user_id)
|
|
515
|
+
p result
|
|
516
|
+
rescue Zyphr::ApiError => e
|
|
517
|
+
puts "Error when calling AuthOrganizationsApi->list_organizations_for_end_user: #{e}"
|
|
518
|
+
end
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
#### Using the list_organizations_for_end_user_with_http_info variant
|
|
522
|
+
|
|
523
|
+
This returns an Array which contains the response data, status code and headers.
|
|
524
|
+
|
|
525
|
+
> <Array(<OrganizationListResponse>, Integer, Hash)> list_organizations_for_end_user_with_http_info(user_id)
|
|
526
|
+
|
|
527
|
+
```ruby
|
|
528
|
+
begin
|
|
529
|
+
# List organizations an end user belongs to
|
|
530
|
+
data, status_code, headers = api_instance.list_organizations_for_end_user_with_http_info(user_id)
|
|
531
|
+
p status_code # => 2xx
|
|
532
|
+
p headers # => { ... }
|
|
533
|
+
p data # => <OrganizationListResponse>
|
|
534
|
+
rescue Zyphr::ApiError => e
|
|
535
|
+
puts "Error when calling AuthOrganizationsApi->list_organizations_for_end_user_with_http_info: #{e}"
|
|
536
|
+
end
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
### Parameters
|
|
540
|
+
|
|
541
|
+
| Name | Type | Description | Notes |
|
|
542
|
+
| ---- | ---- | ----------- | ----- |
|
|
543
|
+
| **user_id** | **String** | | |
|
|
544
|
+
|
|
545
|
+
### Return type
|
|
546
|
+
|
|
547
|
+
[**OrganizationListResponse**](OrganizationListResponse.md)
|
|
548
|
+
|
|
549
|
+
### Authorization
|
|
550
|
+
|
|
551
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
552
|
+
|
|
553
|
+
### HTTP request headers
|
|
554
|
+
|
|
555
|
+
- **Content-Type**: Not defined
|
|
556
|
+
- **Accept**: application/json
|
|
557
|
+
|
|
558
|
+
|
|
559
|
+
## remove_organization_member
|
|
560
|
+
|
|
561
|
+
> remove_organization_member(id, user_id)
|
|
562
|
+
|
|
563
|
+
Remove a member from an organization
|
|
564
|
+
|
|
565
|
+
### Examples
|
|
566
|
+
|
|
567
|
+
```ruby
|
|
568
|
+
require 'time'
|
|
569
|
+
require 'zyphr'
|
|
570
|
+
# setup authorization
|
|
571
|
+
Zyphr.configure do |config|
|
|
572
|
+
# Configure API key authorization: ApplicationSecret
|
|
573
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
574
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
575
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
576
|
+
|
|
577
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
578
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
579
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
580
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
581
|
+
end
|
|
582
|
+
|
|
583
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
584
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
585
|
+
user_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
586
|
+
|
|
587
|
+
begin
|
|
588
|
+
# Remove a member from an organization
|
|
589
|
+
api_instance.remove_organization_member(id, user_id)
|
|
590
|
+
rescue Zyphr::ApiError => e
|
|
591
|
+
puts "Error when calling AuthOrganizationsApi->remove_organization_member: #{e}"
|
|
592
|
+
end
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
#### Using the remove_organization_member_with_http_info variant
|
|
596
|
+
|
|
597
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
598
|
+
|
|
599
|
+
> <Array(nil, Integer, Hash)> remove_organization_member_with_http_info(id, user_id)
|
|
600
|
+
|
|
601
|
+
```ruby
|
|
602
|
+
begin
|
|
603
|
+
# Remove a member from an organization
|
|
604
|
+
data, status_code, headers = api_instance.remove_organization_member_with_http_info(id, user_id)
|
|
605
|
+
p status_code # => 2xx
|
|
606
|
+
p headers # => { ... }
|
|
607
|
+
p data # => nil
|
|
608
|
+
rescue Zyphr::ApiError => e
|
|
609
|
+
puts "Error when calling AuthOrganizationsApi->remove_organization_member_with_http_info: #{e}"
|
|
610
|
+
end
|
|
611
|
+
```
|
|
612
|
+
|
|
613
|
+
### Parameters
|
|
614
|
+
|
|
615
|
+
| Name | Type | Description | Notes |
|
|
616
|
+
| ---- | ---- | ----------- | ----- |
|
|
617
|
+
| **id** | **String** | | |
|
|
618
|
+
| **user_id** | **String** | | |
|
|
619
|
+
|
|
620
|
+
### Return type
|
|
621
|
+
|
|
622
|
+
nil (empty response body)
|
|
623
|
+
|
|
624
|
+
### Authorization
|
|
625
|
+
|
|
626
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
627
|
+
|
|
628
|
+
### HTTP request headers
|
|
629
|
+
|
|
630
|
+
- **Content-Type**: Not defined
|
|
631
|
+
- **Accept**: Not defined
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
## switch_organization
|
|
635
|
+
|
|
636
|
+
> <SwitchOrganizationResponse> switch_organization(switch_organization_request)
|
|
637
|
+
|
|
638
|
+
Switch the active organization on a session
|
|
639
|
+
|
|
640
|
+
Takes a valid refresh token + a target organization the user is a member of, verifies membership at mint time, revokes the old session, and mints a fresh access + refresh pair with `org_id` set to the target. The old refresh token is invalidated (jti rotated). Use this when the user's active workspace changes (the Slack/Linear workspace-switch pattern).
|
|
641
|
+
|
|
642
|
+
### Examples
|
|
643
|
+
|
|
644
|
+
```ruby
|
|
645
|
+
require 'time'
|
|
646
|
+
require 'zyphr'
|
|
647
|
+
# setup authorization
|
|
648
|
+
Zyphr.configure do |config|
|
|
649
|
+
# Configure API key authorization: ApplicationSecret
|
|
650
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
651
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
652
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
653
|
+
|
|
654
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
655
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
656
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
657
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
658
|
+
end
|
|
659
|
+
|
|
660
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
661
|
+
switch_organization_request = Zyphr::SwitchOrganizationRequest.new({refresh_token: 'refresh_token_example', organization_id: 'organization_id_example'}) # SwitchOrganizationRequest |
|
|
662
|
+
|
|
663
|
+
begin
|
|
664
|
+
# Switch the active organization on a session
|
|
665
|
+
result = api_instance.switch_organization(switch_organization_request)
|
|
666
|
+
p result
|
|
667
|
+
rescue Zyphr::ApiError => e
|
|
668
|
+
puts "Error when calling AuthOrganizationsApi->switch_organization: #{e}"
|
|
669
|
+
end
|
|
670
|
+
```
|
|
671
|
+
|
|
672
|
+
#### Using the switch_organization_with_http_info variant
|
|
673
|
+
|
|
674
|
+
This returns an Array which contains the response data, status code and headers.
|
|
675
|
+
|
|
676
|
+
> <Array(<SwitchOrganizationResponse>, Integer, Hash)> switch_organization_with_http_info(switch_organization_request)
|
|
677
|
+
|
|
678
|
+
```ruby
|
|
679
|
+
begin
|
|
680
|
+
# Switch the active organization on a session
|
|
681
|
+
data, status_code, headers = api_instance.switch_organization_with_http_info(switch_organization_request)
|
|
682
|
+
p status_code # => 2xx
|
|
683
|
+
p headers # => { ... }
|
|
684
|
+
p data # => <SwitchOrganizationResponse>
|
|
685
|
+
rescue Zyphr::ApiError => e
|
|
686
|
+
puts "Error when calling AuthOrganizationsApi->switch_organization_with_http_info: #{e}"
|
|
687
|
+
end
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
### Parameters
|
|
691
|
+
|
|
692
|
+
| Name | Type | Description | Notes |
|
|
693
|
+
| ---- | ---- | ----------- | ----- |
|
|
694
|
+
| **switch_organization_request** | [**SwitchOrganizationRequest**](SwitchOrganizationRequest.md) | | |
|
|
695
|
+
|
|
696
|
+
### Return type
|
|
697
|
+
|
|
698
|
+
[**SwitchOrganizationResponse**](SwitchOrganizationResponse.md)
|
|
699
|
+
|
|
700
|
+
### Authorization
|
|
701
|
+
|
|
702
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
703
|
+
|
|
704
|
+
### HTTP request headers
|
|
705
|
+
|
|
706
|
+
- **Content-Type**: application/json
|
|
707
|
+
- **Accept**: application/json
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
## update_organization
|
|
711
|
+
|
|
712
|
+
> <OrganizationResponse> update_organization(id, update_organization_request)
|
|
713
|
+
|
|
714
|
+
Update an organization
|
|
715
|
+
|
|
716
|
+
The Default organization cannot be renamed or have its slug/metadata changed.
|
|
717
|
+
|
|
718
|
+
### Examples
|
|
719
|
+
|
|
720
|
+
```ruby
|
|
721
|
+
require 'time'
|
|
722
|
+
require 'zyphr'
|
|
723
|
+
# setup authorization
|
|
724
|
+
Zyphr.configure do |config|
|
|
725
|
+
# Configure API key authorization: ApplicationSecret
|
|
726
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
727
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
728
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
729
|
+
|
|
730
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
731
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
732
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
733
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
734
|
+
end
|
|
735
|
+
|
|
736
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
737
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
738
|
+
update_organization_request = Zyphr::UpdateOrganizationRequest.new # UpdateOrganizationRequest |
|
|
739
|
+
|
|
740
|
+
begin
|
|
741
|
+
# Update an organization
|
|
742
|
+
result = api_instance.update_organization(id, update_organization_request)
|
|
743
|
+
p result
|
|
744
|
+
rescue Zyphr::ApiError => e
|
|
745
|
+
puts "Error when calling AuthOrganizationsApi->update_organization: #{e}"
|
|
746
|
+
end
|
|
747
|
+
```
|
|
748
|
+
|
|
749
|
+
#### Using the update_organization_with_http_info variant
|
|
750
|
+
|
|
751
|
+
This returns an Array which contains the response data, status code and headers.
|
|
752
|
+
|
|
753
|
+
> <Array(<OrganizationResponse>, Integer, Hash)> update_organization_with_http_info(id, update_organization_request)
|
|
754
|
+
|
|
755
|
+
```ruby
|
|
756
|
+
begin
|
|
757
|
+
# Update an organization
|
|
758
|
+
data, status_code, headers = api_instance.update_organization_with_http_info(id, update_organization_request)
|
|
759
|
+
p status_code # => 2xx
|
|
760
|
+
p headers # => { ... }
|
|
761
|
+
p data # => <OrganizationResponse>
|
|
762
|
+
rescue Zyphr::ApiError => e
|
|
763
|
+
puts "Error when calling AuthOrganizationsApi->update_organization_with_http_info: #{e}"
|
|
764
|
+
end
|
|
765
|
+
```
|
|
766
|
+
|
|
767
|
+
### Parameters
|
|
768
|
+
|
|
769
|
+
| Name | Type | Description | Notes |
|
|
770
|
+
| ---- | ---- | ----------- | ----- |
|
|
771
|
+
| **id** | **String** | | |
|
|
772
|
+
| **update_organization_request** | [**UpdateOrganizationRequest**](UpdateOrganizationRequest.md) | | |
|
|
773
|
+
|
|
774
|
+
### Return type
|
|
775
|
+
|
|
776
|
+
[**OrganizationResponse**](OrganizationResponse.md)
|
|
777
|
+
|
|
778
|
+
### Authorization
|
|
779
|
+
|
|
780
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
781
|
+
|
|
782
|
+
### HTTP request headers
|
|
783
|
+
|
|
784
|
+
- **Content-Type**: application/json
|
|
785
|
+
- **Accept**: application/json
|
|
786
|
+
|
|
787
|
+
|
|
788
|
+
## update_organization_member_role
|
|
789
|
+
|
|
790
|
+
> <OrganizationMembershipResponse> update_organization_member_role(id, user_id, update_organization_member_role_request)
|
|
791
|
+
|
|
792
|
+
Update a member's role
|
|
793
|
+
|
|
794
|
+
### Examples
|
|
795
|
+
|
|
796
|
+
```ruby
|
|
797
|
+
require 'time'
|
|
798
|
+
require 'zyphr'
|
|
799
|
+
# setup authorization
|
|
800
|
+
Zyphr.configure do |config|
|
|
801
|
+
# Configure API key authorization: ApplicationSecret
|
|
802
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
803
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
804
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
805
|
+
|
|
806
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
807
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
808
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
809
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
810
|
+
end
|
|
811
|
+
|
|
812
|
+
api_instance = Zyphr::AuthOrganizationsApi.new
|
|
813
|
+
id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
814
|
+
user_id = '38400000-8cf0-11bd-b23e-10b96e4ef00d' # String |
|
|
815
|
+
update_organization_member_role_request = Zyphr::UpdateOrganizationMemberRoleRequest.new({role: 'role_example'}) # UpdateOrganizationMemberRoleRequest |
|
|
816
|
+
|
|
817
|
+
begin
|
|
818
|
+
# Update a member's role
|
|
819
|
+
result = api_instance.update_organization_member_role(id, user_id, update_organization_member_role_request)
|
|
820
|
+
p result
|
|
821
|
+
rescue Zyphr::ApiError => e
|
|
822
|
+
puts "Error when calling AuthOrganizationsApi->update_organization_member_role: #{e}"
|
|
823
|
+
end
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
#### Using the update_organization_member_role_with_http_info variant
|
|
827
|
+
|
|
828
|
+
This returns an Array which contains the response data, status code and headers.
|
|
829
|
+
|
|
830
|
+
> <Array(<OrganizationMembershipResponse>, Integer, Hash)> update_organization_member_role_with_http_info(id, user_id, update_organization_member_role_request)
|
|
831
|
+
|
|
832
|
+
```ruby
|
|
833
|
+
begin
|
|
834
|
+
# Update a member's role
|
|
835
|
+
data, status_code, headers = api_instance.update_organization_member_role_with_http_info(id, user_id, update_organization_member_role_request)
|
|
836
|
+
p status_code # => 2xx
|
|
837
|
+
p headers # => { ... }
|
|
838
|
+
p data # => <OrganizationMembershipResponse>
|
|
839
|
+
rescue Zyphr::ApiError => e
|
|
840
|
+
puts "Error when calling AuthOrganizationsApi->update_organization_member_role_with_http_info: #{e}"
|
|
841
|
+
end
|
|
842
|
+
```
|
|
843
|
+
|
|
844
|
+
### Parameters
|
|
845
|
+
|
|
846
|
+
| Name | Type | Description | Notes |
|
|
847
|
+
| ---- | ---- | ----------- | ----- |
|
|
848
|
+
| **id** | **String** | | |
|
|
849
|
+
| **user_id** | **String** | | |
|
|
850
|
+
| **update_organization_member_role_request** | [**UpdateOrganizationMemberRoleRequest**](UpdateOrganizationMemberRoleRequest.md) | | |
|
|
851
|
+
|
|
852
|
+
### Return type
|
|
853
|
+
|
|
854
|
+
[**OrganizationMembershipResponse**](OrganizationMembershipResponse.md)
|
|
855
|
+
|
|
856
|
+
### Authorization
|
|
857
|
+
|
|
858
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
859
|
+
|
|
860
|
+
### HTTP request headers
|
|
861
|
+
|
|
862
|
+
- **Content-Type**: application/json
|
|
863
|
+
- **Accept**: application/json
|
|
864
|
+
|