Tutorials-Create/Edit Collections and Fields using API

I need to Create/Edit Collections using API, Can I find a tutorial for that?

I’m going to use XANO for the backend, and it is easier to Create/Edit Collection Via an API (to avoid Collection Creation, Fields Creation and Mapping Process)

I went thru the documentation, but it was empty

Developers Documentation

This is the API documentation for accessing the data/collections via REST API.

Actions Available#

We can create new Collections, Add Fields and Add Items to those Collections using the APIs.

Below are some actions which can be performed on the Project data.

Login/Authentication#

Create Collection#

Edit/Manage Collection#

Delete Collection#

Create Item#

Edit/Manage Item#

Delete Item#

We had that feature but as of now its not available anymore as it needed a lot of fixing after we did changed to how we build and manage web apps on DrapCode.

We may introduct it sometime in the future but not in the immediate roadmap.

Now we have project specific REST APIs available to create/edit/delete/list/count etc for each collection. APIs to create collection/fields etc will come later.

1 Like

it is time consuming for me, but i already addicted your Platform :slight_smile:

One question though , if i created a relational data base in XANO
How to manage the Collection in DrapCode?

:smiley:

You can map the columns of Xano database to the columns of DrapCode collections. You can even map the reference fields the similar way. Then connect the Xano using Data Source, to fetch the data and display it on the UI.

How? can you Elaborate? Specially for

  • One-To-One Relationship
  • One-To-Many Relationship
  • Many-To-Many Relationship

they are not using the same way your database works for parent and child (in DrapCode you are creating a reference field in 1st table and a child field in 2nd table)

Below are XANO Collections I Created… :point_down:

00_00_Continents Collection

id: integer
ContinentName: text
ContinentCode: text
ContinentImage_UserShow: image
ContinentWikiUrl: text
ContinentModifyAt: timestamp
ContinentCreatedAt: timestamp

00_01_Regions collection

id: integer
00_00_Continents_id: integer
RegionUserShow: text
RegionId: text
ContinentName: text
ContinentCode: text
created_at: timestamp

00_02_Countries Collection

id: integer
00_01_regions_id: integer
00_06_cities_id: integer
CountryNameEnShort: text
CountryDialCode: text
CountryIso3116_1Code2Alpha: text
CountryIso3116_1Code3Alpha: text
CountryIso4217Currency3Alpha: text
CountryMARC: text
CountryTLD: text
ContryGeoNameId: integer
CountryLanguages: text

You don’t have to create a parent child relation always.

This you can easily manage by just having a reference field type of one collection in another:

Continent
Name
Other Fields

Region:
Continent as reference field
Name
Other Feelds

Country
Region as reference field
City as reference field
Country name or code (or can be a reference field)

This way you can have the relation between them like you have in Mysql using foreign key.

Please let me know if this is clear or if you have any other questions.