439 lines
13 KiB
Markdown
439 lines
13 KiB
Markdown
# LowCodeEngineApi.DatabaseManagementApi
|
|
|
|
All URIs are relative to *http://localhost:3000*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**databaseColumnsDatabaseIdTableNameGet**](DatabaseManagementApi.md#databaseColumnsDatabaseIdTableNameGet) | **GET** /database/columns/{databaseId}/{tableName} | Get table columns
|
|
[**databaseCreatePost**](DatabaseManagementApi.md#databaseCreatePost) | **POST** /database/create | Create database
|
|
[**databaseMigrationCreatePost**](DatabaseManagementApi.md#databaseMigrationCreatePost) | **POST** /database/migration/create | Create migration
|
|
[**databaseMigrationDownDatabaseIdGet**](DatabaseManagementApi.md#databaseMigrationDownDatabaseIdGet) | **GET** /database/migration/down/{databaseId} | Run migrations down
|
|
[**databaseMigrationUpDatabaseIdGet**](DatabaseManagementApi.md#databaseMigrationUpDatabaseIdGet) | **GET** /database/migration/up/{databaseId} | Run migrations up
|
|
[**databaseNodeCreatePost**](DatabaseManagementApi.md#databaseNodeCreatePost) | **POST** /database/node/create | Add database node
|
|
[**databaseQueryDatabaseIdPost**](DatabaseManagementApi.md#databaseQueryDatabaseIdPost) | **POST** /database/query/{databaseId} | Run database query
|
|
[**databaseTablesDatabaseIdGet**](DatabaseManagementApi.md#databaseTablesDatabaseIdGet) | **GET** /database/tables/{databaseId} | Get database tables
|
|
|
|
|
|
|
|
## databaseColumnsDatabaseIdTableNameGet
|
|
|
|
> [Object] databaseColumnsDatabaseIdTableNameGet(databaseId, tableName)
|
|
|
|
Get table columns
|
|
|
|
Retrieve columns information for a specific table
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import LowCodeEngineApi from 'low_code_engine_api';
|
|
let defaultClient = LowCodeEngineApi.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new LowCodeEngineApi.DatabaseManagementApi();
|
|
let databaseId = "databaseId_example"; // String | Database ID
|
|
let tableName = "tableName_example"; // String | Table name
|
|
apiInstance.databaseColumnsDatabaseIdTableNameGet(databaseId, tableName, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**databaseId** | **String**| Database ID |
|
|
**tableName** | **String**| Table name |
|
|
|
|
### Return type
|
|
|
|
**[Object]**
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|
|
|
|
## databaseCreatePost
|
|
|
|
> Database databaseCreatePost(databaseCreatePostRequest)
|
|
|
|
Create database
|
|
|
|
Create a new database for a project
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import LowCodeEngineApi from 'low_code_engine_api';
|
|
let defaultClient = LowCodeEngineApi.ApiClient.instance;
|
|
// Configure API key authorization: AdminAuth
|
|
let AdminAuth = defaultClient.authentications['AdminAuth'];
|
|
AdminAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AdminAuth.apiKeyPrefix = 'Token';
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new LowCodeEngineApi.DatabaseManagementApi();
|
|
let databaseCreatePostRequest = new LowCodeEngineApi.DatabaseCreatePostRequest(); // DatabaseCreatePostRequest |
|
|
apiInstance.databaseCreatePost(databaseCreatePostRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**databaseCreatePostRequest** | [**DatabaseCreatePostRequest**](DatabaseCreatePostRequest.md)| |
|
|
|
|
### Return type
|
|
|
|
[**Database**](Database.md)
|
|
|
|
### Authorization
|
|
|
|
[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
|
|
## databaseMigrationCreatePost
|
|
|
|
> Migration databaseMigrationCreatePost(databaseMigrationCreatePostRequest)
|
|
|
|
Create migration
|
|
|
|
Create a new database migration
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import LowCodeEngineApi from 'low_code_engine_api';
|
|
let defaultClient = LowCodeEngineApi.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new LowCodeEngineApi.DatabaseManagementApi();
|
|
let databaseMigrationCreatePostRequest = new LowCodeEngineApi.DatabaseMigrationCreatePostRequest(); // DatabaseMigrationCreatePostRequest |
|
|
apiInstance.databaseMigrationCreatePost(databaseMigrationCreatePostRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**databaseMigrationCreatePostRequest** | [**DatabaseMigrationCreatePostRequest**](DatabaseMigrationCreatePostRequest.md)| |
|
|
|
|
### Return type
|
|
|
|
[**Migration**](Migration.md)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
|
|
## databaseMigrationDownDatabaseIdGet
|
|
|
|
> databaseMigrationDownDatabaseIdGet(databaseId)
|
|
|
|
Run migrations down
|
|
|
|
Rollback database migrations
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import LowCodeEngineApi from 'low_code_engine_api';
|
|
let defaultClient = LowCodeEngineApi.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new LowCodeEngineApi.DatabaseManagementApi();
|
|
let databaseId = "databaseId_example"; // String | Database ID
|
|
apiInstance.databaseMigrationDownDatabaseIdGet(databaseId, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully.');
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**databaseId** | **String**| Database ID |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: Not defined
|
|
|
|
|
|
## databaseMigrationUpDatabaseIdGet
|
|
|
|
> databaseMigrationUpDatabaseIdGet(databaseId)
|
|
|
|
Run migrations up
|
|
|
|
Execute pending database migrations
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import LowCodeEngineApi from 'low_code_engine_api';
|
|
let defaultClient = LowCodeEngineApi.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new LowCodeEngineApi.DatabaseManagementApi();
|
|
let databaseId = "databaseId_example"; // String | Database ID
|
|
apiInstance.databaseMigrationUpDatabaseIdGet(databaseId, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully.');
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**databaseId** | **String**| Database ID |
|
|
|
|
### Return type
|
|
|
|
null (empty response body)
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: Not defined
|
|
|
|
|
|
## databaseNodeCreatePost
|
|
|
|
> DatabaseNode databaseNodeCreatePost(databaseNodeCreatePostRequest)
|
|
|
|
Add database node
|
|
|
|
Add a new database node to the system
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import LowCodeEngineApi from 'low_code_engine_api';
|
|
let defaultClient = LowCodeEngineApi.ApiClient.instance;
|
|
// Configure API key authorization: AdminAuth
|
|
let AdminAuth = defaultClient.authentications['AdminAuth'];
|
|
AdminAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//AdminAuth.apiKeyPrefix = 'Token';
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new LowCodeEngineApi.DatabaseManagementApi();
|
|
let databaseNodeCreatePostRequest = new LowCodeEngineApi.DatabaseNodeCreatePostRequest(); // DatabaseNodeCreatePostRequest |
|
|
apiInstance.databaseNodeCreatePost(databaseNodeCreatePostRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**databaseNodeCreatePostRequest** | [**DatabaseNodeCreatePostRequest**](DatabaseNodeCreatePostRequest.md)| |
|
|
|
|
### Return type
|
|
|
|
[**DatabaseNode**](DatabaseNode.md)
|
|
|
|
### Authorization
|
|
|
|
[AdminAuth](../README.md#AdminAuth), [ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
|
|
## databaseQueryDatabaseIdPost
|
|
|
|
> Object databaseQueryDatabaseIdPost(databaseId, databaseQueryDatabaseIdPostRequest)
|
|
|
|
Run database query
|
|
|
|
Execute a SQL query on the database
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import LowCodeEngineApi from 'low_code_engine_api';
|
|
let defaultClient = LowCodeEngineApi.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new LowCodeEngineApi.DatabaseManagementApi();
|
|
let databaseId = "databaseId_example"; // String | Database ID
|
|
let databaseQueryDatabaseIdPostRequest = new LowCodeEngineApi.DatabaseQueryDatabaseIdPostRequest(); // DatabaseQueryDatabaseIdPostRequest |
|
|
apiInstance.databaseQueryDatabaseIdPost(databaseId, databaseQueryDatabaseIdPostRequest, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**databaseId** | **String**| Database ID |
|
|
**databaseQueryDatabaseIdPostRequest** | [**DatabaseQueryDatabaseIdPostRequest**](DatabaseQueryDatabaseIdPostRequest.md)| |
|
|
|
|
### Return type
|
|
|
|
**Object**
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
|
|
## databaseTablesDatabaseIdGet
|
|
|
|
> [String] databaseTablesDatabaseIdGet(databaseId)
|
|
|
|
Get database tables
|
|
|
|
Retrieve list of tables in a database
|
|
|
|
### Example
|
|
|
|
```javascript
|
|
import LowCodeEngineApi from 'low_code_engine_api';
|
|
let defaultClient = LowCodeEngineApi.ApiClient.instance;
|
|
// Configure API key authorization: ApiKeyAuth
|
|
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
|
|
ApiKeyAuth.apiKey = 'YOUR API KEY';
|
|
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
|
//ApiKeyAuth.apiKeyPrefix = 'Token';
|
|
|
|
let apiInstance = new LowCodeEngineApi.DatabaseManagementApi();
|
|
let databaseId = "databaseId_example"; // String | Database ID
|
|
apiInstance.databaseTablesDatabaseIdGet(databaseId, (error, data, response) => {
|
|
if (error) {
|
|
console.error(error);
|
|
} else {
|
|
console.log('API called successfully. Returned data: ' + data);
|
|
}
|
|
});
|
|
```
|
|
|
|
### Parameters
|
|
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**databaseId** | **String**| Database ID |
|
|
|
|
### Return type
|
|
|
|
**[String]**
|
|
|
|
### Authorization
|
|
|
|
[ApiKeyAuth](../README.md#ApiKeyAuth)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: Not defined
|
|
- **Accept**: application/json
|
|
|