Skip to main content

Usage

This document explains the basic usage of the Hexabase API.

Overview

Hexabase API is an Application Programming Interface for controlling enterprise BaaS (Backend as a Service).

Version

Version 0

Basic operation

Advance preparation

Get API token

  • In this API, users are specified using the login API. Each API will be executed according to the privileges this user has.
  • To use this API, first run the login API to obtain a token.
  • When executing each API except the login API, specify the token in the HTTP request header as follows
Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(Issued token)

Display ID (display_id)

  • Display ID (display_id) refers to the ID that can be specified from the Hexabase setting screen.

  • For APIs that support display IDs (display_id), you can specify the ID entered from the screen as part of the URL or payload, such as app-id, datastore-id, field-id, etc.

  • For more information, see Development guide > Features > Designation by ID.

Error code

  • Returns an error code when an error occurs.
  • Please refer here for error codes.

API list

To use this API, first run the login API to obtain a token.

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
1LoginLoginPOST/api/v0/loginLogin to the systemv0-
60LogoutLogoutPOST/api/v0/users/logoutLogout from the systemv0-

Unauthorized API

NoAPI NameAPI nameMethodURIPurposeversionSupport for display ID(display_id)
1UnauthorizedCallExecute target API without authentication tokenPOST/api/v0/auth/unauthorized-callUse a whitelist to execute the target API without an authentication tokenv0-

A "workspace" is an area where Hexabase applications are organized. Prepare a workspace according to the type and content of your business, and organize multiple business applications. For workspace-related APIs, please refer here.

"Group" is a function that exists in one tree structure in the workspace and organizes users according to their roles. Roles can also be assigned to groups.

Get group list

NoAPI NameAPI nameMethodURIPurposeversionSupport for display ID(display_id)
49GetGroupGet group informationGET/api/v0/groups/:group-idGet the specified group information and a list of groups under itv0-
4GetGroupTreeGet group tree informationGET/api/v0/grouptreeGet group information in the workspace in JSON tree formatv0-

Register, modify, and delete groups

NoAPI NameAPI nameMethodURIPurposeversionSupport for display ID(display_id)
5CreateGroupCreate new groupPOST/api/v0/workspaces/:workspace-id/groups/:parent-group-idCreate a new group under the specified groupv0-
44CreateTopGroupCreate a new group (Level 1)POST/api/v0/workspaces/:workspace-id/groupsCreate a new group on the first levelv0-
6UpdateGroupUpdate GroupPUT/api/v0/groups/:group-idUpdate specified group informationv0-
7DeleteGroupDelete groupDELETE/api/v0/groups/:group-idDelete the specified groupv0-

A "user" is an account that can be logged in using an email address as an ID. Must belong to one of the groups in the workspace. To add users to Hexabase, you need to register them in a group and then invite them to your workspace.

Inviting users - initial registration

For initial user registration, please refer here.

Login user API

For APIs related to viewing and changing logged-in users, please refer here.

User list

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
46GetUsersInGroupGet users in groupGET/api/v0/groups/:group-id/usersGet a list of users for a specified groupv0-
50GetUsersInWorkspaceGet users in groupGET/api/v0/workspaces/:workspace-id/usersGet the list of users in the specified workspace(old)-
10GetAllUsersInWorkspaceGet all users of workspaceGET/api/v0/users/all/g/:group-idGet a list of all users in the workspacev0-

Adding and deleting users

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
47AddUserAdd userPOST/api/v0/usersCreate new user in groupv0-
51RemoveUserRemove userDELETE/api/v0/usersRemove user from groupv0-
52UserInviteUser invitationPOST/api/v0/userinviteInvite usersv0-

Bulk registration of users by CSV data

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
9UserImportPOST/api/v0/userimportBulk import users via CSVα版-

Hexabase organizes databases, data reports, dashboards, etc. for each "application". When you create a new workplace, an application named "New Application" is created.

There are multiple databases (datastores) within an application.

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
11GetApplicationsAndDatastoresApplication and database listGET/api/v0/workspaces/:workspace-id/applicationsGet application list and datastore listv0-
NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
71GetRoleUsersGet a user with a roleGET/api/v0/applications/:app-id/roleusers/:role-idGet the users who own the specified rolev0-
65AddRoleToUserAdd a role to the userPOST/api/v0/applications/:app-id/userrolesAdd application roles to usersv0-
66RemoveRoleFromUserRemove role from userDELETE/api/v0/applications/:app-id/userrolesRemove application roles from usersv0-
63UpdateGroupRolesUpdate group rolePOST/api/v0/grouproles/:group-idDelete all roles associated with the group and assign new roles (replace)v0-
64AddGroupRolesAdd group rolePUT/api/v0/grouproles/:group-idAdd a role to the groupv0-
NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
ExecuteFunctionExecute the registered functionPOST/api/v0/applications/:project-id/functions/:function-idExecute a function registered in the applicationv0-

In Hexabase, each piece of data in the database is called an "item". One horizontal row of the table is an item. Corresponds to a general RDB record.

Search and display items

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
19ItemListItem ListPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/searchGet item listv0
68GetItemSearchConditionsGet item search conditionsPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/conditionsGet item search conditionsv0
70GetUserQueriesGet frequently used listGET/api/v0/applications/:app-id/queriesReturns a list of search conditions stored for each userv0
27GetItemDetailsItem detailsGET/api/v0/applications/:app-id/datastores/:datastore-id/items/details/:item-idGet item details and an action listv0

