Directus Go SDK — Go Software Development Kit
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
README.md
activity_api.go
api_client.go
api_response.go
bookmarks_api.go
configuration.go
files_api.go
get_activity.go
get_activity_data.go
get_activity_meta.go
get_bookmark.go
get_bookmarks.go
get_bookmarks_data.go
get_bookmarks_meta.go
get_file.go
get_files.go
get_files_data.go
get_group.go
get_groups.go
get_groups_data.go
get_groups_data_data.go
get_groups_data_meta.go
get_message.go
get_messages.go
get_messages_data.go
get_messages_meta.go
get_messages_responses.go
get_preferences.go
get_preferences_data.go
get_privileges.go
get_privileges_data.go
get_privileges_for_table.go
get_settings.go
get_settings_data.go
get_settings_data_files.go
get_settings_data_global.go
get_settings_for.go
get_settings_for_meta.go
get_table.go
get_table_column.go
get_table_column_data.go
get_table_columns.go
get_table_columns_data.go
get_table_data.go
get_table_row.go
get_table_rows.go
get_table_rows_data.go
get_table_rows_meta.go
get_tables.go
get_tables_data.go
get_tables_meta.go
git_push.sh
groups_api.go
messages_api.go
preferences_api.go
settings_api.go
tables_api.go
utils_api.go

README.md

Directus Logo

Directus Go SDK

WebsiteDocsAPI ReferenceUser GuideDemoContribute

 

This codebase is a work-in-progress. The repo is here as a placeholder for anyone interested in contributing to the software development kit. Pull-requests and contributions are welcome!

 

Go API client for Directus

API for directus.io

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.1
  • Package version: 1.1.1
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

    "./directussdk"

Documentation for API Endpoints

All URIs are relative to https://myinstance.directus.io/api/1.1

Class Method HTTP request Description
ActivityApi GetActivity Get /activity Returns activity
BookmarksApi AddBookmark Post /bookmarks Create a column in a given table
BookmarksApi DeleteBookmark Delete /bookmarks/{bookmarkId} Deletes specific bookmark
BookmarksApi GetBookmark Get /bookmarks/{bookmarkId} Returns specific bookmark
BookmarksApi GetBookmarks Get /bookmarks Returns bookmarks
BookmarksApi GetBookmarksSelf Get /bookmarks/self Returns bookmarks of current user
FilesApi CreateFile Post /files Creates file
FilesApi GetFile Get /files/{fileId} Returns specific file by id
FilesApi GetFiles Get /files Returns files
FilesApi UpdateFile Put /files/{fileId} Creates file
GroupsApi AddGroup Post /groups Add a new group
GroupsApi AddPrivilege Post /privileges/{groupId} Create new table privileges for the specified user group
GroupsApi GetGroup Get /groups/{groupId} Returns specific group
GroupsApi GetGroups Get /groups Returns groups
GroupsApi GetPrivileges Get /privileges/{groupId} Returns group privileges
GroupsApi GetPrivilegesForTable Get /privileges/{groupId}/{tableNameOrPrivilegeId} Returns group privileges by tableName
GroupsApi UpdatePrivileges Put /privileges/{groupId}/{tableNameOrPrivilegeId} Update privileges by privilegeId
MessagesApi GetMessage Get /messages/{messageId} Returns specific message
MessagesApi GetMessages Get /messages/self Returns messages
PreferencesApi GetPreferences Get /tables/{tableId}/preferences Returns table preferences
PreferencesApi UpdatePreferences Put /tables/{tableId}/preferences Update table preferences
SettingsApi GetSettings Get /settings Returns settings
SettingsApi GetSettingsFor Get /settings/{collectionName} Returns settings for collection
SettingsApi UpdateSettings Put /settings/{collectionName} Update settings
TablesApi AddColumn Post /tables/{tableId}/columns Create a column in a given table
TablesApi AddRow Post /tables/{tableId}/rows Add a new row
TablesApi AddTable Post /tables Add a new table
TablesApi DeleteColumn Delete /tables/{tableId}/columns/{columnName} Delete row
TablesApi DeleteRow Delete /tables/{tableId}/rows/{rowId} Delete row
TablesApi DeleteTable Delete /tables/{tableId} Delete Table
TablesApi GetTable Get /tables/{tableId} Returns specific table
TablesApi GetTableColumn Get /tables/{tableId}/columns/{columnName} Returns specific table column
TablesApi GetTableColumns Get /tables/{tableId}/columns Returns table columns
TablesApi GetTableRow Get /tables/{tableId}/rows/{rowId} Returns specific table row
TablesApi GetTableRows Get /tables/{tableId}/rows Returns table rows
TablesApi GetTables Get /tables Returns tables
TablesApi UpdateColumn Put /tables/{tableId}/columns/{columnName} Update column
TablesApi UpdateRow Put /tables/{tableId}/rows/{rowId} Update row
UtilsApi GetHash Post /hash Get a hashed value
UtilsApi GetRandom Post /random Returns random alphanumeric string

Documentation For Models

Documentation For Authorization

api_key

  • Type: API key

Example

	auth := context.WithValue(context.TODO(), sw.ContextAPIKey, sw.APIKey{
		Key: "APIKEY",
		Prefix: "Bearer", // Omit if not necessary.
	})
    r, err := client.Service.Operation(auth, args)

Notes

Host name will need to be overridden in Configuration object, either via BasePath or Host depending on usage: Example

cfg := &Configuration{
  BasePath:      "https://myinstance.directus.io/api/1.1",
  DefaultHeader: make(map[string]string),
  UserAgent:     "Swagger-Codegen/1.0.0/go",
}

Or

cfg.Host = "myinstance.directus.io"

 


Directus is released under the GPLv3 license. RANGER Studio LLC owns all Directus trademarks and logos on behalf of our project's community. Copyright © 2006-2018, RANGER Studio LLC.