How to have an API REST in 10 minutes with Strapi 🔵

Strapi is the leading open-source headless CMS. it's 100% JavaScript, fully customizable, and developer first.

The first thing we would do is open the terminal and copy the following script.

npx create-starpi-app my-app-name — quickstart

Now we will wait a moment for the dependencies to be installed and the necessary folders to be created.

We will proceed to create a user, with an email and a password

Now we will create a collection following the steps as shown in the image.

We will add the following fields, name, price, description, image, and a UID that will be the name and will be called slug

Field price like this

Field image like this

Finally, you must save, and your collection should look like this.

Now we will go to the Content Manager section and create our data.

Finally, we will save our new entry, and publish it.

Now we must give public permissions to our REST API, for this we will go to SETTINGS and USERS & PERMISSIONS PLUGIN, ROLES and PUBLIC.

Now we can consume, as follows with Postman.

To make a filter by ID what we will do is.

As you can see, the request returns all the data except the images, this is because we will have to send parameters for the request to return the images, and for this, we will do the following.

With that, we would have thousands of possibilities to start with our projects in a simple and fast way if you liked my explanation do not forget to like it and follow me since that would help me a lot 🙏




Colombian software developer 🇨🇴

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Give your VMs a steady pulse with autohealing and autoupdates

Async IO in Python 3

How to provide restricted & secure access to a third party, to your AWS accounts, using Attribute…

Power of AWS Organization ID in controlling access to AWS resources

First of all, before I get started with my experience, let me share a bit about what is LGM-SOC.

Ruby On Rails Web Development

How to Parse the Counts section of the Quantum Circuit Results

Get Paid to Search Adobe Stock!

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Hector Cohen

Hector Cohen

Colombian software developer 🇨🇴

More from Medium

Shopify App Authentication — There’s a Better Way

Fix the annoying web page caching issue, permanently

Enable Live Captions in Vonage Video Using

How to create a model and do the migration in Node.js with Sequelize.js?