Registering, updating, and deleting items

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
69GetAutoNumberAutomatic numberingPOST/api/v0/applications/:app-id/datastores/:datastore-id/fields/:field-id/autonumAssign a number that can be used arbitrarily when registering an itemv0
UpdateAutoNumberAutomatic numbering field updatePOST/api/v0/applications/:app-id/datastores/:datastore-id/fields/:field-id/autonumUpdate automatic numbering values for specific fields in a datastorev0
20CreateItemNew item registrationPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/newCreate a new itemv0
21UpdateItemUpdate itemPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/edit/:item-idEdit itemv0
22DeleteItemDelete itemDELETE/api/v0/applications/:app-id/datastores/:datastore-id/items/delete/:item-idDelete 1 itemv0
23DeleteItemByConditionsDelete items by specifying conditionsDELETE/api/v0/applications/:app-id/datastores/:datastore-id/items/deleteDelete items in bulk by specifying conditionsv0

Take action on item

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
48CreateNewItemIDCreate new item IDPOST/api/v0/datastores/:datastore-id/items/create-idGet action_id for creating new itemv0-
33CreateItemWithItemIDCreate a new item by specifying item_idPOST/api/v0/items/:item-id/new-actions/:action-idSpecify action_id and execute a newly created action(Execute after No.69)v0-
13GetInputFieldsGet action registration formGET/api/v0/datastores/:datastore-id/actions/:action-id/fieldsGet field information available in an actionv0-
62ExecuteActionExecuting an actionPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/action/:action-idExecute specified actionv0
31ExecuteActionByActionIDExecuting an actionPOST/api/v0/items/:item-id/actions/:action-idExecute actionv0-
67ExecuteBulkActionExecute action by specifying conditionsPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/bulkaction/:action-idExecute specified actionv0
NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
28GetLinkedItemsGet linked itemsGET/api/v0/applications/:app-id/datastores/:datastore-id/items/links/:item-idGet list of items related to itemv0
24AddItemLinkCreate item linkPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/addlink/:item-idAdd links to related itemsv0
25UpdateItemLinkUpdate item linkPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/updatelink/:item-idUpdated links with related itemsv0
26DeleteItemLinkDelete item linkDELETE/api/v0/applications/:app-id/datastores/:datastore-id/items/dellink/:item-idDelete links with related itemsv0

Item history

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
34GetItemHistoriesGet item historyGET/api/v0/applications/:app-id/datastores/:datastore-id/items/histories/:item-idGet historyv0
45PostItemCommentPost item commentPOST/api/v0/applications/:app-id/datastores/:datastore-id/items/histories/:item-idRegister comment historyv0
72UpdateItemCommentUpdate item commentPUT/api/v0/applications/:app-id/datastores/:datastore-id/items/histories/:item-id/:history-idEdit comment historyv0
73DeleteItemCommentDelete item commentDELETE/api/v0/applications/:app-id/datastores/:datastore-id/items/histories/:item-id/:history-idDelete comment historyv0
NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
35GetFileGet file dataGET/api/v0/files/:file-idGet attachment datav0-
UploadFileAttachment UploadPOST/api/v0/filesUpload File and get accessible file_idv0-
DeleteFileDelete fileDELETE/api/v0/items/:item-id/fields/:field-id/attachments/:file-idDelete the specified filev0-
29UploadItemFileUpload item filePOST/api/v0/items/:item-id/fields/:field-id/attachmentsUpload file to attachment fieldv0-
30DeleteItemFileDelete item fileDELETE/api/v0/items/:item-id/fields/:field-id/attachments/:file-idDelete file in attachment fieldv0-
GetRestrictedFileGet File Data with permissionsGET/api/v0/files/:file-idGet attachment datav0-
UploadRestrictedFileAttachment upload with access permissionPOST/api/v0/items/:item-id/fields/:field-id/attachmentsUpload the file to the attachment fieldv0-
DeleteRestrictedFileDelete attachments you have access toDELETE/api/v0/items/:item-id/fields/:field-id/attachments/:file-idDelete the file in the attachment fieldv0-
GetPublicImagesObtain attachments (image data) that you do not have permission to accessGET/api/v0/public/images/:file-idGet an attached image file that can be made publicv0-
NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
16ImportItemsItem CSV importPOST/api/v0/applications/:app-id/datastores/:datastore-id/importImport CSV data to databasev0
17GetImportResultsGet import resultsGET/api/v0/datastores/:datastore-id/import/:idGet result of CSV importv0-
NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
37GetReportDataGet data reportGET/api/v0/applications/:app-id/reports/:report-idGet report datav0
38GetReportSearchConditionsGet data report search conditionsGET/api/v0/applications/:app-id/reports/:report-id/conditionsGet report search criteriav0
39GetReportDataByConditionsAcquire data report by specifying conditionsPOST/api/v0/applications/:app-id/reports/:report-id/filterObtain report data by specifying conditionsv0
NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
40GetChartDataChart data acquisitionGET/api/v0/applications/:app-id/charts/:chart-idGet chart datav0
41GetChartSearchConditionsGet chart search conditionsGET/api/v0/applications/:app-id/charts/:chart-id/conditionsチャートの検索条件を取得v0
42GetChartDataByConditionsAcquiring chart data by specifying conditionsPOST/api/v0/applications/:app-id/charts/:chart-id/filterObtain chart data by specifying conditionsv0

Other APIs

NoAPI NameAPI NameMethodURIPurposeversionSupport for display ID(display_id)
GetQueueListCheck task processing statusGET/api/v0/tasksCheck the status of the target task from the queued task processing.v0

API Tips