Files
few-line-engine/out/js/docs/QueriesApi.md

240 lines
6.5 KiB
Markdown

# LowCodeEngineApi.QueriesApi
All URIs are relative to *http://localhost:3000*
Method | HTTP request | Description
------------- | ------------- | -------------
[**queryCreatePost**](QueriesApi.md#queryCreatePost) | **POST** /query/create | Create query
[**queryDeleteIdDelete**](QueriesApi.md#queryDeleteIdDelete) | **DELETE** /query/delete/{id} | Delete query
[**queryRunIdPost**](QueriesApi.md#queryRunIdPost) | **POST** /query/run/{id} | Run query
[**queryUpdateIdPost**](QueriesApi.md#queryUpdateIdPost) | **POST** /query/update/{id} | Update query
## queryCreatePost
> Query queryCreatePost(queryCreatePostRequest)
Create query
Create a new query in the project
### 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.QueriesApi();
let queryCreatePostRequest = new LowCodeEngineApi.QueryCreatePostRequest(); // QueryCreatePostRequest |
apiInstance.queryCreatePost(queryCreatePostRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**queryCreatePostRequest** | [**QueryCreatePostRequest**](QueryCreatePostRequest.md)| |
### Return type
[**Query**](Query.md)
### Authorization
[ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## queryDeleteIdDelete
> queryDeleteIdDelete(id)
Delete query
Delete an existing query
### Example
```javascript
import LowCodeEngineApi from 'low_code_engine_api';
let defaultClient = LowCodeEngineApi.ApiClient.instance;
// Configure API key authorization: QueryGuard
let QueryGuard = defaultClient.authentications['QueryGuard'];
QueryGuard.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//QueryGuard.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.QueriesApi();
let id = "id_example"; // String | Query ID
apiInstance.queryDeleteIdDelete(id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| Query ID |
### Return type
null (empty response body)
### Authorization
[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: Not defined
## queryRunIdPost
> Object queryRunIdPost(id, body, opts)
Run query
Execute a query with provided data
### Example
```javascript
import LowCodeEngineApi from 'low_code_engine_api';
let defaultClient = LowCodeEngineApi.ApiClient.instance;
// Configure API key authorization: QueryGuard
let QueryGuard = defaultClient.authentications['QueryGuard'];
QueryGuard.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//QueryGuard.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.QueriesApi();
let id = "id_example"; // String | Query ID
let body = {key: null}; // Object |
let opts = {
'xTraceId': "xTraceId_example" // String | Trace ID for logging
};
apiInstance.queryRunIdPost(id, body, opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| Query ID |
**body** | **Object**| |
**xTraceId** | **String**| Trace ID for logging | [optional]
### Return type
**Object**
### Authorization
[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json
## queryUpdateIdPost
> Query queryUpdateIdPost(id, queryUpdateIdPostRequest)
Update query
Update an existing query
### Example
```javascript
import LowCodeEngineApi from 'low_code_engine_api';
let defaultClient = LowCodeEngineApi.ApiClient.instance;
// Configure API key authorization: QueryGuard
let QueryGuard = defaultClient.authentications['QueryGuard'];
QueryGuard.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//QueryGuard.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.QueriesApi();
let id = "id_example"; // String | Query ID
let queryUpdateIdPostRequest = new LowCodeEngineApi.QueryUpdateIdPostRequest(); // QueryUpdateIdPostRequest |
apiInstance.queryUpdateIdPost(id, queryUpdateIdPostRequest, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**id** | **String**| Query ID |
**queryUpdateIdPostRequest** | [**QueryUpdateIdPostRequest**](QueryUpdateIdPostRequest.md)| |
### Return type
[**Query**](Query.md)
### Authorization
[QueryGuard](../README.md#QueryGuard), [ApiKeyAuth](../README.md#ApiKeyAuth)
### HTTP request headers
- **Content-Type**: application/json
- **Accept**: application/json