directus_sdk 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (174) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +185 -0
  4. data/Rakefile +8 -0
  5. data/directus_sdk.gemspec +46 -0
  6. data/docs/ActivityApi.md +59 -0
  7. data/docs/BookmarksApi.md +290 -0
  8. data/docs/FilesApi.md +277 -0
  9. data/docs/GetActivity.md +9 -0
  10. data/docs/GetActivityData.md +16 -0
  11. data/docs/GetActivityMeta.md +10 -0
  12. data/docs/GetBookmark.md +9 -0
  13. data/docs/GetBookmarks.md +9 -0
  14. data/docs/GetBookmarksData.md +14 -0
  15. data/docs/GetBookmarksMeta.md +14 -0
  16. data/docs/GetFile.md +9 -0
  17. data/docs/GetFiles.md +9 -0
  18. data/docs/GetFilesData.md +24 -0
  19. data/docs/GetGroup.md +9 -0
  20. data/docs/GetGroups.md +9 -0
  21. data/docs/GetGroupsData.md +9 -0
  22. data/docs/GetGroupsDataData.md +16 -0
  23. data/docs/GetGroupsDataMeta.md +11 -0
  24. data/docs/GetMessage.md +9 -0
  25. data/docs/GetMessages.md +9 -0
  26. data/docs/GetMessagesData.md +18 -0
  27. data/docs/GetMessagesMeta.md +13 -0
  28. data/docs/GetMessagesResponses.md +8 -0
  29. data/docs/GetPreferences.md +9 -0
  30. data/docs/GetPreferencesData.md +16 -0
  31. data/docs/GetPrivileges.md +9 -0
  32. data/docs/GetPrivilegesData.md +19 -0
  33. data/docs/GetPrivilegesForTable.md +9 -0
  34. data/docs/GetSettings.md +9 -0
  35. data/docs/GetSettingsData.md +9 -0
  36. data/docs/GetSettingsDataFiles.md +13 -0
  37. data/docs/GetSettingsDataGlobal.md +13 -0
  38. data/docs/GetSettingsFor.md +9 -0
  39. data/docs/GetSettingsForMeta.md +10 -0
  40. data/docs/GetTable.md +9 -0
  41. data/docs/GetTableColumn.md +9 -0
  42. data/docs/GetTableColumnData.md +23 -0
  43. data/docs/GetTableColumns.md +9 -0
  44. data/docs/GetTableColumnsData.md +27 -0
  45. data/docs/GetTableData.md +29 -0
  46. data/docs/GetTableRow.md +9 -0
  47. data/docs/GetTableRows.md +9 -0
  48. data/docs/GetTableRowsData.md +9 -0
  49. data/docs/GetTableRowsMeta.md +14 -0
  50. data/docs/GetTables.md +9 -0
  51. data/docs/GetTablesData.md +8 -0
  52. data/docs/GetTablesMeta.md +9 -0
  53. data/docs/GroupsApi.md +455 -0
  54. data/docs/MessagesApi.md +116 -0
  55. data/docs/PreferencesApi.md +135 -0
  56. data/docs/SettingsApi.md +175 -0
  57. data/docs/TablesApi.md +873 -0
  58. data/docs/UtilsApi.md +126 -0
  59. data/git_push.sh +55 -0
  60. data/lib/directus_sdk.rb +92 -0
  61. data/lib/directus_sdk/api/activity_api.rb +70 -0
  62. data/lib/directus_sdk/api/bookmarks_api.rb +288 -0
  63. data/lib/directus_sdk/api/files_api.rb +297 -0
  64. data/lib/directus_sdk/api/groups_api.rb +469 -0
  65. data/lib/directus_sdk/api/messages_api.rb +123 -0
  66. data/lib/directus_sdk/api/preferences_api.rb +151 -0
  67. data/lib/directus_sdk/api/settings_api.rb +183 -0
  68. data/lib/directus_sdk/api/tables_api.rb +890 -0
  69. data/lib/directus_sdk/api/utils_api.rb +134 -0
  70. data/lib/directus_sdk/api_client.rb +389 -0
  71. data/lib/directus_sdk/api_error.rb +38 -0
  72. data/lib/directus_sdk/configuration.rb +209 -0
  73. data/lib/directus_sdk/models/get_activity.rb +199 -0
  74. data/lib/directus_sdk/models/get_activity_data.rb +260 -0
  75. data/lib/directus_sdk/models/get_activity_meta.rb +206 -0
  76. data/lib/directus_sdk/models/get_bookmark.rb +197 -0
  77. data/lib/directus_sdk/models/get_bookmarks.rb +199 -0
  78. data/lib/directus_sdk/models/get_bookmarks_data.rb +242 -0
  79. data/lib/directus_sdk/models/get_bookmarks_meta.rb +252 -0
  80. data/lib/directus_sdk/models/get_file.rb +197 -0
  81. data/lib/directus_sdk/models/get_files.rb +199 -0
  82. data/lib/directus_sdk/models/get_files_data.rb +332 -0
  83. data/lib/directus_sdk/models/get_group.rb +197 -0
  84. data/lib/directus_sdk/models/get_groups.rb +197 -0
  85. data/lib/directus_sdk/models/get_groups_data.rb +199 -0
  86. data/lib/directus_sdk/models/get_groups_data_data.rb +260 -0
  87. data/lib/directus_sdk/models/get_groups_data_meta.rb +215 -0
  88. data/lib/directus_sdk/models/get_message.rb +197 -0
  89. data/lib/directus_sdk/models/get_messages.rb +199 -0
  90. data/lib/directus_sdk/models/get_messages_data.rb +278 -0
  91. data/lib/directus_sdk/models/get_messages_meta.rb +233 -0
  92. data/lib/directus_sdk/models/get_messages_responses.rb +190 -0
  93. data/lib/directus_sdk/models/get_preferences.rb +197 -0
  94. data/lib/directus_sdk/models/get_preferences_data.rb +260 -0
  95. data/lib/directus_sdk/models/get_privileges.rb +199 -0
  96. data/lib/directus_sdk/models/get_privileges_data.rb +287 -0
  97. data/lib/directus_sdk/models/get_privileges_for_table.rb +197 -0
  98. data/lib/directus_sdk/models/get_settings.rb +197 -0
  99. data/lib/directus_sdk/models/get_settings_data.rb +197 -0
  100. data/lib/directus_sdk/models/get_settings_data_files.rb +233 -0
  101. data/lib/directus_sdk/models/get_settings_data_global.rb +233 -0
  102. data/lib/directus_sdk/models/get_settings_for.rb +197 -0
  103. data/lib/directus_sdk/models/get_settings_for_meta.rb +206 -0
  104. data/lib/directus_sdk/models/get_table.rb +197 -0
  105. data/lib/directus_sdk/models/get_table_column.rb +197 -0
  106. data/lib/directus_sdk/models/get_table_column_data.rb +325 -0
  107. data/lib/directus_sdk/models/get_table_columns.rb +199 -0
  108. data/lib/directus_sdk/models/get_table_columns_data.rb +363 -0
  109. data/lib/directus_sdk/models/get_table_data.rb +379 -0
  110. data/lib/directus_sdk/models/get_table_row.rb +197 -0
  111. data/lib/directus_sdk/models/get_table_rows.rb +199 -0
  112. data/lib/directus_sdk/models/get_table_rows_data.rb +197 -0
  113. data/lib/directus_sdk/models/get_table_rows_meta.rb +242 -0
  114. data/lib/directus_sdk/models/get_tables.rb +199 -0
  115. data/lib/directus_sdk/models/get_tables_data.rb +188 -0
  116. data/lib/directus_sdk/models/get_tables_meta.rb +197 -0
  117. data/lib/directus_sdk/version.rb +15 -0
  118. data/spec/api/activity_api_spec.rb +46 -0
  119. data/spec/api/bookmarks_api_spec.rb +98 -0
  120. data/spec/api/files_api_spec.rb +105 -0
  121. data/spec/api/groups_api_spec.rb +143 -0
  122. data/spec/api/messages_api_spec.rb +58 -0
  123. data/spec/api/preferences_api_spec.rb +65 -0
  124. data/spec/api/settings_api_spec.rb +71 -0
  125. data/spec/api/tables_api_spec.rb +236 -0
  126. data/spec/api/utils_api_spec.rb +61 -0
  127. data/spec/api_client_spec.rb +226 -0
  128. data/spec/configuration_spec.rb +42 -0
  129. data/spec/models/get_activity_data_spec.rb +90 -0
  130. data/spec/models/get_activity_meta_spec.rb +54 -0
  131. data/spec/models/get_activity_spec.rb +48 -0
  132. data/spec/models/get_bookmark_spec.rb +48 -0
  133. data/spec/models/get_bookmarks_data_spec.rb +78 -0
  134. data/spec/models/get_bookmarks_meta_spec.rb +78 -0
  135. data/spec/models/get_bookmarks_spec.rb +48 -0
  136. data/spec/models/get_file_spec.rb +48 -0
  137. data/spec/models/get_files_data_spec.rb +138 -0
  138. data/spec/models/get_files_spec.rb +48 -0
  139. data/spec/models/get_group_spec.rb +48 -0
  140. data/spec/models/get_groups_data_data_spec.rb +90 -0
  141. data/spec/models/get_groups_data_meta_spec.rb +60 -0
  142. data/spec/models/get_groups_data_spec.rb +48 -0
  143. data/spec/models/get_groups_spec.rb +48 -0
  144. data/spec/models/get_message_spec.rb +48 -0
  145. data/spec/models/get_messages_data_spec.rb +102 -0
  146. data/spec/models/get_messages_meta_spec.rb +72 -0
  147. data/spec/models/get_messages_responses_spec.rb +42 -0
  148. data/spec/models/get_messages_spec.rb +48 -0
  149. data/spec/models/get_preferences_data_spec.rb +90 -0
  150. data/spec/models/get_preferences_spec.rb +48 -0
  151. data/spec/models/get_privileges_data_spec.rb +108 -0
  152. data/spec/models/get_privileges_for_table_spec.rb +48 -0
  153. data/spec/models/get_privileges_spec.rb +48 -0
  154. data/spec/models/get_settings_data_files_spec.rb +72 -0
  155. data/spec/models/get_settings_data_global_spec.rb +72 -0
  156. data/spec/models/get_settings_data_spec.rb +48 -0
  157. data/spec/models/get_settings_for_meta_spec.rb +54 -0
  158. data/spec/models/get_settings_for_spec.rb +48 -0
  159. data/spec/models/get_settings_spec.rb +48 -0
  160. data/spec/models/get_table_column_data_spec.rb +132 -0
  161. data/spec/models/get_table_column_spec.rb +48 -0
  162. data/spec/models/get_table_columns_data_spec.rb +156 -0
  163. data/spec/models/get_table_columns_spec.rb +48 -0
  164. data/spec/models/get_table_data_spec.rb +168 -0
  165. data/spec/models/get_table_row_spec.rb +48 -0
  166. data/spec/models/get_table_rows_data_spec.rb +48 -0
  167. data/spec/models/get_table_rows_meta_spec.rb +78 -0
  168. data/spec/models/get_table_rows_spec.rb +48 -0
  169. data/spec/models/get_table_spec.rb +48 -0
  170. data/spec/models/get_tables_data_spec.rb +42 -0
  171. data/spec/models/get_tables_meta_spec.rb +48 -0
  172. data/spec/models/get_tables_spec.rb +48 -0
  173. data/spec/spec_helper.rb +111 -0
  174. metadata +451 -0
