Dynamic ApiQL documentation
ApiQL project
This is an demo project of the ApiQL.net application.
The advantage of using this application is to build rest API (including documentation) for your existing MySQL database.
..and YES! ONLY in few minutes!!!
Generated endpoint: /_documentation. API examples below use https://v2.apiql.net/.
Overview
ApiQL exposes configured MySQL tables as REST-style endpoints. This documentation is generated at runtime, so endpoint and column changes become visible after editing the JSON config and restarting the service.
Service
| Item | Value |
|---|---|
| Documentation URL | /_documentation |
| Endpoint mode | allowed_actions |
| Configured endpoints | 2 |
| Default page size | 10 |
| Max page size | 100 |
Response shape
{
"error": false,
"status_text": "OK",
"status_code": 200,
"status_msg": "OK",
"endpoint_name": {
"page_info": {},
"data": []
}
}
Authentication
Requests must include a valid token in the query string. This service validates tokens from the configured MySQL token table and accepts only tokens with status = "valid".
curl "https://v2.apiql.net/endpoint_name?token=your_token"
Query options
| Option | Format | Purpose |
|---|---|---|
| Pagination | page=2&limit=20 | Returns a paginated list. limit cannot exceed the configured maximum. |
| Fields | field[table.column]=alias | Selects specific fields and optionally aliases them. |
| Filter | filter[column]=value | Adds exact-match filters. |
| Search | search[column]=value | Adds LIKE searches. |
| Sort | sort[column]=ASC | Sorts by a column. Accepted values are ASC and DESC. |
| Group | group[column]=column | Adds a GROUP BY expression. |
| Merge | merge[other_table.id]=table.other_id | Adds an inner join between two tables. |
| Add | add[other_table.foreign_id]=id | Loads one related row and adds it to each list item. |
/author
listaddeditdelete
Columns
| Field | Type | Null | Key | Default | Extra |
|---|---|---|---|---|---|
id | int | NO | PRI | auto_increment | |
author | varchar(200) | NO | |||
city | varchar(100) | YES | |||
country_code | varchar(2) | NO | |||
email | varchar(150) | NO | |||
linkedin_link | varchar(250) | YES | |||
github_link | varchar(200) | YES | |||
facebook_link | varchar(250) | YES |
List records
curl "https://v2.apiql.net/author?token=your_token&page=1&limit=10"Get one record
curl "https://v2.apiql.net/author/1?token=your_token"Filter, search and sort
curl "https://v2.apiql.net/author?token=your_token&filter[author]=value&sort[id]=DESC"Select fields
curl "https://v2.apiql.net/author?token=your_token&field[author.author]=author"/information
listaddeditdelete
Columns
| Field | Type | Null | Key | Default | Extra |
|---|---|---|---|---|---|
id | int | NO | PRI | auto_increment | |
property | varchar(100) | NO | |||
value | longtext | YES |
List records
curl "https://v2.apiql.net/information?token=your_token&page=1&limit=10"Get one record
curl "https://v2.apiql.net/information/1?token=your_token"Filter, search and sort
curl "https://v2.apiql.net/information?token=your_token&filter[property]=value&sort[id]=DESC"Select fields
curl "https://v2.apiql.net/information?token=your_token&field[information.property]=property"