Browse Source

docs: API documentation

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/350/head
Pranav C 4 years ago
parent
commit
f80fea2361
  1. 407
      packages/noco-doc/content/en/apis/graphql/gql-apis-generated.md
  2. 362
      packages/noco-doc/content/en/apis/rest/rest-apis-generated.md
  3. 11
      packages/noco-doc/content/en/demos.md
  4. 36
      packages/noco-doc/content/en/index.md
  5. 2
      packages/noco-doc/content/en/install.md
  6. 1
      packages/noco-doc/content/settings.json
  7. 2
      packages/noco-doc/nuxt.config.js
  8. BIN
      packages/noco-doc/static/architecture.png
  9. 1
      static/diagrams/architecture.drawio

407
packages/noco-doc/content/en/apis/graphql/apis-generated.md → packages/noco-doc/content/en/apis/graphql/gql-apis-generated.md

@ -95,7 +95,10 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
```
### TableNameList
#### Request
<code-group>
<code-block label="Request" active>
```
CountryList {
country_id
@ -103,7 +106,9 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
last_update
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -126,14 +131,19 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
"last_update": "1139978640000",
"CityCount": 1
}
]
}
}
```
</code-block>
</code-group>
#### List + where
<code-group>
<code-block label="Request" active>
##### Request
```
{
CountryList(where:"(country,like,United%)") {
@ -145,9 +155,10 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
```
[Usage : comparison operators](#comparison-operators)
##### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -174,15 +185,20 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
}
```
</code-block>
</code-group>
[Usage : comparison operators](#comparison-operators)
#### List + where + sort
<code-group>
<code-block label="Request" active>
##### Request
```
{
CountryList(where:"(country,like,United%)",sort:"-country") {
@ -194,7 +210,9 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
```
##### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -221,188 +239,21 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
}
```
</code-block>
</code-group>
# Features
* APIs
* Generates GraphQL APIs for **ANY** MySql, Postgres, MSSQL, Sqlite database :fire:
* Serves GraphQL queries irrespective of naming conventions of primary keys, foreign keys, tables etc :fire:
* Support for composite primary keys :fire:
* Usual suspects : CRUD, List, FindOne, Count, Exists, Distinct
* Pagination
* Sorting
* Column filtering - Fields :fire:
* Row filtering - Where :fire:
* Bulk insert, Bulk delete, Bulk read :fire:
* Relations - automatically detected
* Aggregate functions
* More
* Upload single file
* Upload multiple files
* Download file
* Authentication
* Access Control
# GraphQL API Overview
### Query
| **Resolver** | **Arguments** | **Returns** | **Description** |
|---|---|---|---|
| [TableName**List**](#tablenamelist) | where: String, limit: Int, offset: Int, sort: String | [TableName] | List of table rows |
| [TableName**Read**](#tablenameread) | id:String | TableName | Get row by primary key |
| [TableName**Exists**](#tablenameexists) | id: String | Boolean | Check row exists by primary key |
| [TableName**FindOne**](#tablenamefindone) | where: String | TableName | Find row by where conditions |
| [TableName**Count**](#tablenamecount) | where: String | Int | Get rows count |
| [TableName**Distinct**](#tablenamedistinct) | columnName: String, where: String, limit: Int, offset: Int, sort: String | [TableName] | Get distinct rows based on provided column names |
| [TableName**GroupBy**](#tablenamegroupby) | fields: String, having: String, limit: Int, offset: Int, sort: String | [TableNameGroupBy] | Group rows by provided columns |
| [TableName**Aggregate**](#tablenameaggregate) | columnName: String!, having: String, limit: Int, offset: Int, sort: String, func: String! | [TableNameAggregate] | Do aggregation based on provided column name aggregate function |
| [TableName**Distribution**](#tablenamedistribution) | min: Int, max: Int, step: Int, steps: String, columnName: String! | [distribution] | Get distributed list |
### Mutations
| **Resolver** | **Arguments** | **Returns** | **Description** |
|---|---|---|---|
| [TableName**Create**](#tablenamecreate) | data:TableNameInput | TableName | Insert row into table |
| [TableName**Update**](#tablenameupdate) | id:String,data:TableNameInput | TableName | Update table row using primary key |
| [TableName**Delete**](#tablenamedelete) | id:String | TableName | Delete table row using primary id |
| [TableName**CreateBulk**](#tabelenamecreatebulk) | data: [TableNameInput] | [Int] | Bulk row insert |
| [TableName**UpdateBulk**](#tablenamebulk) | data: [TableNameInput] | [Int] | Bulk row update |
| [TableName**DeleteBulk**](#tablenamedeletebulk) | data: [TableNameInput] | [Int] | Bulk row delete |
## Query Arguments
| **Param** | **Description** | **Default value** |**Example Value**|
|---|---|---|---|
| where | Logical Expression | | `(colName,eq,colValue)~or(colName2,gt,colValue2)` <br />[Usage: Comparison operators](#comparison-operators) <br />[Usage: Logical operators](#logical-operators) |
| limit | Number of rows to get(SQL limit value) | 10 | 20 |
| offset | Offset for pagination(SQL offset value) | 0 | 20 |
| sort | Sort column name, where use `-` as prefix for descending sort | | column_name |
| fields | Required column names in result | * | column_name_1,column_name_2 |
#### Comparison operators
```
eq - '=' - (colName,eq,colValue)
not - '!=' - (colName,ne,colValue)
gt - '>' - (colName,gt,colValue)
ge - '>=' - (colName,ge,colValue)
lt - '<' - (colName,lt,colValue)
le - '<=' - (colName,le,colValue)
is - 'is' - (colName,is,true/false/null)
isnot - 'is not' - (colName,isnot,true/false/null)
in - 'in' - (colName,in,val1,val2,val3,val4)
btw - 'between' - (colName,btw,val1,val2)
nbtw - 'not between'- (colName,nbtw,val1,val2)
like - 'like' - (colName,like,%name)
```
#### Example use of comparison operators - complex example
```
PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,2000))")
```
#### Logical operators
```
~or - 'or'
~and - 'and'
~not - 'not'
```
### TableNameList
#### Request
```
CountryList {
country_id
country
last_update
}
```
#### Response
```json
{
"data": {
"CountryList": [
{
"country_id": 1,
"country": "Afghanistan",
"last_update": "1139978640000",
"CityCount": 1
},
{
"country_id": 2,
"country": "Algeria",
"last_update": "1139978640000",
"CityCount": 3
},
{
"country_id": 3,
"country": "American Samoa",
"last_update": "1139978640000",
"CityCount": 1
}
}
```
#### List + where
##### Request
```
{
CountryList(where:"(country,like,United%)") {
country_id
country
last_update
CityCount
}
}
```
[Usage : comparison operators](#comparison-operators)
##### Response
```json
{
"data": {
"CountryList": [
{
"country_id": 101,
"country": "United Arab Emirates",
"last_update": "1139958840000",
"CityCount": 3
},
{
"country_id": 102,
"country": "United Kingdom",
"last_update": "1139958840000",
"CityCount": 8
},
{
"country_id": 103,
"country": "United States",
"last_update": "1139958840000",
"CityCount": 35
}
]
}
}
```
#### List + where + sort + offset
<code-group>
<code-block label="Request" active>
##### Request
```
{
CountryList(where:"(country,like,United%)",sort:"-country",offset:1) {
@ -414,7 +265,9 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
```
##### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -435,14 +288,17 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
}
```
</code-block>
</code-group>
#### List + limit
##### Request
<code-group>
<code-block label="Request" active>
```
{
CountryList(limit:6) {
@ -451,7 +307,9 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
```
##### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -478,15 +336,20 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#query)
[](#query)
### TableNameRead
#### Request
<code-group>
<code-block label="Request" active>
```
CountryRead(id:"1") {
country_id
@ -495,7 +358,9 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
```
#### Response
</code-block>
<code-block label="Response">
```json
"data": {
"CountryRead": {
@ -506,26 +371,38 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#query)
[](#query)
### TableNameExists
#### Request
<code-group>
<code-block label="Request" active>
```
CountryExists(id:"1")
```
#### Response
</code-block>
<code-block label="Response">
```json
"data": {
"CountryExists": true
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#query)
[](#query)
### TableNameFindOne
#### Request
<code-group>
<code-block label="Request" active>
```
CountryFindOne(where:"(country_id,eq,1)") {
country_id
@ -535,7 +412,9 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
```
#### Response
</code-block>
<code-block label="Response">
```json
"data": {
"CountryFindOne": {
@ -546,26 +425,41 @@ PaymentList(where:"(checkNumber,eq,JM555205)~or((amount,gt,200)~and(amount,lt,20
}
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#query)
[](#query)
### TableNameCount
#### Request
<code-group>
<code-block label="Request" active>
```
CountryCount
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
"CountryCount": 109
}
}
```
[:arrow_heading_up:](#query)
</code-block>
</code-group>
[](#query)
### TableNameDistinct
#### Request
<code-group>
<code-block label="Request" active>
```
{
CountryDistinct(columnName:"last_update",limit:3) {
@ -574,7 +468,9 @@ CountryCount
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -592,11 +488,16 @@ CountryCount
}
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#query)
[](#query)
### TableNameGroupBy
#### Request
<code-group>
<code-block label="Request" active>
```
{
CountryGroupBy(fields:"last_update",limit:1) {
@ -608,7 +509,9 @@ CountryCount
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -623,11 +526,16 @@ CountryCount
}
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#query)
[](#query)
### TableNameAggregate
#### Request
<code-group>
<code-block label="Request" active>
```
{
PaymentAggregate(columnName:"amount",func:"min,max,avg,count") {
@ -638,7 +546,9 @@ CountryCount
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -653,10 +563,12 @@ CountryCount
}
```
[:arrow_heading_up:](#query)
[](#query)
### TableNameDistribution
#### Request
<code-group>
<code-block label="Request" active>
```
{
PaymentDistribution (columnName:"amount"){
@ -666,7 +578,9 @@ CountryCount
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -688,10 +602,15 @@ CountryCount
}
```
[:arrow_heading_up:](#mutations)
</code-block>
</code-group>
[](#mutations)
### TableNameCreate
#### Request
<code-group>
<code-block label="Request" active>
```
mutation {
CountryCreate(data: {country: "test"}) {
@ -703,7 +622,9 @@ mutation {
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -717,10 +638,15 @@ mutation {
}
```
[:arrow_heading_up:](#mutations)
</code-block>
</code-group>
[](#mutations)
### TableNameUpdate
#### Request
<code-group>
<code-block label="Request" active>
```
mutation {
CountryUpdate(data: {country: "test_new"}, id: "10264") {
@ -732,7 +658,9 @@ mutation {
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -746,10 +674,15 @@ mutation {
}
```
[:arrow_heading_up:](#mutations)
</code-block>
</code-group>
[](#mutations)
### TableNameDelete
#### Request
<code-group>
<code-block label="Request" active>
```
mutation {
CountryDelete(id: "10264") {
@ -761,7 +694,9 @@ mutation {
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -774,18 +709,25 @@ mutation {
}
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#mutations)
[](#mutations)
### TableNameCreateBulk
#### Request
<code-group>
<code-block label="Request" active>
```
mutation {
CountryCreateBulk(data:[{country:"test 2"},{country:"test 3"}])
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -795,18 +737,25 @@ mutation {
}
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#mutations)
[](#mutations)
### TableNameUpdateBulk
#### Request
<code-group>
<code-block label="Request" active>
```
mutation {
CountryUpdateBulk(data: [{country: "test 2", country_id: 10265}, {country: "test 3", country_id: 10266}])
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -817,18 +766,25 @@ mutation {
}
}
```
</code-block>
</code-group>
[:arrow_heading_up:](#mutations)
[](#mutations)
### TableNameDeleteBulk
#### Request
<code-group>
<code-block label="Request" active>
```
mutation {
CountryDeleteBulk(data: [{country_id: 10265}, {country_id: 10266}])
}
```
#### Response
</code-block>
<code-block label="Response">
```json
{
"data": {
@ -839,3 +795,6 @@ mutation {
}
}
```
</code-block>
</code-group>

362
packages/noco-doc/content/en/apis/rest/apis-generated.md → packages/noco-doc/content/en/apis/rest/rest-apis-generated.md

@ -214,7 +214,7 @@ GET /api/v1/country?where=(country,like,United%)&sort=-country
```
</code-block>
<code-block label="Response" active>
<code-block label="Response">
```
[
@ -242,10 +242,16 @@ GET /api/v1/country?where=(country,like,United%)&sort=-country
#### List + where + sort + offset
##### Request
``` GET /api/v1/country?where=(country,like,United%)&sort=-country&offset=1```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country?where=(country,like,United%)&sort=-country&offset=1
```
</code-block>
<code-block label="Response">
##### Response
```json
[
{
@ -260,12 +266,23 @@ GET /api/v1/country?where=(country,like,United%)&sort=-country
}
]
```
</code-block>
</code-group>
#### List + limit
##### Request
``` GET /api/v1/country?limit=6```
##### Response
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country?limit=6
```
</code-block>
<code-block label="Response">
```json
[
{
@ -300,16 +317,26 @@ GET /api/v1/country?where=(country,like,United%)&sort=-country
}
]
```
</code-block>
</code-group>
[](#api-overview)
### Get By Primary Key
##### Request
`GET /api/v1/country/1`
##### Response
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country/1
```
</code-block>
<code-block label="Response">
```json
{
"country_id": 1,
@ -317,20 +344,32 @@ GET /api/v1/country?where=(country,like,United%)&sort=-country
"last_update": "2006-02-14T23:14:00.000Z"
}
```
</code-block>
</code-group>
[](#api-overview)
### Create
##### Request
<code-group>
<code-block label="Request" active>
```
POST /api/v1/country
```
```json
{
"country": "Afghanistan"
}
```
##### Response
</code-block>
<code-block label="Response">
```json
{
"country_id": 1,
@ -338,21 +377,28 @@ POST /api/v1/country
"last_update": "2006-02-14T23:14:00.000Z"
}
```
</code-block>
</code-group>
[](#api-overview)
### Update
##### Request
```
PUT /api/v1/country/1
<code-group>
<code-block label="Request" active>
```PUT /api/v1/country/1```
```
{
"country": "Afghanistan1"
}
```
##### Response
</code-block>
<code-block label="Response">
```json
{
"country_id": 1,
@ -360,31 +406,50 @@ PUT /api/v1/country/1
"last_update": "20020-02-14T23:14:00.000Z"
}
```
</code-block>
</code-group>
[](#api-overview)
### Exists
##### Request
```DELETE /api/v1/country/1/exists```
<code-group>
<code-block label="Request" active>
```
DELETE /api/v1/country/1/exists
```
</code-block>
<code-block label="Response">
#### Response
```json
true
```
</code-block>
</code-group>
[](#api-overview)
### Delete
##### Request
```DELETE /api/v1/country/1```
##### Response
<code-group>
<code-block label="Request" active>
```
DELETE /api/v1/country/1
```
</code-block>
<code-block label="Response">
```json
1
```
</code-block>
</code-group>
@ -393,30 +458,42 @@ PUT /api/v1/country/1
### Find One
##### Request
```GET /api/v1/country/findOne?where=(country_id,eq,1)```
<code-group>
<code-block label="Request" active>
##### Response
```json
```
GET /api/v1/country/findOne?where=(country_id,eq,1)
```
</code-block>
<code-block label="Response">
```json
{
"country_id": 1,
"country": "Afghanistan",
"last_update": "2006-02-14T23:14:00.000Z"
}
```
</code-block>
</code-group>
[](#api-overview)
### Group By
##### Request
```GET /api/v1/country/groupby/last_update```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country/groupby/last_update
```
##### Response
```json
</code-block>
<code-block label="Response">
```json
[
{
"count": 109,
@ -432,16 +509,24 @@ PUT /api/v1/country/1
}
]
```
</code-block>
</code-group>
[](#api-overview)
### Distribution
##### Request
```GET /api/v1/payment/distribution/amount```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/payment/distribution/amount
```
</code-block>
<code-block label="Response">
##### Response
```json
[
{
@ -458,15 +543,24 @@ PUT /api/v1/country/1
}
]
```
</code-block>
</code-group>
[](#api-overview)
### Distinct
##### Request
```GET /api/v1/country/distinct/last_update```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country/distinct/last_update
```
</code-block>
<code-block label="Response">
##### Response
```json
[
{
@ -483,16 +577,24 @@ PUT /api/v1/country/1
}
]
```
</code-block>
</code-group>
[](#api-overview)
### Aggregate
##### Request
```GET /api/v1/payment/aggregate/amount?func=min,max,avg,sum,count```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/payment/aggregate/amount?func=min,max,avg,sum,count
```
</code-block>
<code-block label="Response">
##### Response
```json
[
{
@ -504,18 +606,25 @@ PUT /api/v1/country/1
}
]
```
</code-block>
</code-group>
[](#api-overview)
### Count
##### Request
```GET /api/v1/country/count```
<code-group>
<code-block label="Request" active>
##### Response
```json
```
GET /api/v1/country/count
```
</code-block>
<code-block label="Response">
```json
{
"count": 161
}
@ -525,9 +634,11 @@ PUT /api/v1/country/1
### Bulk Insert
##### Request
```POST /api/v1/country/bulk
<code-group>
<code-block label="Request" active>
```POST /api/v1/country/bulk```
```json
[
{
"country": "test 1"
@ -538,19 +649,25 @@ PUT /api/v1/country/1
]
```
##### Response
</code-block>
<code-block label="Response">
```json
[
10262
]
```
</code-block>
</code-group>
[](#api-overview)
### Bulk Update
##### Request
```PUT /api/v1/country/bulk
<code-group>
<code-block label="Request" active>
```PUT /api/v1/country/bulk```
```json
[
{
"country_id" : 10261,
@ -561,22 +678,28 @@ PUT /api/v1/country/1
"country": "test 4"
}
]
```
##### Response
</code-block>
<code-block label="Response">
```json
[
1,
1
]
```
</code-block>
</code-group>
[](#api-overview)
### Bulk Delete
##### Request
```DELETE /api/v1/country/bulk
<code-group>
<code-block label="Request" active>
```DELETE /api/v1/country/bulk```
```json
[
{
"country_id" : 10261
@ -585,24 +708,33 @@ PUT /api/v1/country/1
"country_id" : 10262
}
]
```
##### Response
</code-block>
<code-block label="Response">
```json
[
1,
1
]
```
</code-block>
</code-group>
[](#api-overview)
### With Children
##### Request
```GET /api/v1/country/has/city```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country/has/city
```
</code-block>
<code-block label="Response">
##### Response
```json
[
{
@ -620,19 +752,25 @@ PUT /api/v1/country/1
]
}
]
```
</code-block>
</code-group>
[](#hasmany-apis)
### Children of parent
##### Request
```GET /api/v1/country/1/city```
<code-group>
<code-block label="Request" active>
##### Response
```json
```
GET /api/v1/country/1/city
```
</code-block>
<code-block label="Response">
```json
[
{
"city_id": 251,
@ -642,70 +780,96 @@ PUT /api/v1/country/1
}
]
```
</code-block>
</code-group>
[](#hasmany-apis)
### Insert to child table
##### Request
```POST /api/v1/country/1/city
<code-group>
<code-block label="Request" active>
```POST /api/v1/country/1/city```
```json
{
"city": "test"
}
```
##### Response
```json
</code-block>
<code-block label="Response">
```json
{
"city": "test",
"country_id": "1",
"city_id": 10000
}
```
</code-block>
</code-group>
[](#hasmany-apis)
### Findone under parent
##### Request
<code-group>
<code-block label="Request" active>
```GET /api/v1/country/1/city/findOne?where=(city,like,ka%)```
##### Response
```json
</code-block>
<code-block label="Response">
```json
{
"city": "test",
"country_id": "1",
"city_id": 10000
}
```
</code-block>
</code-group>
[](#hasmany-apis)
### Child count
##### Request
```GET /api/v1/country/1/city/count```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country/1/city/count
```
</code-block>
<code-block label="Response">
##### Response
```json
{
"count": 37
}
```
</code-block>
</code-group>
[](#hasmany-apis)
### Get Child By Primary key
##### Request
```GET /api/v1/country/1/city/251```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country/1/city/251
```
</code-block>
<code-block label="Response">
##### Response
```json
[
{
@ -716,33 +880,48 @@ PUT /api/v1/country/1
}
]
```
</code-block>
</code-group>
[](#hasmany-apis)
### Update Child By Primary key
##### Request
```POST /api/v1/country/1/city/251
<code-group>
<code-block label="Request" active>
```POST /api/v1/country/1/city/251```
```
{
"city": "Kabul-1"
}
```
##### Response
</code-block>
<code-block label="Response">
```json
1
```
</code-block>
</code-group>
[](#hasmany-apis)
### Get parent and chlidren within
##### Request
```GET /api/v1/country/has/city```
<code-group>
<code-block label="Request" active>
```
GET /api/v1/country/has/city
```
</code-block>
<code-block label="Response">
##### Response
```json
[
{
@ -755,21 +934,28 @@ PUT /api/v1/country/1
"country": "Spain",
"last_update": "2006-02-14T23:14:00.000Z"
}
}
},
...
]
```
</code-block>
</code-group>
[](#belongsto-apis)
### Get table and parent class within
##### Request
```GET /api/v1/city/belongs/country```
<code-group>
<code-block label="Request" active>
##### Response
```json
```
GET /api/v1/city/belongs/country
```
</code-block>
<code-block label="Response">
```json5
[
{
city_id: 1,
@ -781,5 +967,7 @@ PUT /api/v1/country/1
country: "Spain",
last_update: "2006-02-15T04:44:00.000Z"
}
},
]
```
</code-block>
</code-group>

11
packages/noco-doc/content/en/demos.md

@ -0,0 +1,11 @@
---
title: 'Demos'
position: 2
category: 'Demos'
fullscreen: true
menuTitle: 'Demos'
---
[Demos](https://nocodb.com/demos)
<iframe src="https://nocodb.com/demos" style="height:100vh" width="100%"/>

36
packages/noco-doc/content/en/index.md

@ -0,0 +1,36 @@
---
title: 'Introduction'
description: 'Simple installation - takes about three minutes!'
position: 0
category: 'Getting started'
fullscreen: true
menuTitle: 'Introduction'
---
## Architecture
<img src="architecture.png" style="background: white;border-radius:4px;padding :10px">
<br>
<br>
| Project Type | Metadata stored in | Data stored in |
|---------|-----------|--------|
| Create new project | NC_DB | NC_DB |
| Create new project with external DB | NC_DB | External database |
<br>
<br>
<br>
<br>

2
packages/noco-doc/content/en/install.md

@ -1,7 +1,7 @@
---
title: 'Setup and Usage'
description: 'Simple installation - takes about three minutes!'
position: 0
position: 1
category: 'Getting started'
fullscreen: true
menuTitle: 'Install'

1
packages/noco-doc/content/settings.json

@ -6,5 +6,6 @@
"dark": "/favicon-128.png"
},
"github": "nocodb/nocodb",
"defaultDir": "packages/noco-doc",
"twitter": "@nocodb"
}

2
packages/noco-doc/nuxt.config.js

@ -2,7 +2,7 @@ import theme from '@nuxt/content-theme-docs'
export default theme({
docs: {
primaryColor: '#fd00e5'
primaryColor: '#3282ff'
},
css: [
"./assets/main.css"

BIN
packages/noco-doc/static/architecture.png vendored

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

1
static/diagrams/architecture.drawio

@ -0,0 +1 @@
<mxfile host="Electron" modified="2021-07-14T13:20:03.334Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/12.9.3 Chrome/80.0.3987.158 Electron/8.2.0 Safari/537.36" etag="3eFb5NTYOIAgzQMoGIyL" version="12.9.3" type="device"><diagram id="p7AUMbp67osUxDllEml3" name="Page-1">1VhLk5s4EP41rsoelkJIYDgOfiSHTGq2prZms5eUAA1WDUaOkF/59SsBAvEY27txvDP4YNRSN1J/n1rdmsDZ+vCR483qniUkmzh2cpjA+cRxAAS+/FOSYyXxPVQJUk6TelAreKQ/SC20a+mWJqToDBSMZYJuusKY5TmJRUeGOWf77rBnlnW/usEpGQgeY5wNpU80Eat6Fc60lX8iNF3pLwMvqHrWWA+uV1KscML2hgguJnDGGRPV2/owI5lynvZLpbd8pbeZGCe5uEQhfnr4nnz+++UPMsf30Z0I/nxKf3cqKzucbesFTxwvk/bCSL6k6uULi9k8bMRcyx8J3xGu5fK7jUa9XnHUTuRsmydEzQPI7v2KCvK4wbHq3UvaSNlKrLO6+5lm2YxljJe6EEQYEOmssBCcvRCjx7a9xd1SabBcGPLn8mnmIScpyOFVp4EGCslhwtZE8KMcUisg5FUqNX2hRnPfkgFo2cogwrSW4Zp/aWO6hUi+1Cj9C8TAGGQ9f5M8uVPcl604w0VB49J/mIuh2PC89Ak//iUbtuXq5lezb668Yjeto24dqDDUZOur0dMqqYbWGaDp2+rXoEaSwb7sYSYDAeYpEefYPcTWwM4dgU7LOMmwoLvuNMbwrL/wwKicYEMd1+5Sx/V6lCjYlsek1jI3bs8QQnbHEHJ6hio/DAyV9GqW/ROMgzdgnMk3g35nGRcEHc5ZruOf5J1qPBBOpVMIvyIXKzBPeBF674G0wOtyDbquZRtPz+ClFJaxumf2xhRGv4zCNyGPcyF30Cun2Y0intOLeP5/jHiu7cqN3T5+xyyYAgu5Bindm3IJ2ue5tFEfJ3yxk0gXmig6/1PcSHCxKhMi+xSbcpaTYUaEIEJIRT1cbKqU95kelLEwwxHJHlhBBWW5IizJyygXqhyIyqT2c29AxIRga2PAXUZT1SGYyspw3WrssK3IaC7np5Ntu1rYRq17fUhVDWDtdom1J9G3SGXfpdo1EjHXs6bj56lB7sC33OCGyRh0z3PBQPcsDAOHl4iGOH5Jyxx6LMsdh64iki5ZRvPn5dKXm+ckM/vQUlZMLSprrcJKsMBXghYGlmNud7eLMxjADHQ8N0EGdmCdCFk/h7P3jnGGMAiWy/8fZ+B247gTTN8AssEIsr0KWAtUnVleNWjXet+3rBoAUaJ+pqiunmffyuIZrxVaeVRsDINtMf0Bv2Bp+h4Xig+OPZdej3BBfjPq6+rz3SmdLLslVKJ7vAx4dw1YnV55AqbWyJYNRvIO+KviMho7o6+I6uIg3ZdjNY8hlhq74u1jNzxVgT9ywXFb7MA7jrVv5kxFfieDDlAH5ZHU6eaRF11w9xjWKeSVdkwf1jVNEqUeclLQHzgqTSmMyvy9XLAbTty5srUVklvl7TS4EkTTbrXkITQAxRvZeP3bnwsAkc32nrmqg9rberj4Bw==</diagram></mxfile>
Loading…
Cancel
Save