directus_sdk 1.1.1
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 +7 -0
- data/Gemfile +7 -0
- data/README.md +185 -0
- data/Rakefile +8 -0
- data/directus_sdk.gemspec +46 -0
- data/docs/ActivityApi.md +59 -0
- data/docs/BookmarksApi.md +290 -0
- data/docs/FilesApi.md +277 -0
- data/docs/GetActivity.md +9 -0
- data/docs/GetActivityData.md +16 -0
- data/docs/GetActivityMeta.md +10 -0
- data/docs/GetBookmark.md +9 -0
- data/docs/GetBookmarks.md +9 -0
- data/docs/GetBookmarksData.md +14 -0
- data/docs/GetBookmarksMeta.md +14 -0
- data/docs/GetFile.md +9 -0
- data/docs/GetFiles.md +9 -0
- data/docs/GetFilesData.md +24 -0
- data/docs/GetGroup.md +9 -0
- data/docs/GetGroups.md +9 -0
- data/docs/GetGroupsData.md +9 -0
- data/docs/GetGroupsDataData.md +16 -0
- data/docs/GetGroupsDataMeta.md +11 -0
- data/docs/GetMessage.md +9 -0
- data/docs/GetMessages.md +9 -0
- data/docs/GetMessagesData.md +18 -0
- data/docs/GetMessagesMeta.md +13 -0
- data/docs/GetMessagesResponses.md +8 -0
- data/docs/GetPreferences.md +9 -0
- data/docs/GetPreferencesData.md +16 -0
- data/docs/GetPrivileges.md +9 -0
- data/docs/GetPrivilegesData.md +19 -0
- data/docs/GetPrivilegesForTable.md +9 -0
- data/docs/GetSettings.md +9 -0
- data/docs/GetSettingsData.md +9 -0
- data/docs/GetSettingsDataFiles.md +13 -0
- data/docs/GetSettingsDataGlobal.md +13 -0
- data/docs/GetSettingsFor.md +9 -0
- data/docs/GetSettingsForMeta.md +10 -0
- data/docs/GetTable.md +9 -0
- data/docs/GetTableColumn.md +9 -0
- data/docs/GetTableColumnData.md +23 -0
- data/docs/GetTableColumns.md +9 -0
- data/docs/GetTableColumnsData.md +27 -0
- data/docs/GetTableData.md +29 -0
- data/docs/GetTableRow.md +9 -0
- data/docs/GetTableRows.md +9 -0
- data/docs/GetTableRowsData.md +9 -0
- data/docs/GetTableRowsMeta.md +14 -0
- data/docs/GetTables.md +9 -0
- data/docs/GetTablesData.md +8 -0
- data/docs/GetTablesMeta.md +9 -0
- data/docs/GroupsApi.md +455 -0
- data/docs/MessagesApi.md +116 -0
- data/docs/PreferencesApi.md +135 -0
- data/docs/SettingsApi.md +175 -0
- data/docs/TablesApi.md +873 -0
- data/docs/UtilsApi.md +126 -0
- data/git_push.sh +55 -0
- data/lib/directus_sdk.rb +92 -0
- data/lib/directus_sdk/api/activity_api.rb +70 -0
- data/lib/directus_sdk/api/bookmarks_api.rb +288 -0
- data/lib/directus_sdk/api/files_api.rb +297 -0
- data/lib/directus_sdk/api/groups_api.rb +469 -0
- data/lib/directus_sdk/api/messages_api.rb +123 -0
- data/lib/directus_sdk/api/preferences_api.rb +151 -0
- data/lib/directus_sdk/api/settings_api.rb +183 -0
- data/lib/directus_sdk/api/tables_api.rb +890 -0
- data/lib/directus_sdk/api/utils_api.rb +134 -0
- data/lib/directus_sdk/api_client.rb +389 -0
- data/lib/directus_sdk/api_error.rb +38 -0
- data/lib/directus_sdk/configuration.rb +209 -0
- data/lib/directus_sdk/models/get_activity.rb +199 -0
- data/lib/directus_sdk/models/get_activity_data.rb +260 -0
- data/lib/directus_sdk/models/get_activity_meta.rb +206 -0
- data/lib/directus_sdk/models/get_bookmark.rb +197 -0
- data/lib/directus_sdk/models/get_bookmarks.rb +199 -0
- data/lib/directus_sdk/models/get_bookmarks_data.rb +242 -0
- data/lib/directus_sdk/models/get_bookmarks_meta.rb +252 -0
- data/lib/directus_sdk/models/get_file.rb +197 -0
- data/lib/directus_sdk/models/get_files.rb +199 -0
- data/lib/directus_sdk/models/get_files_data.rb +332 -0
- data/lib/directus_sdk/models/get_group.rb +197 -0
- data/lib/directus_sdk/models/get_groups.rb +197 -0
- data/lib/directus_sdk/models/get_groups_data.rb +199 -0
- data/lib/directus_sdk/models/get_groups_data_data.rb +260 -0
- data/lib/directus_sdk/models/get_groups_data_meta.rb +215 -0
- data/lib/directus_sdk/models/get_message.rb +197 -0
- data/lib/directus_sdk/models/get_messages.rb +199 -0
- data/lib/directus_sdk/models/get_messages_data.rb +278 -0
- data/lib/directus_sdk/models/get_messages_meta.rb +233 -0
- data/lib/directus_sdk/models/get_messages_responses.rb +190 -0
- data/lib/directus_sdk/models/get_preferences.rb +197 -0
- data/lib/directus_sdk/models/get_preferences_data.rb +260 -0
- data/lib/directus_sdk/models/get_privileges.rb +199 -0
- data/lib/directus_sdk/models/get_privileges_data.rb +287 -0
- data/lib/directus_sdk/models/get_privileges_for_table.rb +197 -0
- data/lib/directus_sdk/models/get_settings.rb +197 -0
- data/lib/directus_sdk/models/get_settings_data.rb +197 -0
- data/lib/directus_sdk/models/get_settings_data_files.rb +233 -0
- data/lib/directus_sdk/models/get_settings_data_global.rb +233 -0
- data/lib/directus_sdk/models/get_settings_for.rb +197 -0
- data/lib/directus_sdk/models/get_settings_for_meta.rb +206 -0
- data/lib/directus_sdk/models/get_table.rb +197 -0
- data/lib/directus_sdk/models/get_table_column.rb +197 -0
- data/lib/directus_sdk/models/get_table_column_data.rb +325 -0
- data/lib/directus_sdk/models/get_table_columns.rb +199 -0
- data/lib/directus_sdk/models/get_table_columns_data.rb +363 -0
- data/lib/directus_sdk/models/get_table_data.rb +379 -0
- data/lib/directus_sdk/models/get_table_row.rb +197 -0
- data/lib/directus_sdk/models/get_table_rows.rb +199 -0
- data/lib/directus_sdk/models/get_table_rows_data.rb +197 -0
- data/lib/directus_sdk/models/get_table_rows_meta.rb +242 -0
- data/lib/directus_sdk/models/get_tables.rb +199 -0
- data/lib/directus_sdk/models/get_tables_data.rb +188 -0
- data/lib/directus_sdk/models/get_tables_meta.rb +197 -0
- data/lib/directus_sdk/version.rb +15 -0
- data/spec/api/activity_api_spec.rb +46 -0
- data/spec/api/bookmarks_api_spec.rb +98 -0
- data/spec/api/files_api_spec.rb +105 -0
- data/spec/api/groups_api_spec.rb +143 -0
- data/spec/api/messages_api_spec.rb +58 -0
- data/spec/api/preferences_api_spec.rb +65 -0
- data/spec/api/settings_api_spec.rb +71 -0
- data/spec/api/tables_api_spec.rb +236 -0
- data/spec/api/utils_api_spec.rb +61 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/get_activity_data_spec.rb +90 -0
- data/spec/models/get_activity_meta_spec.rb +54 -0
- data/spec/models/get_activity_spec.rb +48 -0
- data/spec/models/get_bookmark_spec.rb +48 -0
- data/spec/models/get_bookmarks_data_spec.rb +78 -0
- data/spec/models/get_bookmarks_meta_spec.rb +78 -0
- data/spec/models/get_bookmarks_spec.rb +48 -0
- data/spec/models/get_file_spec.rb +48 -0
- data/spec/models/get_files_data_spec.rb +138 -0
- data/spec/models/get_files_spec.rb +48 -0
- data/spec/models/get_group_spec.rb +48 -0
- data/spec/models/get_groups_data_data_spec.rb +90 -0
- data/spec/models/get_groups_data_meta_spec.rb +60 -0
- data/spec/models/get_groups_data_spec.rb +48 -0
- data/spec/models/get_groups_spec.rb +48 -0
- data/spec/models/get_message_spec.rb +48 -0
- data/spec/models/get_messages_data_spec.rb +102 -0
- data/spec/models/get_messages_meta_spec.rb +72 -0
- data/spec/models/get_messages_responses_spec.rb +42 -0
- data/spec/models/get_messages_spec.rb +48 -0
- data/spec/models/get_preferences_data_spec.rb +90 -0
- data/spec/models/get_preferences_spec.rb +48 -0
- data/spec/models/get_privileges_data_spec.rb +108 -0
- data/spec/models/get_privileges_for_table_spec.rb +48 -0
- data/spec/models/get_privileges_spec.rb +48 -0
- data/spec/models/get_settings_data_files_spec.rb +72 -0
- data/spec/models/get_settings_data_global_spec.rb +72 -0
- data/spec/models/get_settings_data_spec.rb +48 -0
- data/spec/models/get_settings_for_meta_spec.rb +54 -0
- data/spec/models/get_settings_for_spec.rb +48 -0
- data/spec/models/get_settings_spec.rb +48 -0
- data/spec/models/get_table_column_data_spec.rb +132 -0
- data/spec/models/get_table_column_spec.rb +48 -0
- data/spec/models/get_table_columns_data_spec.rb +156 -0
- data/spec/models/get_table_columns_spec.rb +48 -0
- data/spec/models/get_table_data_spec.rb +168 -0
- data/spec/models/get_table_row_spec.rb +48 -0
- data/spec/models/get_table_rows_data_spec.rb +48 -0
- data/spec/models/get_table_rows_meta_spec.rb +78 -0
- data/spec/models/get_table_rows_spec.rb +48 -0
- data/spec/models/get_table_spec.rb +48 -0
- data/spec/models/get_tables_data_spec.rb +42 -0
- data/spec/models/get_tables_meta_spec.rb +48 -0
- data/spec/models/get_tables_spec.rb +48 -0
- data/spec/spec_helper.rb +111 -0
- metadata +451 -0
data/docs/MessagesApi.md
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# DirectusSDK::MessagesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://myinstance.directus.io/api/1.1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**get_message**](MessagesApi.md#get_message) | **GET** /messages/{messageId} | Returns specific message
|
|
8
|
+
[**get_messages**](MessagesApi.md#get_messages) | **GET** /messages/self | Returns messages
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# **get_message**
|
|
12
|
+
> GetMessage get_message(message_id)
|
|
13
|
+
|
|
14
|
+
Returns specific message
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
```ruby
|
|
18
|
+
# load the gem
|
|
19
|
+
require 'directus_sdk'
|
|
20
|
+
# setup authorization
|
|
21
|
+
DirectusSDK.configure do |config|
|
|
22
|
+
# Configure API key authorization: api_key
|
|
23
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
24
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
25
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
26
|
+
# Configure your host
|
|
27
|
+
config.host = "myinstance.directus.io"
|
|
28
|
+
# Enable or disable debugging output
|
|
29
|
+
config.debugging = false
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
api_instance = DirectusSDK::MessagesApi.new
|
|
33
|
+
|
|
34
|
+
message_id = 56 # Integer | ID of message to return
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
#Returns specific message
|
|
39
|
+
result = api_instance.get_message(message_id)
|
|
40
|
+
p result
|
|
41
|
+
rescue DirectusSDK::ApiError => e
|
|
42
|
+
puts "Exception when calling MessagesApi->get_message: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Parameters
|
|
47
|
+
|
|
48
|
+
Name | Type | Description | Notes
|
|
49
|
+
------------- | ------------- | ------------- | -------------
|
|
50
|
+
**message_id** | **Integer**| ID of message to return |
|
|
51
|
+
|
|
52
|
+
### Return type
|
|
53
|
+
|
|
54
|
+
[**GetMessage**](GetMessage.md)
|
|
55
|
+
|
|
56
|
+
### Authorization
|
|
57
|
+
|
|
58
|
+
[api_key](../README.md#api_key)
|
|
59
|
+
|
|
60
|
+
### HTTP request headers
|
|
61
|
+
|
|
62
|
+
- **Content-Type**: Not defined
|
|
63
|
+
- **Accept**: application/json
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# **get_messages**
|
|
68
|
+
> GetMessages get_messages
|
|
69
|
+
|
|
70
|
+
Returns messages
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
```ruby
|
|
74
|
+
# load the gem
|
|
75
|
+
require 'directus_sdk'
|
|
76
|
+
# setup authorization
|
|
77
|
+
DirectusSDK.configure do |config|
|
|
78
|
+
# Configure API key authorization: api_key
|
|
79
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
80
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
81
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
82
|
+
# Configure your host
|
|
83
|
+
config.host = "myinstance.directus.io"
|
|
84
|
+
# Enable or disable debugging output
|
|
85
|
+
config.debugging = false
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
api_instance = DirectusSDK::MessagesApi.new
|
|
89
|
+
|
|
90
|
+
begin
|
|
91
|
+
#Returns messages
|
|
92
|
+
result = api_instance.get_messages
|
|
93
|
+
p result
|
|
94
|
+
rescue DirectusSDK::ApiError => e
|
|
95
|
+
puts "Exception when calling MessagesApi->get_messages: #{e}"
|
|
96
|
+
end
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
### Parameters
|
|
100
|
+
This endpoint does not need any parameter.
|
|
101
|
+
|
|
102
|
+
### Return type
|
|
103
|
+
|
|
104
|
+
[**GetMessages**](GetMessages.md)
|
|
105
|
+
|
|
106
|
+
### Authorization
|
|
107
|
+
|
|
108
|
+
[api_key](../README.md#api_key)
|
|
109
|
+
|
|
110
|
+
### HTTP request headers
|
|
111
|
+
|
|
112
|
+
- **Content-Type**: Not defined
|
|
113
|
+
- **Accept**: application/json
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# DirectusSDK::PreferencesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://myinstance.directus.io/api/1.1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**get_preferences**](PreferencesApi.md#get_preferences) | **GET** /tables/{tableId}/preferences | Returns table preferences
|
|
8
|
+
[**update_preferences**](PreferencesApi.md#update_preferences) | **PUT** /tables/{tableId}/preferences | Update table preferences
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
# **get_preferences**
|
|
12
|
+
> GetPreferences get_preferences(table_id)
|
|
13
|
+
|
|
14
|
+
Returns table preferences
|
|
15
|
+
|
|
16
|
+
### Example
|
|
17
|
+
```ruby
|
|
18
|
+
# load the gem
|
|
19
|
+
require 'directus_sdk'
|
|
20
|
+
# setup authorization
|
|
21
|
+
DirectusSDK.configure do |config|
|
|
22
|
+
# Configure API key authorization: api_key
|
|
23
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
24
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
25
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
26
|
+
# Configure your host
|
|
27
|
+
config.host = "myinstance.directus.io"
|
|
28
|
+
# Enable or disable debugging output
|
|
29
|
+
config.debugging = false
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
api_instance = DirectusSDK::PreferencesApi.new
|
|
33
|
+
|
|
34
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
#Returns table preferences
|
|
39
|
+
result = api_instance.get_preferences(table_id)
|
|
40
|
+
p result
|
|
41
|
+
rescue DirectusSDK::ApiError => e
|
|
42
|
+
puts "Exception when calling PreferencesApi->get_preferences: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Parameters
|
|
47
|
+
|
|
48
|
+
Name | Type | Description | Notes
|
|
49
|
+
------------- | ------------- | ------------- | -------------
|
|
50
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
51
|
+
|
|
52
|
+
### Return type
|
|
53
|
+
|
|
54
|
+
[**GetPreferences**](GetPreferences.md)
|
|
55
|
+
|
|
56
|
+
### Authorization
|
|
57
|
+
|
|
58
|
+
[api_key](../README.md#api_key)
|
|
59
|
+
|
|
60
|
+
### HTTP request headers
|
|
61
|
+
|
|
62
|
+
- **Content-Type**: Not defined
|
|
63
|
+
- **Accept**: application/json
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
# **update_preferences**
|
|
68
|
+
> update_preferences(table_id, opts)
|
|
69
|
+
|
|
70
|
+
Update table preferences
|
|
71
|
+
|
|
72
|
+
### Example
|
|
73
|
+
```ruby
|
|
74
|
+
# load the gem
|
|
75
|
+
require 'directus_sdk'
|
|
76
|
+
# setup authorization
|
|
77
|
+
DirectusSDK.configure do |config|
|
|
78
|
+
# Configure API key authorization: api_key
|
|
79
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
80
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
81
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
82
|
+
# Configure your host
|
|
83
|
+
config.host = "myinstance.directus.io"
|
|
84
|
+
# Enable or disable debugging output
|
|
85
|
+
config.debugging = false
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
api_instance = DirectusSDK::PreferencesApi.new
|
|
89
|
+
|
|
90
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
91
|
+
|
|
92
|
+
opts = {
|
|
93
|
+
id: "id_example", # String | Preference's Unique Identification number
|
|
94
|
+
table_name: "table_name_example", # String | Name of table to add
|
|
95
|
+
columns_visible: "columns_visible_example", # String | List of visible columns, separated by commas
|
|
96
|
+
sort: 56, # Integer | The sort order of the column used to override the column order in the schema
|
|
97
|
+
sort_order: "sort_order_example", # String | Sort Order (ASC=Ascending or DESC=Descending)
|
|
98
|
+
status: "status_example" # String | List of status values. separated by comma
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
begin
|
|
102
|
+
#Update table preferences
|
|
103
|
+
api_instance.update_preferences(table_id, opts)
|
|
104
|
+
rescue DirectusSDK::ApiError => e
|
|
105
|
+
puts "Exception when calling PreferencesApi->update_preferences: #{e}"
|
|
106
|
+
end
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Parameters
|
|
110
|
+
|
|
111
|
+
Name | Type | Description | Notes
|
|
112
|
+
------------- | ------------- | ------------- | -------------
|
|
113
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
114
|
+
**id** | **String**| Preference's Unique Identification number | [optional]
|
|
115
|
+
**table_name** | **String**| Name of table to add | [optional]
|
|
116
|
+
**columns_visible** | **String**| List of visible columns, separated by commas | [optional]
|
|
117
|
+
**sort** | **Integer**| The sort order of the column used to override the column order in the schema | [optional]
|
|
118
|
+
**sort_order** | **String**| Sort Order (ASC=Ascending or DESC=Descending) | [optional]
|
|
119
|
+
**status** | **String**| List of status values. separated by comma | [optional]
|
|
120
|
+
|
|
121
|
+
### Return type
|
|
122
|
+
|
|
123
|
+
nil (empty response body)
|
|
124
|
+
|
|
125
|
+
### Authorization
|
|
126
|
+
|
|
127
|
+
[api_key](../README.md#api_key)
|
|
128
|
+
|
|
129
|
+
### HTTP request headers
|
|
130
|
+
|
|
131
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
132
|
+
- **Accept**: application/json
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
data/docs/SettingsApi.md
ADDED
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# DirectusSDK::SettingsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://myinstance.directus.io/api/1.1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**get_settings**](SettingsApi.md#get_settings) | **GET** /settings | Returns settings
|
|
8
|
+
[**get_settings_for**](SettingsApi.md#get_settings_for) | **GET** /settings/{collectionName} | Returns settings for collection
|
|
9
|
+
[**update_settings**](SettingsApi.md#update_settings) | **PUT** /settings/{collectionName} | Update settings
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
# **get_settings**
|
|
13
|
+
> GetSettings get_settings
|
|
14
|
+
|
|
15
|
+
Returns settings
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
```ruby
|
|
19
|
+
# load the gem
|
|
20
|
+
require 'directus_sdk'
|
|
21
|
+
# setup authorization
|
|
22
|
+
DirectusSDK.configure do |config|
|
|
23
|
+
# Configure API key authorization: api_key
|
|
24
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
25
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
26
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
27
|
+
# Configure your host
|
|
28
|
+
config.host = "myinstance.directus.io"
|
|
29
|
+
# Enable or disable debugging output
|
|
30
|
+
config.debugging = false
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
api_instance = DirectusSDK::SettingsApi.new
|
|
34
|
+
|
|
35
|
+
begin
|
|
36
|
+
#Returns settings
|
|
37
|
+
result = api_instance.get_settings
|
|
38
|
+
p result
|
|
39
|
+
rescue DirectusSDK::ApiError => e
|
|
40
|
+
puts "Exception when calling SettingsApi->get_settings: #{e}"
|
|
41
|
+
end
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
### Parameters
|
|
45
|
+
This endpoint does not need any parameter.
|
|
46
|
+
|
|
47
|
+
### Return type
|
|
48
|
+
|
|
49
|
+
[**GetSettings**](GetSettings.md)
|
|
50
|
+
|
|
51
|
+
### Authorization
|
|
52
|
+
|
|
53
|
+
[api_key](../README.md#api_key)
|
|
54
|
+
|
|
55
|
+
### HTTP request headers
|
|
56
|
+
|
|
57
|
+
- **Content-Type**: Not defined
|
|
58
|
+
- **Accept**: application/json
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
# **get_settings_for**
|
|
63
|
+
> GetSettingsFor get_settings_for(collection_name, )
|
|
64
|
+
|
|
65
|
+
Returns settings for collection
|
|
66
|
+
|
|
67
|
+
### Example
|
|
68
|
+
```ruby
|
|
69
|
+
# load the gem
|
|
70
|
+
require 'directus_sdk'
|
|
71
|
+
# setup authorization
|
|
72
|
+
DirectusSDK.configure do |config|
|
|
73
|
+
# Configure API key authorization: api_key
|
|
74
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
75
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
76
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
77
|
+
# Configure your host
|
|
78
|
+
config.host = "myinstance.directus.io"
|
|
79
|
+
# Enable or disable debugging output
|
|
80
|
+
config.debugging = false
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
api_instance = DirectusSDK::SettingsApi.new
|
|
84
|
+
|
|
85
|
+
collection_name = 56 # Integer | Name of collection to return settings for
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
begin
|
|
89
|
+
#Returns settings for collection
|
|
90
|
+
result = api_instance.get_settings_for(collection_name, )
|
|
91
|
+
p result
|
|
92
|
+
rescue DirectusSDK::ApiError => e
|
|
93
|
+
puts "Exception when calling SettingsApi->get_settings_for: #{e}"
|
|
94
|
+
end
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Parameters
|
|
98
|
+
|
|
99
|
+
Name | Type | Description | Notes
|
|
100
|
+
------------- | ------------- | ------------- | -------------
|
|
101
|
+
**collection_name** | **Integer**| Name of collection to return settings for |
|
|
102
|
+
|
|
103
|
+
### Return type
|
|
104
|
+
|
|
105
|
+
[**GetSettingsFor**](GetSettingsFor.md)
|
|
106
|
+
|
|
107
|
+
### Authorization
|
|
108
|
+
|
|
109
|
+
[api_key](../README.md#api_key)
|
|
110
|
+
|
|
111
|
+
### HTTP request headers
|
|
112
|
+
|
|
113
|
+
- **Content-Type**: Not defined
|
|
114
|
+
- **Accept**: application/json
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
# **update_settings**
|
|
119
|
+
> update_settings(collection_name, custom_data)
|
|
120
|
+
|
|
121
|
+
Update settings
|
|
122
|
+
|
|
123
|
+
### Example
|
|
124
|
+
```ruby
|
|
125
|
+
# load the gem
|
|
126
|
+
require 'directus_sdk'
|
|
127
|
+
# setup authorization
|
|
128
|
+
DirectusSDK.configure do |config|
|
|
129
|
+
# Configure API key authorization: api_key
|
|
130
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
131
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
132
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
133
|
+
# Configure your host
|
|
134
|
+
config.host = "myinstance.directus.io"
|
|
135
|
+
# Enable or disable debugging output
|
|
136
|
+
config.debugging = false
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
api_instance = DirectusSDK::SettingsApi.new
|
|
140
|
+
|
|
141
|
+
collection_name = 56 # Integer | Name of collection to return settings for
|
|
142
|
+
|
|
143
|
+
custom_data = "custom_data_example" # String | Data based on your specific schema eg: active=1&title=LoremIpsum
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
begin
|
|
147
|
+
#Update settings
|
|
148
|
+
api_instance.update_settings(collection_name, custom_data)
|
|
149
|
+
rescue DirectusSDK::ApiError => e
|
|
150
|
+
puts "Exception when calling SettingsApi->update_settings: #{e}"
|
|
151
|
+
end
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Parameters
|
|
155
|
+
|
|
156
|
+
Name | Type | Description | Notes
|
|
157
|
+
------------- | ------------- | ------------- | -------------
|
|
158
|
+
**collection_name** | **Integer**| Name of collection to return settings for |
|
|
159
|
+
**custom_data** | **String**| Data based on your specific schema eg: active=1&title=LoremIpsum |
|
|
160
|
+
|
|
161
|
+
### Return type
|
|
162
|
+
|
|
163
|
+
nil (empty response body)
|
|
164
|
+
|
|
165
|
+
### Authorization
|
|
166
|
+
|
|
167
|
+
[api_key](../README.md#api_key)
|
|
168
|
+
|
|
169
|
+
### HTTP request headers
|
|
170
|
+
|
|
171
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
172
|
+
- **Accept**: application/json
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
data/docs/TablesApi.md
ADDED
|
@@ -0,0 +1,873 @@
|
|
|
1
|
+
# DirectusSDK::TablesApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://myinstance.directus.io/api/1.1*
|
|
4
|
+
|
|
5
|
+
Method | HTTP request | Description
|
|
6
|
+
------------- | ------------- | -------------
|
|
7
|
+
[**add_column**](TablesApi.md#add_column) | **POST** /tables/{tableId}/columns | Create a column in a given table
|
|
8
|
+
[**add_row**](TablesApi.md#add_row) | **POST** /tables/{tableId}/rows | Add a new row
|
|
9
|
+
[**add_table**](TablesApi.md#add_table) | **POST** /tables | Add a new table
|
|
10
|
+
[**delete_column**](TablesApi.md#delete_column) | **DELETE** /tables/{tableId}/columns/{columnName} | Delete row
|
|
11
|
+
[**delete_row**](TablesApi.md#delete_row) | **DELETE** /tables/{tableId}/rows/{rowId} | Delete row
|
|
12
|
+
[**delete_table**](TablesApi.md#delete_table) | **DELETE** /tables/{tableId} | Delete Table
|
|
13
|
+
[**get_table**](TablesApi.md#get_table) | **GET** /tables/{tableId} | Returns specific table
|
|
14
|
+
[**get_table_column**](TablesApi.md#get_table_column) | **GET** /tables/{tableId}/columns/{columnName} | Returns specific table column
|
|
15
|
+
[**get_table_columns**](TablesApi.md#get_table_columns) | **GET** /tables/{tableId}/columns | Returns table columns
|
|
16
|
+
[**get_table_row**](TablesApi.md#get_table_row) | **GET** /tables/{tableId}/rows/{rowId} | Returns specific table row
|
|
17
|
+
[**get_table_rows**](TablesApi.md#get_table_rows) | **GET** /tables/{tableId}/rows | Returns table rows
|
|
18
|
+
[**get_tables**](TablesApi.md#get_tables) | **GET** /tables | Returns tables
|
|
19
|
+
[**update_column**](TablesApi.md#update_column) | **PUT** /tables/{tableId}/columns/{columnName} | Update column
|
|
20
|
+
[**update_row**](TablesApi.md#update_row) | **PUT** /tables/{tableId}/rows/{rowId} | Update row
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
# **add_column**
|
|
24
|
+
> add_column(table_id, opts)
|
|
25
|
+
|
|
26
|
+
Create a column in a given table
|
|
27
|
+
|
|
28
|
+
### Example
|
|
29
|
+
```ruby
|
|
30
|
+
# load the gem
|
|
31
|
+
require 'directus_sdk'
|
|
32
|
+
# setup authorization
|
|
33
|
+
DirectusSDK.configure do |config|
|
|
34
|
+
# Configure API key authorization: api_key
|
|
35
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
36
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
37
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
38
|
+
# Configure your host
|
|
39
|
+
config.host = "myinstance.directus.io"
|
|
40
|
+
# Enable or disable debugging output
|
|
41
|
+
config.debugging = false
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
45
|
+
|
|
46
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
47
|
+
|
|
48
|
+
opts = {
|
|
49
|
+
table_name: "table_name_example", # String | Name of table to add
|
|
50
|
+
column_name: "column_name_example", # String | The unique name of the column to create
|
|
51
|
+
type: "type_example", # String | The datatype of the column, eg: INT
|
|
52
|
+
ui: "ui_example", # String | The Directus Interface to use for this column
|
|
53
|
+
hidden_input: true, # BOOLEAN | Whether the column will be hidden (globally) on the Edit Item page
|
|
54
|
+
hidden_list: true, # BOOLEAN | Whether the column will be hidden (globally) on the Item Listing page
|
|
55
|
+
required: true, # BOOLEAN | Whether the column is required. If required, the interface's validation function will be triggered
|
|
56
|
+
sort: 56, # Integer | The sort order of the column used to override the column order in the schema
|
|
57
|
+
comment: "comment_example", # String | A helpful note to users for this column
|
|
58
|
+
relationship_type: "relationship_type_example", # String | The column's relationship type (only used when storing relational data) eg: ONETOMANY, MANYTOMANY or MANYTOONE
|
|
59
|
+
related_table: "related_table_example", # String | The table name this column is related to (only used when storing relational data)
|
|
60
|
+
junction_table: "junction_table_example", # String | The pivot/junction table that joins the column's table with the related table (only used when storing relational data)
|
|
61
|
+
junction_key_left: "junction_key_left_example", # String | The column name in junction that is related to the column's table (only used when storing relational data)
|
|
62
|
+
junction_key_right: "junction_key_right_example" # String | The column name in junction that is related to the related table (only used when storing relational data)
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
begin
|
|
66
|
+
#Create a column in a given table
|
|
67
|
+
api_instance.add_column(table_id, opts)
|
|
68
|
+
rescue DirectusSDK::ApiError => e
|
|
69
|
+
puts "Exception when calling TablesApi->add_column: #{e}"
|
|
70
|
+
end
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Parameters
|
|
74
|
+
|
|
75
|
+
Name | Type | Description | Notes
|
|
76
|
+
------------- | ------------- | ------------- | -------------
|
|
77
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
78
|
+
**table_name** | **String**| Name of table to add | [optional]
|
|
79
|
+
**column_name** | **String**| The unique name of the column to create | [optional]
|
|
80
|
+
**type** | **String**| The datatype of the column, eg: INT | [optional]
|
|
81
|
+
**ui** | **String**| The Directus Interface to use for this column | [optional]
|
|
82
|
+
**hidden_input** | **BOOLEAN**| Whether the column will be hidden (globally) on the Edit Item page | [optional]
|
|
83
|
+
**hidden_list** | **BOOLEAN**| Whether the column will be hidden (globally) on the Item Listing page | [optional]
|
|
84
|
+
**required** | **BOOLEAN**| Whether the column is required. If required, the interface's validation function will be triggered | [optional]
|
|
85
|
+
**sort** | **Integer**| The sort order of the column used to override the column order in the schema | [optional]
|
|
86
|
+
**comment** | **String**| A helpful note to users for this column | [optional]
|
|
87
|
+
**relationship_type** | **String**| The column's relationship type (only used when storing relational data) eg: ONETOMANY, MANYTOMANY or MANYTOONE | [optional]
|
|
88
|
+
**related_table** | **String**| The table name this column is related to (only used when storing relational data) | [optional]
|
|
89
|
+
**junction_table** | **String**| The pivot/junction table that joins the column's table with the related table (only used when storing relational data) | [optional]
|
|
90
|
+
**junction_key_left** | **String**| The column name in junction that is related to the column's table (only used when storing relational data) | [optional]
|
|
91
|
+
**junction_key_right** | **String**| The column name in junction that is related to the related table (only used when storing relational data) | [optional]
|
|
92
|
+
|
|
93
|
+
### Return type
|
|
94
|
+
|
|
95
|
+
nil (empty response body)
|
|
96
|
+
|
|
97
|
+
### Authorization
|
|
98
|
+
|
|
99
|
+
[api_key](../README.md#api_key)
|
|
100
|
+
|
|
101
|
+
### HTTP request headers
|
|
102
|
+
|
|
103
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
104
|
+
- **Accept**: application/json, application/xml
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
# **add_row**
|
|
109
|
+
> add_row(table_idcustom_data)
|
|
110
|
+
|
|
111
|
+
Add a new row
|
|
112
|
+
|
|
113
|
+
### Example
|
|
114
|
+
```ruby
|
|
115
|
+
# load the gem
|
|
116
|
+
require 'directus_sdk'
|
|
117
|
+
# setup authorization
|
|
118
|
+
DirectusSDK.configure do |config|
|
|
119
|
+
# Configure API key authorization: api_key
|
|
120
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
121
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
122
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
123
|
+
# Configure your host
|
|
124
|
+
config.host = "myinstance.directus.io"
|
|
125
|
+
# Enable or disable debugging output
|
|
126
|
+
config.debugging = false
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
130
|
+
|
|
131
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
132
|
+
|
|
133
|
+
custom_data = "custom_data_example" # String | Data based on your specific schema eg: active=1&title=LoremIpsum
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
begin
|
|
137
|
+
#Add a new row
|
|
138
|
+
api_instance.add_row(table_idcustom_data)
|
|
139
|
+
rescue DirectusSDK::ApiError => e
|
|
140
|
+
puts "Exception when calling TablesApi->add_row: #{e}"
|
|
141
|
+
end
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Parameters
|
|
145
|
+
|
|
146
|
+
Name | Type | Description | Notes
|
|
147
|
+
------------- | ------------- | ------------- | -------------
|
|
148
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
149
|
+
**custom_data** | **String**| Data based on your specific schema eg: active=1&title=LoremIpsum |
|
|
150
|
+
|
|
151
|
+
### Return type
|
|
152
|
+
|
|
153
|
+
nil (empty response body)
|
|
154
|
+
|
|
155
|
+
### Authorization
|
|
156
|
+
|
|
157
|
+
[api_key](../README.md#api_key)
|
|
158
|
+
|
|
159
|
+
### HTTP request headers
|
|
160
|
+
|
|
161
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
162
|
+
- **Accept**: application/json
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
# **add_table**
|
|
167
|
+
> add_table(opts)
|
|
168
|
+
|
|
169
|
+
Add a new table
|
|
170
|
+
|
|
171
|
+
### Example
|
|
172
|
+
```ruby
|
|
173
|
+
# load the gem
|
|
174
|
+
require 'directus_sdk'
|
|
175
|
+
# setup authorization
|
|
176
|
+
DirectusSDK.configure do |config|
|
|
177
|
+
# Configure API key authorization: api_key
|
|
178
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
179
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
180
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
181
|
+
# Configure your host
|
|
182
|
+
config.host = "myinstance.directus.io"
|
|
183
|
+
# Enable or disable debugging output
|
|
184
|
+
config.debugging = false
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
188
|
+
|
|
189
|
+
opts = {
|
|
190
|
+
name: "name_example" # String | Name of table to add
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
begin
|
|
194
|
+
#Add a new table
|
|
195
|
+
api_instance.add_table(opts)
|
|
196
|
+
rescue DirectusSDK::ApiError => e
|
|
197
|
+
puts "Exception when calling TablesApi->add_table: #{e}"
|
|
198
|
+
end
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### Parameters
|
|
202
|
+
|
|
203
|
+
Name | Type | Description | Notes
|
|
204
|
+
------------- | ------------- | ------------- | -------------
|
|
205
|
+
**name** | **String**| Name of table to add | [optional]
|
|
206
|
+
|
|
207
|
+
### Return type
|
|
208
|
+
|
|
209
|
+
nil (empty response body)
|
|
210
|
+
|
|
211
|
+
### Authorization
|
|
212
|
+
|
|
213
|
+
[api_key](../README.md#api_key)
|
|
214
|
+
|
|
215
|
+
### HTTP request headers
|
|
216
|
+
|
|
217
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
218
|
+
- **Accept**: application/json, application/xml
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
# **delete_column**
|
|
223
|
+
> delete_column(table_idcolumn_name)
|
|
224
|
+
|
|
225
|
+
Delete row
|
|
226
|
+
|
|
227
|
+
### Example
|
|
228
|
+
```ruby
|
|
229
|
+
# load the gem
|
|
230
|
+
require 'directus_sdk'
|
|
231
|
+
# setup authorization
|
|
232
|
+
DirectusSDK.configure do |config|
|
|
233
|
+
# Configure API key authorization: api_key
|
|
234
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
235
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
236
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
237
|
+
# Configure your host
|
|
238
|
+
config.host = "myinstance.directus.io"
|
|
239
|
+
# Enable or disable debugging output
|
|
240
|
+
config.debugging = false
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
244
|
+
|
|
245
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
246
|
+
|
|
247
|
+
column_name = "column_name_example" # String | Name of column to return
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
begin
|
|
251
|
+
#Delete row
|
|
252
|
+
api_instance.delete_column(table_idcolumn_name)
|
|
253
|
+
rescue DirectusSDK::ApiError => e
|
|
254
|
+
puts "Exception when calling TablesApi->delete_column: #{e}"
|
|
255
|
+
end
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
### Parameters
|
|
259
|
+
|
|
260
|
+
Name | Type | Description | Notes
|
|
261
|
+
------------- | ------------- | ------------- | -------------
|
|
262
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
263
|
+
**column_name** | **String**| Name of column to return |
|
|
264
|
+
|
|
265
|
+
### Return type
|
|
266
|
+
|
|
267
|
+
nil (empty response body)
|
|
268
|
+
|
|
269
|
+
### Authorization
|
|
270
|
+
|
|
271
|
+
[api_key](../README.md#api_key)
|
|
272
|
+
|
|
273
|
+
### HTTP request headers
|
|
274
|
+
|
|
275
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
276
|
+
- **Accept**: application/json
|
|
277
|
+
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
# **delete_row**
|
|
281
|
+
> delete_row(table_idrow_id)
|
|
282
|
+
|
|
283
|
+
Delete row
|
|
284
|
+
|
|
285
|
+
### Example
|
|
286
|
+
```ruby
|
|
287
|
+
# load the gem
|
|
288
|
+
require 'directus_sdk'
|
|
289
|
+
# setup authorization
|
|
290
|
+
DirectusSDK.configure do |config|
|
|
291
|
+
# Configure API key authorization: api_key
|
|
292
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
293
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
294
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
295
|
+
# Configure your host
|
|
296
|
+
config.host = "myinstance.directus.io"
|
|
297
|
+
# Enable or disable debugging output
|
|
298
|
+
config.debugging = false
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
302
|
+
|
|
303
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
304
|
+
|
|
305
|
+
row_id = 56 # Integer | ID of row to return from rows
|
|
306
|
+
|
|
307
|
+
|
|
308
|
+
begin
|
|
309
|
+
#Delete row
|
|
310
|
+
api_instance.delete_row(table_idrow_id)
|
|
311
|
+
rescue DirectusSDK::ApiError => e
|
|
312
|
+
puts "Exception when calling TablesApi->delete_row: #{e}"
|
|
313
|
+
end
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
### Parameters
|
|
317
|
+
|
|
318
|
+
Name | Type | Description | Notes
|
|
319
|
+
------------- | ------------- | ------------- | -------------
|
|
320
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
321
|
+
**row_id** | **Integer**| ID of row to return from rows |
|
|
322
|
+
|
|
323
|
+
### Return type
|
|
324
|
+
|
|
325
|
+
nil (empty response body)
|
|
326
|
+
|
|
327
|
+
### Authorization
|
|
328
|
+
|
|
329
|
+
[api_key](../README.md#api_key)
|
|
330
|
+
|
|
331
|
+
### HTTP request headers
|
|
332
|
+
|
|
333
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
334
|
+
- **Accept**: application/json
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
|
|
338
|
+
# **delete_table**
|
|
339
|
+
> delete_table(table_id)
|
|
340
|
+
|
|
341
|
+
Delete Table
|
|
342
|
+
|
|
343
|
+
### Example
|
|
344
|
+
```ruby
|
|
345
|
+
# load the gem
|
|
346
|
+
require 'directus_sdk'
|
|
347
|
+
# setup authorization
|
|
348
|
+
DirectusSDK.configure do |config|
|
|
349
|
+
# Configure API key authorization: api_key
|
|
350
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
351
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
352
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
353
|
+
# Configure your host
|
|
354
|
+
config.host = "myinstance.directus.io"
|
|
355
|
+
# Enable or disable debugging output
|
|
356
|
+
config.debugging = false
|
|
357
|
+
end
|
|
358
|
+
|
|
359
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
360
|
+
|
|
361
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
begin
|
|
365
|
+
#Delete Table
|
|
366
|
+
api_instance.delete_table(table_id)
|
|
367
|
+
rescue DirectusSDK::ApiError => e
|
|
368
|
+
puts "Exception when calling TablesApi->delete_table: #{e}"
|
|
369
|
+
end
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
### Parameters
|
|
373
|
+
|
|
374
|
+
Name | Type | Description | Notes
|
|
375
|
+
------------- | ------------- | ------------- | -------------
|
|
376
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
377
|
+
|
|
378
|
+
### Return type
|
|
379
|
+
|
|
380
|
+
nil (empty response body)
|
|
381
|
+
|
|
382
|
+
### Authorization
|
|
383
|
+
|
|
384
|
+
[api_key](../README.md#api_key)
|
|
385
|
+
|
|
386
|
+
### HTTP request headers
|
|
387
|
+
|
|
388
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
389
|
+
- **Accept**: application/json
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
|
|
393
|
+
# **get_table**
|
|
394
|
+
> GetTable get_table(table_id)
|
|
395
|
+
|
|
396
|
+
Returns specific table
|
|
397
|
+
|
|
398
|
+
### Example
|
|
399
|
+
```ruby
|
|
400
|
+
# load the gem
|
|
401
|
+
require 'directus_sdk'
|
|
402
|
+
# setup authorization
|
|
403
|
+
DirectusSDK.configure do |config|
|
|
404
|
+
# Configure API key authorization: api_key
|
|
405
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
406
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
407
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
408
|
+
# Configure your host
|
|
409
|
+
config.host = "myinstance.directus.io"
|
|
410
|
+
# Enable or disable debugging output
|
|
411
|
+
config.debugging = false
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
415
|
+
|
|
416
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
417
|
+
|
|
418
|
+
|
|
419
|
+
begin
|
|
420
|
+
#Returns specific table
|
|
421
|
+
result = api_instance.get_table(table_id)
|
|
422
|
+
p result
|
|
423
|
+
rescue DirectusSDK::ApiError => e
|
|
424
|
+
puts "Exception when calling TablesApi->get_table: #{e}"
|
|
425
|
+
end
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
### Parameters
|
|
429
|
+
|
|
430
|
+
Name | Type | Description | Notes
|
|
431
|
+
------------- | ------------- | ------------- | -------------
|
|
432
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
433
|
+
|
|
434
|
+
### Return type
|
|
435
|
+
|
|
436
|
+
[**GetTable**](GetTable.md)
|
|
437
|
+
|
|
438
|
+
### Authorization
|
|
439
|
+
|
|
440
|
+
[api_key](../README.md#api_key)
|
|
441
|
+
|
|
442
|
+
### HTTP request headers
|
|
443
|
+
|
|
444
|
+
- **Content-Type**: Not defined
|
|
445
|
+
- **Accept**: application/json
|
|
446
|
+
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
# **get_table_column**
|
|
450
|
+
> GetTableColumn get_table_column(table_idcolumn_name)
|
|
451
|
+
|
|
452
|
+
Returns specific table column
|
|
453
|
+
|
|
454
|
+
### Example
|
|
455
|
+
```ruby
|
|
456
|
+
# load the gem
|
|
457
|
+
require 'directus_sdk'
|
|
458
|
+
# setup authorization
|
|
459
|
+
DirectusSDK.configure do |config|
|
|
460
|
+
# Configure API key authorization: api_key
|
|
461
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
462
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
463
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
464
|
+
# Configure your host
|
|
465
|
+
config.host = "myinstance.directus.io"
|
|
466
|
+
# Enable or disable debugging output
|
|
467
|
+
config.debugging = false
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
471
|
+
|
|
472
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
473
|
+
|
|
474
|
+
column_name = "column_name_example" # String | Name of column to return
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
begin
|
|
478
|
+
#Returns specific table column
|
|
479
|
+
result = api_instance.get_table_column(table_idcolumn_name)
|
|
480
|
+
p result
|
|
481
|
+
rescue DirectusSDK::ApiError => e
|
|
482
|
+
puts "Exception when calling TablesApi->get_table_column: #{e}"
|
|
483
|
+
end
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
### Parameters
|
|
487
|
+
|
|
488
|
+
Name | Type | Description | Notes
|
|
489
|
+
------------- | ------------- | ------------- | -------------
|
|
490
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
491
|
+
**column_name** | **String**| Name of column to return |
|
|
492
|
+
|
|
493
|
+
### Return type
|
|
494
|
+
|
|
495
|
+
[**GetTableColumn**](GetTableColumn.md)
|
|
496
|
+
|
|
497
|
+
### Authorization
|
|
498
|
+
|
|
499
|
+
[api_key](../README.md#api_key)
|
|
500
|
+
|
|
501
|
+
### HTTP request headers
|
|
502
|
+
|
|
503
|
+
- **Content-Type**: Not defined
|
|
504
|
+
- **Accept**: application/json
|
|
505
|
+
|
|
506
|
+
|
|
507
|
+
|
|
508
|
+
# **get_table_columns**
|
|
509
|
+
> GetTableColumns get_table_columns(table_id)
|
|
510
|
+
|
|
511
|
+
Returns table columns
|
|
512
|
+
|
|
513
|
+
### Example
|
|
514
|
+
```ruby
|
|
515
|
+
# load the gem
|
|
516
|
+
require 'directus_sdk'
|
|
517
|
+
# setup authorization
|
|
518
|
+
DirectusSDK.configure do |config|
|
|
519
|
+
# Configure API key authorization: api_key
|
|
520
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
521
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
522
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
523
|
+
# Configure your host
|
|
524
|
+
config.host = "myinstance.directus.io"
|
|
525
|
+
# Enable or disable debugging output
|
|
526
|
+
config.debugging = false
|
|
527
|
+
end
|
|
528
|
+
|
|
529
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
530
|
+
|
|
531
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
532
|
+
|
|
533
|
+
|
|
534
|
+
begin
|
|
535
|
+
#Returns table columns
|
|
536
|
+
result = api_instance.get_table_columns(table_id)
|
|
537
|
+
p result
|
|
538
|
+
rescue DirectusSDK::ApiError => e
|
|
539
|
+
puts "Exception when calling TablesApi->get_table_columns: #{e}"
|
|
540
|
+
end
|
|
541
|
+
```
|
|
542
|
+
|
|
543
|
+
### Parameters
|
|
544
|
+
|
|
545
|
+
Name | Type | Description | Notes
|
|
546
|
+
------------- | ------------- | ------------- | -------------
|
|
547
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
548
|
+
|
|
549
|
+
### Return type
|
|
550
|
+
|
|
551
|
+
[**GetTableColumns**](GetTableColumns.md)
|
|
552
|
+
|
|
553
|
+
### Authorization
|
|
554
|
+
|
|
555
|
+
[api_key](../README.md#api_key)
|
|
556
|
+
|
|
557
|
+
### HTTP request headers
|
|
558
|
+
|
|
559
|
+
- **Content-Type**: Not defined
|
|
560
|
+
- **Accept**: application/json
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
|
|
564
|
+
# **get_table_row**
|
|
565
|
+
> GetTableRow get_table_row(table_idrow_id)
|
|
566
|
+
|
|
567
|
+
Returns specific table row
|
|
568
|
+
|
|
569
|
+
### Example
|
|
570
|
+
```ruby
|
|
571
|
+
# load the gem
|
|
572
|
+
require 'directus_sdk'
|
|
573
|
+
# setup authorization
|
|
574
|
+
DirectusSDK.configure do |config|
|
|
575
|
+
# Configure API key authorization: api_key
|
|
576
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
577
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
578
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
579
|
+
# Configure your host
|
|
580
|
+
config.host = "myinstance.directus.io"
|
|
581
|
+
# Enable or disable debugging output
|
|
582
|
+
config.debugging = false
|
|
583
|
+
end
|
|
584
|
+
|
|
585
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
586
|
+
|
|
587
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
588
|
+
|
|
589
|
+
row_id = 56 # Integer | ID of row to return from rows
|
|
590
|
+
|
|
591
|
+
|
|
592
|
+
begin
|
|
593
|
+
#Returns specific table row
|
|
594
|
+
result = api_instance.get_table_row(table_idrow_id)
|
|
595
|
+
p result
|
|
596
|
+
rescue DirectusSDK::ApiError => e
|
|
597
|
+
puts "Exception when calling TablesApi->get_table_row: #{e}"
|
|
598
|
+
end
|
|
599
|
+
```
|
|
600
|
+
|
|
601
|
+
### Parameters
|
|
602
|
+
|
|
603
|
+
Name | Type | Description | Notes
|
|
604
|
+
------------- | ------------- | ------------- | -------------
|
|
605
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
606
|
+
**row_id** | **Integer**| ID of row to return from rows |
|
|
607
|
+
|
|
608
|
+
### Return type
|
|
609
|
+
|
|
610
|
+
[**GetTableRow**](GetTableRow.md)
|
|
611
|
+
|
|
612
|
+
### Authorization
|
|
613
|
+
|
|
614
|
+
[api_key](../README.md#api_key)
|
|
615
|
+
|
|
616
|
+
### HTTP request headers
|
|
617
|
+
|
|
618
|
+
- **Content-Type**: Not defined
|
|
619
|
+
- **Accept**: application/json
|
|
620
|
+
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
# **get_table_rows**
|
|
624
|
+
> GetTableRows get_table_rows(table_id)
|
|
625
|
+
|
|
626
|
+
Returns table rows
|
|
627
|
+
|
|
628
|
+
### Example
|
|
629
|
+
```ruby
|
|
630
|
+
# load the gem
|
|
631
|
+
require 'directus_sdk'
|
|
632
|
+
# setup authorization
|
|
633
|
+
DirectusSDK.configure do |config|
|
|
634
|
+
# Configure API key authorization: api_key
|
|
635
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
636
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
637
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
638
|
+
# Configure your host
|
|
639
|
+
config.host = "myinstance.directus.io"
|
|
640
|
+
# Enable or disable debugging output
|
|
641
|
+
config.debugging = false
|
|
642
|
+
end
|
|
643
|
+
|
|
644
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
645
|
+
|
|
646
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
begin
|
|
650
|
+
#Returns table rows
|
|
651
|
+
result = api_instance.get_table_rows(table_id)
|
|
652
|
+
p result
|
|
653
|
+
rescue DirectusSDK::ApiError => e
|
|
654
|
+
puts "Exception when calling TablesApi->get_table_rows: #{e}"
|
|
655
|
+
end
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
### Parameters
|
|
659
|
+
|
|
660
|
+
Name | Type | Description | Notes
|
|
661
|
+
------------- | ------------- | ------------- | -------------
|
|
662
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
663
|
+
|
|
664
|
+
### Return type
|
|
665
|
+
|
|
666
|
+
[**GetTableRows**](GetTableRows.md)
|
|
667
|
+
|
|
668
|
+
### Authorization
|
|
669
|
+
|
|
670
|
+
[api_key](../README.md#api_key)
|
|
671
|
+
|
|
672
|
+
### HTTP request headers
|
|
673
|
+
|
|
674
|
+
- **Content-Type**: Not defined
|
|
675
|
+
- **Accept**: application/json
|
|
676
|
+
|
|
677
|
+
|
|
678
|
+
|
|
679
|
+
# **get_tables**
|
|
680
|
+
> GetTables get_tables
|
|
681
|
+
|
|
682
|
+
Returns tables
|
|
683
|
+
|
|
684
|
+
### Example
|
|
685
|
+
```ruby
|
|
686
|
+
# load the gem
|
|
687
|
+
require 'directus_sdk'
|
|
688
|
+
# setup authorization
|
|
689
|
+
DirectusSDK.configure do |config|
|
|
690
|
+
# Configure API key authorization: api_key
|
|
691
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
692
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
693
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
694
|
+
# Configure your host
|
|
695
|
+
config.host = "myinstance.directus.io"
|
|
696
|
+
# Enable or disable debugging output
|
|
697
|
+
config.debugging = false
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
701
|
+
|
|
702
|
+
begin
|
|
703
|
+
#Returns tables
|
|
704
|
+
result = api_instance.get_tables
|
|
705
|
+
p result
|
|
706
|
+
rescue DirectusSDK::ApiError => e
|
|
707
|
+
puts "Exception when calling TablesApi->get_tables: #{e}"
|
|
708
|
+
end
|
|
709
|
+
```
|
|
710
|
+
|
|
711
|
+
### Parameters
|
|
712
|
+
This endpoint does not need any parameter.
|
|
713
|
+
|
|
714
|
+
### Return type
|
|
715
|
+
|
|
716
|
+
[**GetTables**](GetTables.md)
|
|
717
|
+
|
|
718
|
+
### Authorization
|
|
719
|
+
|
|
720
|
+
[api_key](../README.md#api_key)
|
|
721
|
+
|
|
722
|
+
### HTTP request headers
|
|
723
|
+
|
|
724
|
+
- **Content-Type**: Not defined
|
|
725
|
+
- **Accept**: application/json
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
# **update_column**
|
|
730
|
+
> update_column(table_idcolumn_name, opts)
|
|
731
|
+
|
|
732
|
+
Update column
|
|
733
|
+
|
|
734
|
+
### Example
|
|
735
|
+
```ruby
|
|
736
|
+
# load the gem
|
|
737
|
+
require 'directus_sdk'
|
|
738
|
+
# setup authorization
|
|
739
|
+
DirectusSDK.configure do |config|
|
|
740
|
+
# Configure API key authorization: api_key
|
|
741
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
742
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
743
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
744
|
+
# Configure your host
|
|
745
|
+
config.host = "myinstance.directus.io"
|
|
746
|
+
# Enable or disable debugging output
|
|
747
|
+
config.debugging = false
|
|
748
|
+
end
|
|
749
|
+
|
|
750
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
751
|
+
|
|
752
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
753
|
+
|
|
754
|
+
column_name = "column_name_example" # String | Name of column to return
|
|
755
|
+
|
|
756
|
+
opts = {
|
|
757
|
+
data_type: "data_type_example", # String | The datatype of the column, eg: INT
|
|
758
|
+
ui: "ui_example", # String | The Directus Interface to use for this column
|
|
759
|
+
hidden_input: true, # BOOLEAN | Whether the column will be hidden (globally) on the Edit Item page
|
|
760
|
+
hidden_list: true, # BOOLEAN | Whether the column will be hidden (globally) on the Item Listing page
|
|
761
|
+
required: true, # BOOLEAN | Whether the column is required. If required, the interface's validation function will be triggered
|
|
762
|
+
sort: 56, # Integer | The sort order of the column used to override the column order in the schema
|
|
763
|
+
comment: "comment_example", # String | A helpful note to users for this column
|
|
764
|
+
relationship_type: "relationship_type_example", # String | The column's relationship type (only used when storing relational data) eg: ONETOMANY, MANYTOMANY or MANYTOONE
|
|
765
|
+
related_table: "related_table_example", # String | The table name this column is related to (only used when storing relational data)
|
|
766
|
+
junction_table: "junction_table_example", # String | The pivot/junction table that joins the column's table with the related table (only used when storing relational data)
|
|
767
|
+
junction_key_left: "junction_key_left_example", # String | The column name in junction that is related to the column's table (only used when storing relational data)
|
|
768
|
+
junction_key_right: "junction_key_right_example" # String | The column name in junction that is related to the related table (only used when storing relational data)
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
begin
|
|
772
|
+
#Update column
|
|
773
|
+
api_instance.update_column(table_idcolumn_name, opts)
|
|
774
|
+
rescue DirectusSDK::ApiError => e
|
|
775
|
+
puts "Exception when calling TablesApi->update_column: #{e}"
|
|
776
|
+
end
|
|
777
|
+
```
|
|
778
|
+
|
|
779
|
+
### Parameters
|
|
780
|
+
|
|
781
|
+
Name | Type | Description | Notes
|
|
782
|
+
------------- | ------------- | ------------- | -------------
|
|
783
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
784
|
+
**column_name** | **String**| Name of column to return |
|
|
785
|
+
**data_type** | **String**| The datatype of the column, eg: INT | [optional]
|
|
786
|
+
**ui** | **String**| The Directus Interface to use for this column | [optional]
|
|
787
|
+
**hidden_input** | **BOOLEAN**| Whether the column will be hidden (globally) on the Edit Item page | [optional]
|
|
788
|
+
**hidden_list** | **BOOLEAN**| Whether the column will be hidden (globally) on the Item Listing page | [optional]
|
|
789
|
+
**required** | **BOOLEAN**| Whether the column is required. If required, the interface's validation function will be triggered | [optional]
|
|
790
|
+
**sort** | **Integer**| The sort order of the column used to override the column order in the schema | [optional]
|
|
791
|
+
**comment** | **String**| A helpful note to users for this column | [optional]
|
|
792
|
+
**relationship_type** | **String**| The column's relationship type (only used when storing relational data) eg: ONETOMANY, MANYTOMANY or MANYTOONE | [optional]
|
|
793
|
+
**related_table** | **String**| The table name this column is related to (only used when storing relational data) | [optional]
|
|
794
|
+
**junction_table** | **String**| The pivot/junction table that joins the column's table with the related table (only used when storing relational data) | [optional]
|
|
795
|
+
**junction_key_left** | **String**| The column name in junction that is related to the column's table (only used when storing relational data) | [optional]
|
|
796
|
+
**junction_key_right** | **String**| The column name in junction that is related to the related table (only used when storing relational data) | [optional]
|
|
797
|
+
|
|
798
|
+
### Return type
|
|
799
|
+
|
|
800
|
+
nil (empty response body)
|
|
801
|
+
|
|
802
|
+
### Authorization
|
|
803
|
+
|
|
804
|
+
[api_key](../README.md#api_key)
|
|
805
|
+
|
|
806
|
+
### HTTP request headers
|
|
807
|
+
|
|
808
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
809
|
+
- **Accept**: application/json
|
|
810
|
+
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
# **update_row**
|
|
814
|
+
> update_row(table_idrow_idcustom_data)
|
|
815
|
+
|
|
816
|
+
Update row
|
|
817
|
+
|
|
818
|
+
### Example
|
|
819
|
+
```ruby
|
|
820
|
+
# load the gem
|
|
821
|
+
require 'directus_sdk'
|
|
822
|
+
# setup authorization
|
|
823
|
+
DirectusSDK.configure do |config|
|
|
824
|
+
# Configure API key authorization: api_key
|
|
825
|
+
config.api_key['access_token'] = 'YOUR API KEY'
|
|
826
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
827
|
+
#config.api_key_prefix['access_token'] = 'Bearer'
|
|
828
|
+
# Configure your host
|
|
829
|
+
config.host = "myinstance.directus.io"
|
|
830
|
+
# Enable or disable debugging output
|
|
831
|
+
config.debugging = false
|
|
832
|
+
end
|
|
833
|
+
|
|
834
|
+
api_instance = DirectusSDK::TablesApi.new
|
|
835
|
+
|
|
836
|
+
table_id = "table_id_example" # String | ID of table to return rows from
|
|
837
|
+
|
|
838
|
+
row_id = 56 # Integer | ID of row to return from rows
|
|
839
|
+
|
|
840
|
+
custom_data = "custom_data_example" # String | Data based on your specific schema eg: active=1&title=LoremIpsum
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
begin
|
|
844
|
+
#Update row
|
|
845
|
+
api_instance.update_row(table_idrow_idcustom_data)
|
|
846
|
+
rescue DirectusSDK::ApiError => e
|
|
847
|
+
puts "Exception when calling TablesApi->update_row: #{e}"
|
|
848
|
+
end
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
### Parameters
|
|
852
|
+
|
|
853
|
+
Name | Type | Description | Notes
|
|
854
|
+
------------- | ------------- | ------------- | -------------
|
|
855
|
+
**table_id** | **String**| ID of table to return rows from |
|
|
856
|
+
**row_id** | **Integer**| ID of row to return from rows |
|
|
857
|
+
**custom_data** | **String**| Data based on your specific schema eg: active=1&title=LoremIpsum |
|
|
858
|
+
|
|
859
|
+
### Return type
|
|
860
|
+
|
|
861
|
+
nil (empty response body)
|
|
862
|
+
|
|
863
|
+
### Authorization
|
|
864
|
+
|
|
865
|
+
[api_key](../README.md#api_key)
|
|
866
|
+
|
|
867
|
+
### HTTP request headers
|
|
868
|
+
|
|
869
|
+
- **Content-Type**: application/x-www-form-urlencoded
|
|
870
|
+
- **Accept**: application/json
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
|