data/docs/GroupsApi.md ADDED
@@ -0,0 +1,455 @@
1
+ # DirectusSDK::GroupsApi
2
+
3
+ All URIs are relative to *https://myinstance.directus.io/api/1.1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**add_group**](GroupsApi.md#add_group) | **POST** /groups | Add a new group
8
+ [**add_privilege**](GroupsApi.md#add_privilege) | **POST** /privileges/{groupId} | Create new table privileges for the specified user group
9
+ [**get_group**](GroupsApi.md#get_group) | **GET** /groups/{groupId} | Returns specific group
10
+ [**get_groups**](GroupsApi.md#get_groups) | **GET** /groups | Returns groups
11
+ [**get_privileges**](GroupsApi.md#get_privileges) | **GET** /privileges/{groupId} | Returns group privileges
12
+ [**get_privileges_for_table**](GroupsApi.md#get_privileges_for_table) | **GET** /privileges/{groupId}/{tableNameOrPrivilegeId} | Returns group privileges by tableName
13
+ [**update_privileges**](GroupsApi.md#update_privileges) | **PUT** /privileges/{groupId}/{tableNameOrPrivilegeId} | Update privileges by privilegeId
14
+
15
+
16
+ # **add_group**
17
+ > add_group(opts)
18
+
19
+ Add a new group
20
+
21
+ ### Example
22
+ ```ruby
23
+ # load the gem
24
+ require 'directus_sdk'
25
+ # setup authorization
26
+ DirectusSDK.configure do |config|
27
+ # Configure API key authorization: api_key
28
+ config.api_key['access_token'] = 'YOUR API KEY'
29
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
30
+ #config.api_key_prefix['access_token'] = 'Bearer'
31
+ # Configure your host
32
+ config.host = "myinstance.directus.io"
33
+ # Enable or disable debugging output
34
+ config.debugging = false
35
+ end
36
+
37
+ api_instance = DirectusSDK::GroupsApi.new
38
+
39
+ opts = {
40
+ name: "name_example" # String | Name of group to add
41
+ }
42
+
43
+ begin
44
+ #Add a new group
45
+ api_instance.add_group(opts)
46
+ rescue DirectusSDK::ApiError => e
47
+ puts "Exception when calling GroupsApi->add_group: #{e}"
48
+ end
49
+ ```
50
+
51
+ ### Parameters
52
+
53
+ Name | Type | Description | Notes
54
+ ------------- | ------------- | ------------- | -------------
55
+ **name** | **String**| Name of group to add | [optional]
56
+
57
+ ### Return type
58
+
59
+ nil (empty response body)
60
+
61
+ ### Authorization
62
+
63
+ [api_key](../README.md#api_key)
64
+
65
+ ### HTTP request headers
66
+
67
+ - **Content-Type**: application/x-www-form-urlencoded
68
+ - **Accept**: application/json
69
+
70
+
71
+
72
+ # **add_privilege**
73
+ > add_privilege(group_id, , opts)
74
+
75
+ Create new table privileges for the specified user group
76
+
77
+ ### Example
78
+ ```ruby
79
+ # load the gem
80
+ require 'directus_sdk'
81
+ # setup authorization
82
+ DirectusSDK.configure do |config|
83
+ # Configure API key authorization: api_key
84
+ config.api_key['access_token'] = 'YOUR API KEY'
85
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
86
+ #config.api_key_prefix['access_token'] = 'Bearer'
87
+ # Configure your host
88
+ config.host = "myinstance.directus.io"
89
+ # Enable or disable debugging output
90
+ config.debugging = false
91
+ end
92
+
93
+ api_instance = DirectusSDK::GroupsApi.new
94
+
95
+ group_id = "group_id_example" # String | ID of group to return
96
+
97
+ opts = {
98
+ id: 56, # Integer | Privilege's Unique Identification number
99
+ table_name: "table_name_example", # String | Name of table to add
100
+ allow_add: 56, # Integer | Permission to add/create entries in the table (See values below)
101
+ allow_edit: 56, # Integer | Permission to edit/update entries in the table (See values below)
102
+ allow_delete: 56, # Integer | Permission to delete/remove entries in the table (See values below)
103
+ allow_view: 56, # Integer | Permission to view/read entries in the table (See values below)
104
+ allow_alter: 56, # Integer | Permission to add/create entries in the table (See values below)
105
+ nav_listed: true, # BOOLEAN | If the table should be visible in the sidebar for this user group
106
+ read_field_blacklist: "read_field_blacklist_example", # String | A CSV of column names that the group can't view (read)
107
+ write_field_blacklist: "write_field_blacklist_example", # String | A CSV of column names that the group can't edit (update)
108
+ status_id: "status_id_example" # String | State of the record that this permissions belongs to (Draft, Active or Soft Deleted)
109
+ }
110
+
111
+ begin
112
+ #Create new table privileges for the specified user group
113
+ api_instance.add_privilege(group_id, , opts)
114
+ rescue DirectusSDK::ApiError => e
115
+ puts "Exception when calling GroupsApi->add_privilege: #{e}"
116
+ end
117
+ ```
118
+
119
+ ### Parameters
120
+
121
+ Name | Type | Description | Notes
122
+ ------------- | ------------- | ------------- | -------------
123
+ **group_id** | **String**| ID of group to return |
124
+ **id** | **Integer**| Privilege's Unique Identification number | [optional]
125
+ **table_name** | **String**| Name of table to add | [optional]
126
+ **allow_add** | **Integer**| Permission to add/create entries in the table (See values below) | [optional]
127
+ **allow_edit** | **Integer**| Permission to edit/update entries in the table (See values below) | [optional]
128
+ **allow_delete** | **Integer**| Permission to delete/remove entries in the table (See values below) | [optional]
129
+ **allow_view** | **Integer**| Permission to view/read entries in the table (See values below) | [optional]
130
+ **allow_alter** | **Integer**| Permission to add/create entries in the table (See values below) | [optional]
131
+ **nav_listed** | **BOOLEAN**| If the table should be visible in the sidebar for this user group | [optional]
132
+ **read_field_blacklist** | **String**| A CSV of column names that the group can't view (read) | [optional]
133
+ **write_field_blacklist** | **String**| A CSV of column names that the group can't edit (update) | [optional]
134
+ **status_id** | **String**| State of the record that this permissions belongs to (Draft, Active or Soft Deleted) | [optional]
135
+
136
+ ### Return type
137
+
138
+ nil (empty response body)
139
+
140
+ ### Authorization
141
+
142
+ [api_key](../README.md#api_key)
143
+
144
+ ### HTTP request headers
145
+
146
+ - **Content-Type**: application/x-www-form-urlencoded
147
+ - **Accept**: application/json
148
+
149
+
150
+
151
+ # **get_group**
152
+ > GetGroup get_group(group_id, )
153
+
154
+ Returns specific group
155
+
156
+ ### Example
157
+ ```ruby
158
+ # load the gem
159
+ require 'directus_sdk'
160
+ # setup authorization
161
+ DirectusSDK.configure do |config|
162
+ # Configure API key authorization: api_key
163
+ config.api_key['access_token'] = 'YOUR API KEY'
164
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
165
+ #config.api_key_prefix['access_token'] = 'Bearer'
166
+ # Configure your host
167
+ config.host = "myinstance.directus.io"
168
+ # Enable or disable debugging output
169
+ config.debugging = false
170
+ end
171
+
172
+ api_instance = DirectusSDK::GroupsApi.new
173
+
174
+ group_id = "group_id_example" # String | ID of group to return
175
+
176
+
177
+ begin
178
+ #Returns specific group
179
+ result = api_instance.get_group(group_id, )
180
+ p result
181
+ rescue DirectusSDK::ApiError => e
182
+ puts "Exception when calling GroupsApi->get_group: #{e}"
183
+ end
184
+ ```
185
+
186
+ ### Parameters
187
+
188
+ Name | Type | Description | Notes
189
+ ------------- | ------------- | ------------- | -------------
190
+ **group_id** | **String**| ID of group to return |
191
+
192
+ ### Return type
193
+
194
+ [**GetGroup**](GetGroup.md)
195
+
196
+ ### Authorization
197
+
198
+ [api_key](../README.md#api_key)
199
+
200
+ ### HTTP request headers
201
+
202
+ - **Content-Type**: Not defined
203
+ - **Accept**: application/json
204
+
205
+
206
+
207
+ # **get_groups**
208
+ > GetGroups get_groups
209
+
210
+ Returns groups
211
+
212
+ ### Example
213
+ ```ruby
214
+ # load the gem
215
+ require 'directus_sdk'
216
+ # setup authorization
217
+ DirectusSDK.configure do |config|
218
+ # Configure API key authorization: api_key
219
+ config.api_key['access_token'] = 'YOUR API KEY'
220
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
221
+ #config.api_key_prefix['access_token'] = 'Bearer'
222
+ # Configure your host
223
+ config.host = "myinstance.directus.io"
224
+ # Enable or disable debugging output
225
+ config.debugging = false
226
+ end
227
+
228
+ api_instance = DirectusSDK::GroupsApi.new
229
+
230
+ begin
231
+ #Returns groups
232
+ result = api_instance.get_groups
233
+ p result
234
+ rescue DirectusSDK::ApiError => e
235
+ puts "Exception when calling GroupsApi->get_groups: #{e}"
236
+ end
237
+ ```
238
+
239
+ ### Parameters
240
+ This endpoint does not need any parameter.
241
+
242
+ ### Return type
243
+
244
+ [**GetGroups**](GetGroups.md)
245
+
246
+ ### Authorization
247
+
248
+ [api_key](../README.md#api_key)
249
+
250
+ ### HTTP request headers
251
+
252
+ - **Content-Type**: Not defined
253
+ - **Accept**: application/json
254
+
255
+
256
+
257
+ # **get_privileges**
258
+ > GetPrivileges get_privileges(group_id, )
259
+
260
+ Returns group privileges
261
+
262
+ ### Example
263
+ ```ruby
264
+ # load the gem
265
+ require 'directus_sdk'
266
+ # setup authorization
267
+ DirectusSDK.configure do |config|
268
+ # Configure API key authorization: api_key
269
+ config.api_key['access_token'] = 'YOUR API KEY'
270
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
271
+ #config.api_key_prefix['access_token'] = 'Bearer'
272
+ # Configure your host
273
+ config.host = "myinstance.directus.io"
274
+ # Enable or disable debugging output
275
+ config.debugging = false
276
+ end
277
+
278
+ api_instance = DirectusSDK::GroupsApi.new
279
+
280
+ group_id = "group_id_example" # String | ID of group to return
281
+
282
+
283
+ begin
284
+ #Returns group privileges
285
+ result = api_instance.get_privileges(group_id, )
286
+ p result
287
+ rescue DirectusSDK::ApiError => e
288
+ puts "Exception when calling GroupsApi->get_privileges: #{e}"
289
+ end
290
+ ```
291
+
292
+ ### Parameters
293
+
294
+ Name | Type | Description | Notes
295
+ ------------- | ------------- | ------------- | -------------
296
+ **group_id** | **String**| ID of group to return |
297
+
298
+ ### Return type
299
+
300
+ [**GetPrivileges**](GetPrivileges.md)
301
+
302
+ ### Authorization
303
+
304
+ [api_key](../README.md#api_key)
305
+
306
+ ### HTTP request headers
307
+
308
+ - **Content-Type**: Not defined
309
+ - **Accept**: application/json
310
+
311
+
312
+
313
+ # **get_privileges_for_table**
314
+ > GetPrivilegesForTable get_privileges_for_table(group_id, table_name_or_privilege_id)
315
+
316
+ Returns group privileges by tableName
317
+
318
+ ### Example
319
+ ```ruby
320
+ # load the gem
321
+ require 'directus_sdk'
322
+ # setup authorization
323
+ DirectusSDK.configure do |config|
324
+ # Configure API key authorization: api_key
325
+ config.api_key['access_token'] = 'YOUR API KEY'
326
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
327
+ #config.api_key_prefix['access_token'] = 'Bearer'
328
+ # Configure your host
329
+ config.host = "myinstance.directus.io"
330
+ # Enable or disable debugging output
331
+ config.debugging = false
332
+ end
333
+
334
+ api_instance = DirectusSDK::GroupsApi.new
335
+
336
+ group_id = "group_id_example" # String | ID of group to return
337
+
338
+ table_name_or_privilege_id = "table_name_or_privilege_id_example" # String | ID of privileges or Table Name to use
339
+
340
+
341
+ begin
342
+ #Returns group privileges by tableName
343
+ result = api_instance.get_privileges_for_table(group_id, table_name_or_privilege_id)
344
+ p result
345
+ rescue DirectusSDK::ApiError => e
346
+ puts "Exception when calling GroupsApi->get_privileges_for_table: #{e}"
347
+ end
348
+ ```
349
+
350
+ ### Parameters
351
+
352
+ Name | Type | Description | Notes
353
+ ------------- | ------------- | ------------- | -------------
354
+ **group_id** | **String**| ID of group to return |
355
+ **table_name_or_privilege_id** | **String**| ID of privileges or Table Name to use |
356
+
357
+ ### Return type
358
+
359
+ [**GetPrivilegesForTable**](GetPrivilegesForTable.md)
360
+
361
+ ### Authorization
362
+
363
+ [api_key](../README.md#api_key)
364
+
365
+ ### HTTP request headers
366
+
367
+ - **Content-Type**: Not defined
368
+ - **Accept**: application/json
369
+
370
+
371
+
372
+ # **update_privileges**
373
+ > update_privileges(group_id, table_name_or_privilege_id, opts)
374
+
375
+ Update privileges by privilegeId
376
+
377
+ ### Example
378
+ ```ruby
379
+ # load the gem
380
+ require 'directus_sdk'
381
+ # setup authorization
382
+ DirectusSDK.configure do |config|
383
+ # Configure API key authorization: api_key
384
+ config.api_key['access_token'] = 'YOUR API KEY'
385
+ # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
386
+ #config.api_key_prefix['access_token'] = 'Bearer'
387
+ # Configure your host
388
+ config.host = "myinstance.directus.io"
389
+ # Enable or disable debugging output
390
+ config.debugging = false
391
+ end
392
+
393
+ api_instance = DirectusSDK::GroupsApi.new
394
+
395
+ group_id = "group_id_example" # String | ID of group to return
396
+
397
+ table_name_or_privilege_id = "table_name_or_privilege_id_example" # String | ID of privileges or Table Name to use
398
+
399
+ opts = {
400
+ privileges_id: "privileges_id_example", # String | ubique privilege ID
401
+ group_id2: "group_id_example", # String | ID of group to return
402
+ table_name: "table_name_example", # String | Name of table to add
403
+ allow_add: 56, # Integer | Permission to add/create entries in the table (See values below)
404
+ allow_edit: 56, # Integer | Permission to edit/update entries in the table (See values below)
405
+ allow_delete: 56, # Integer | Permission to delete/remove entries in the table (See values below)
406
+ allow_view: 56, # Integer | Permission to view/read entries in the table (See values below)
407
+ allow_alter: 56, # Integer | Permission to add/create entries in the table (See values below)
408
+ nav_listed: true, # BOOLEAN | If the table should be visible in the sidebar for this user group
409
+ read_field_blacklist: "read_field_blacklist_example", # String | A CSV of column names that the group can't view (read)
410
+ write_field_blacklist: "write_field_blacklist_example", # String | A CSV of column names that the group can't edit (update)
411
+ status_id: "status_id_example" # String | State of the record that this permissions belongs to (Draft, Active or Soft Deleted)
412
+ }
413
+
414
+ begin
415
+ #Update privileges by privilegeId
416
+ api_instance.update_privileges(group_id, table_name_or_privilege_id, opts)
417
+ rescue DirectusSDK::ApiError => e
418
+ puts "Exception when calling GroupsApi->update_privileges: #{e}"
419
+ end
420
+ ```
421
+
422
+ ### Parameters
423
+
424
+ Name | Type | Description | Notes
425
+ ------------- | ------------- | ------------- | -------------
426
+ **group_id** | **String**| ID of group to return |
427
+ **table_name_or_privilege_id** | **String**| ID of privileges or Table Name to use |
428
+ **privileges_id** | **String**| ubique privilege ID | [optional]
429
+ **group_id2** | **String**| ID of group to return | [optional]
430
+ **table_name** | **String**| Name of table to add | [optional]
431
+ **allow_add** | **Integer**| Permission to add/create entries in the table (See values below) | [optional]
432
+ **allow_edit** | **Integer**| Permission to edit/update entries in the table (See values below) | [optional]
433
+ **allow_delete** | **Integer**| Permission to delete/remove entries in the table (See values below) | [optional]
434
+ **allow_view** | **Integer**| Permission to view/read entries in the table (See values below) | [optional]
435
+ **allow_alter** | **Integer**| Permission to add/create entries in the table (See values below) | [optional]
436
+ **nav_listed** | **BOOLEAN**| If the table should be visible in the sidebar for this user group | [optional]
437
+ **read_field_blacklist** | **String**| A CSV of column names that the group can't view (read) | [optional]
438
+ **write_field_blacklist** | **String**| A CSV of column names that the group can't edit (update) | [optional]
439
+ **status_id** | **String**| State of the record that this permissions belongs to (Draft, Active or Soft Deleted) | [optional]
440
+
441
+ ### Return type
442
+
443
+ nil (empty response body)
444
+
445
+ ### Authorization
446
+
447
+ [api_key](../README.md#api_key)
448
+
449
+ ### HTTP request headers
450
+
451
+ - **Content-Type**: application/x-www-form-urlencoded
452
+ - **Accept**: application/json
453
+
454
+
455
+