{"id":2473,"date":"2024-02-27T11:42:50","date_gmt":"2024-02-27T03:42:50","guid":{"rendered":"https:\/\/five.co\/?p=2473"},"modified":"2026-04-02T10:31:33","modified_gmt":"2026-04-02T02:31:33","slug":"how-to-build-a-rest-api-crud-application","status":"publish","type":"post","link":"https:\/\/preview-php85.dzine.org\/five\/blog\/how-to-build-a-rest-api-crud-application\/","title":{"rendered":"How to Build a REST API CRUD Application"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"how-to-build-a-rest-api-crud-app-in-five\">How to Build a REST API CRUD App in Five<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>CRUD<\/strong>&nbsp;is a commonly used acronym in software and application development. The acronym describes the four basic operations that can be performed on a database:&nbsp;<strong>C<\/strong>reate,&nbsp;<strong>R<\/strong>ead,&nbsp;<strong>U<\/strong>pdate, and&nbsp;<strong>D<\/strong>elete.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As developers or database administrators, we are often tasked with creating user roles that carry different CRUD permissions.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"goals-outcomes-creating-a-rest-api-crud-app-in-4-steps\">Goals &amp; Outcomes: Creating a REST API CRUD App in 4 Steps<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In this how-to guide, we go through the 4 steps of creating a REST API CRUD App. These steps are:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><strong>Creating&nbsp;a&nbsp;New&nbsp;Application&nbsp;With&nbsp;Five<\/strong><\/strong>.<\/li>\n\n\n\n<li><strong>Using The Connection Wizard<\/strong><\/li>\n\n\n\n<li><strong>Using your API as a Data Source.<\/strong><\/li>\n\n\n\n<li><strong><strong>Assigning CRUD Permissions<\/strong>.<\/strong><\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Our final result will be a responsive REST API CRUD app for end-users to interact with.<\/p>\n\n\n<div class=\"root-eb-toc-z7vrkgo wp-block-essential-blocks-table-of-contents\"><div class=\"eb-parent-wrapper eb-parent-eb-toc-z7vrkgo \"><div class=\"eb-toc-container eb-toc-z7vrkgo  eb-toc-is-not-sticky eb-toc-not-collapsible eb-toc-initially-not-collapsed eb-toc-scrollToTop style-1 list-style-none\" data-scroll-top=\"false\" data-scroll-top-icon=\"fas fa-angle-up\" data-collapsible=\"false\" data-sticky-hide-mobile=\"false\" data-sticky=\"false\" data-scroll-target=\"scroll_to_toc\" data-copy-link=\"false\" data-editor-type=\"\" data-hide-desktop=\"false\" data-hide-tab=\"false\" data-hide-mobile=\"false\" data-itemcollapsed=\"false\" data-highlight-scroll=\"false\"><div class=\"eb-toc-header\"><h2 class=\"eb-toc-title\">Table of Contents<\/h2><\/div><div class=\"eb-toc-wrapper \" data-headers=\"[{&quot;level&quot;:2,&quot;content&quot;:&quot;How to Build a REST API CRUD App in Five&quot;,&quot;text&quot;:&quot;How to Build a REST API CRUD App in Five&quot;,&quot;link&quot;:&quot;how-to-build-a-rest-api-crud-app-in-five&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Goals &amp; Outcomes: Creating a REST API CRUD App in 4 Steps&quot;,&quot;text&quot;:&quot;Goals &amp; Outcomes: Creating a REST API CRUD App in 4 Steps&quot;,&quot;link&quot;:&quot;goals-outcomes-creating-a-rest-api-crud-app-in-4-steps&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;What Are CRUD Operations in SQL?&quot;,&quot;text&quot;:&quot;What Are CRUD Operations in SQL?&quot;,&quot;link&quot;:&quot;what-are-crud-operations-in-sql&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Permissions in a CRUD App&quot;,&quot;text&quot;:&quot;Permissions in a CRUD App&quot;,&quot;link&quot;:&quot;permissions-in-a-crud-app&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;How to Create A REST API CRUD Application in 4 Steps&quot;,&quot;text&quot;:&quot;How to Create A REST API CRUD Application in 4 Steps&quot;,&quot;link&quot;:&quot;how-to-create-a-rest-api-crud-application-in-4-steps&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Step 1: Creating\\u00a0a\\u00a0New\\u00a0Application\\u00a0With\\u00a0Five.&quot;,&quot;text&quot;:&quot;Step 1: Creating\\u00a0a\\u00a0New\\u00a0Application\\u00a0With\\u00a0Five.&quot;,&quot;link&quot;:&quot;eb-table-content-5&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Step 2: Using The Connection Wizard&quot;,&quot;text&quot;:&quot;Step 2: Using The Connection Wizard&quot;,&quot;link&quot;:&quot;step-2-using-the-connection-wizard&quot;},{&quot;level&quot;:4,&quot;content&quot;:&quot;Setting up the Endpoints:\\u00a0&quot;,&quot;text&quot;:&quot;Setting up the Endpoints:\\u00a0&quot;,&quot;link&quot;:&quot;eb-table-content-7&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Step 3: Using API As a Data Source&quot;,&quot;text&quot;:&quot;Step 3: Using API As a Data Source&quot;,&quot;link&quot;:&quot;step-3-using-api-as-a-data-source&quot;},{&quot;level&quot;:3,&quot;content&quot;:&quot;Step 4: CRUD Permissions&quot;,&quot;text&quot;:&quot;Step 4: CRUD Permissions&quot;,&quot;link&quot;:&quot;step-4-crud-permissions&quot;},{&quot;level&quot;:2,&quot;content&quot;:&quot;Conclusion&quot;,&quot;text&quot;:&quot;Conclusion&quot;,&quot;link&quot;:&quot;conclusion&quot;}]\" data-visible=\"[true,true,true,true,true,true]\" data-delete-headers=\"[{&quot;label&quot;:&quot;How to Build a REST API CRUD App in Five&quot;,&quot;value&quot;:&quot;how-to-build-a-rest-api-crud-app-in-five&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;Goals &amp; Outcomes: Creating a REST API CRUD App in 4 Steps&quot;,&quot;value&quot;:&quot;goals-outcomes-creating-a-rest-api-crud-app-in-4-steps&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;What Are CRUD Operations in SQL?&quot;,&quot;value&quot;:&quot;what-are-crud-operations-in-sql&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Permissions in a CRUD App&quot;,&quot;value&quot;:&quot;permissions-in-a-crud-app&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;How to Create A REST API CRUD Application in 4 Steps&quot;,&quot;value&quot;:&quot;how-to-create-a-rest-api-crud-application-in-4-steps&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Step 1: Creating\\u00a0a\\u00a0New\\u00a0Application\\u00a0With\\u00a0Five.&quot;,&quot;value&quot;:&quot;step-1-creating-a-new-application-with-five&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Step 2: Using The Connection Wizard&quot;,&quot;value&quot;:&quot;step-2-using-the-connection-wizard&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Setting up the Endpoints:\\u00a0&quot;,&quot;value&quot;:&quot;setting-up-the-endpoints&quot;,&quot;isDelete&quot;:true},{&quot;label&quot;:&quot;Step 3: Using API As a Data Source&quot;,&quot;value&quot;:&quot;step-3-using-api-as-a-data-source&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Step 4: CRUD Permissions&quot;,&quot;value&quot;:&quot;step-4-crud-permissions&quot;,&quot;isDelete&quot;:false},{&quot;label&quot;:&quot;Conclusion&quot;,&quot;value&quot;:&quot;conclusion&quot;,&quot;isDelete&quot;:false}]\" data-smooth=\"true\" data-top-offset=\"\"><div class=\"eb-toc__list-wrap\"><ul class=\"eb-toc__list\"><li><a href=\"#goals-outcomes-creating-a-rest-api-crud-app-in-4-steps\">Goals &amp; Outcomes: Creating a REST API CRUD App in 4 Steps<\/a><li><a href=\"#what-are-crud-operations-in-sql\">What Are CRUD Operations in SQL?<\/a><ul class=\"eb-toc__list\"><li><a href=\"#permissions-in-a-crud-app\">Permissions in a CRUD App<\/a><\/li><\/ul><li><a href=\"#how-to-create-a-rest-api-crud-application-in-4-steps\">How to Create A REST API CRUD Application in 4 Steps<\/a><ul class=\"eb-toc__list\"><li><a href=\"#eb-table-content-5\">Step 1: Creating\u00a0a\u00a0New\u00a0Application\u00a0With\u00a0Five.<\/a><li><a href=\"#step-2-using-the-connection-wizard\">Step 2: Using The Connection Wizard<\/a><li><a href=\"#step-3-using-api-as-a-data-source\">Step 3: Using API As a Data Source<\/a><li><a href=\"#step-4-crud-permissions\">Step 4: CRUD Permissions<\/a><\/li><\/ul><li><a href=\"#conclusion\">Conclusion<\/a><\/ul><\/div><\/div><\/div><\/div><\/div>\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"what-are-crud-operations-in-sql\">What Are CRUD Operations in SQL?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">CRUD refers to Create, Read, Update, and Delete. Assigning and managing CRUD permissions is a very common task in programming.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">CRUD describes the four basic operations that a user can perform in a database. Users can<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><em>Create<\/em>&nbsp;or&nbsp;<em>insert&nbsp;<\/em>new records into a table,<\/li>\n\n\n\n<li><em>Read<\/em>&nbsp;or&nbsp;<em>select<\/em>&nbsp;existing records from a table,<\/li>\n\n\n\n<li><em>Update<\/em>&nbsp;or&nbsp;<em>modify&nbsp;<\/em>existing records stored inside a table, or<\/li>\n\n\n\n<li><em>Delete<\/em>&nbsp;or&nbsp;<em>remove&nbsp;<\/em>existing records from a table.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"permissions-in-a-crud-app\">Permissions in a CRUD App<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">CRUD permissions refer to the permissions granted to anyone having access to a database to perform all or part of the four basic operations on data: Create, Read, Update, and Delete. By assigning CRUD permissions, developers control and govern access to data stored in a database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In SQL, CRUD permissions are often managed by granting or revoking permissions to specific users or roles. These permissions are typically set at the database level or on individual tables within the database.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It\u2019s essential to carefully manage CRUD permissions in a web app to protect data from unauthorized access, modification, or deletion.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By granting the appropriate permissions to trusted users or roles and denying them to others, application developers ensure that only authorized users can interact with the data in the database. This approach helps to maintain data integrity, security, and privacy.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s say you are a restaurant owner and you\u2019d like to make sure your staff can enter the kitchen, but your guests can only stay in the dining room. How would you solve this problem? Easy! You have two roles: staff and guest. Each role has its own permission to enter different parts of the restaurant.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is what CRUD permissions do for databases: they are used to govern access. By using CRUD operations, developers can make sure that data stays safe and is only accessed as intended. CRUD permissions are a useful tool in a developer\u2019s access control toolbox!<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Now let\u2019s dive in!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-create-a-rest-api-crud-application-in-4-steps\">How to Create A REST API CRUD Application in 4 Steps<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-1-creating-a-new-application-with-five\">Step 1: Creating&nbsp;a&nbsp;New&nbsp;Application&nbsp;With&nbsp;Five.<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s start by creating a new application with Five. To do so,\u00a0<a href=\"https:\/\/preview-php85.dzine.org\/five\/get-started\/\">sign up and access Five&#8217;s cloud IDE for free<\/a>. The first screen you will see looks like this.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1024\" height=\"649\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/Five.Co-Landing-Page-1024x649.png\" alt=\"Five.Co - Landing Page\" class=\"wp-image-2085\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/Five.Co-Landing-Page-1024x649.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/Five.Co-Landing-Page-300x190.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/Five.Co-Landing-Page-768x487.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/Five.Co-Landing-Page.png 1080w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Here\u2019s how to create a new web application using Five:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Start by clicking on&nbsp;<strong>Applications&nbsp;<\/strong>in the top left corner.<\/li>\n\n\n\n<li>Next, click on the yellow&nbsp;<strong>Plus&nbsp;<\/strong>button.<\/li>\n\n\n\n<li>Give your application a descriptive name in the&nbsp;<strong>Title<\/strong>&nbsp;field, and save it by clicking the tick mark in the top right.<\/li>\n\n\n\n<li>Done: You have successfully created your first application in Five. Here\u2019s what this should look like before clicking Save.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1024\" height=\"617\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/image-31-1024x617.png\" alt=\"Click the Tick Mark in the Top Right Corner to Save\" class=\"wp-image-1605\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/image-31-1024x617.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/image-31-300x181.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/image-31-768x463.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/image-31-1536x926.png 1536w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/08\/image-31.png 1777w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">You will now see your new application in the list of all applications that you have created with Five.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, click on the blue \u201c<strong>Manage<\/strong>\u201d button that has appeared in the top right corner to access all of Five\u2019s development features.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1280\" height=\"720\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/01\/Five.Co-Manage-Your-Application.png\" alt=\"Five.Co - Manage Your Application\" class=\"wp-image-741\"\/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-2-using-the-connection-wizard\">Step 2: Using The Connection Wizard<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s dive straight into connecting our API. For this tutorial, we\u2019ll utilize the Dummy JSON API, which offers sample data for various products<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can start by clicking on&nbsp;<strong>Data<\/strong>&nbsp;and then navigating to&nbsp;<strong>Connection Wizard<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1600\" height=\"297\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-61.png\" alt=\"\" class=\"wp-image-2482\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-61.png 1600w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-61-300x56.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-61-1024x190.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-61-768x143.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-61-1536x285.png 1536w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">After clicking on the Wizard, you\u2019ll be presented with an interface that has some similarities to Postman. Start by selecting \u2018New\u2019 from the WebService lookup, then assign it a WebService ID and Name. For our purposes, we\u2019ll use the name \u201c<strong>DummyProducts<\/strong>.\u201d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, apart from general, you\u2019ll notice several other tabs at the top:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Read List Mapping:&nbsp;<\/strong>This expects an endpoint that returns all records from the API using a GET method.<\/li>\n\n\n\n<li><strong>Read Single Mapping:&nbsp;<\/strong>Requires an endpoint that provides a single record.<\/li>\n\n\n\n<li><strong>Create Single:&nbsp;<\/strong>Here, you\u2019ll need an endpoint where you can send a POST request to add a new record.<\/li>\n\n\n\n<li><strong>Update Single:&nbsp;<\/strong>This is for an endpoint where you can use a PUT or PATCH method to update an existing record.<\/li>\n\n\n\n<li><strong>Delete Single:&nbsp;<\/strong>This tab expects an endpoint that, through a DELETE request, allows you to remove a record from the API.<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"setting-up-the-endpoints\">Setting up the Endpoints<strong>:&nbsp;<\/strong><\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">For the \u201c<strong>Read List Mapping<\/strong>\u201c, we\u2019ll input the endpoint that fetches all records. Since we are Utilizing the Dummy JSON API, the relevant URL is:&nbsp;<a href=\"https:\/\/dummyjson.com\/products\" rel=\"noreferrer noopener nofollow\" target=\"_blank\">https:\/\/dummyjson.com\/products<\/a>&nbsp;(as mentioned on their official website)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you\u2019ve entered the endpoint, click \u201cSend\u201d to view the returned results.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1600\" height=\"855\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-62.png\" alt=\"\" class=\"wp-image-2483\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-62.png 1600w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-62-300x160.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-62-1024x547.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-62-768x410.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-62-1536x821.png 1536w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">If your API mandates authorization or specific headers, you can set these up in the adjacent \u2018Authorization\u2019 and \u2018Headers\u2019 tabs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For \u201c<strong>Read Single Mapping<\/strong>\u201c, \u201c<strong>Update Single<\/strong>\u201c, and \u201c<strong>Delete Single<\/strong>\u201c, we\u2019ll utilize an endpoint that fetches a specific record. According to the Dummy JSON website, the relevant URL structure is https:\/\/dummyjson.com\/products\/{productID}, where {productID} represents the product\u2019s ID.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s use this in the connection wizard now our URL should look something like this:&nbsp;<a href=\"https:\/\/dummyjson.com\/products\/:id\" rel=\"noreferrer noopener nofollow\" target=\"_blank\">https:\/\/dummyjson.com\/products\/:id<\/a>&nbsp;where \u2018id\u2019 is the variable where we will pass the product\u2019s ID<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1600\" height=\"855\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-60.png\" alt=\"Building a REST API Crud App\" class=\"wp-image-2481\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-60.png 1600w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-60-300x160.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-60-1024x547.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-60-768x410.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/image-60-1536x821.png 1536w\" sizes=\"(max-width: 1600px) 100vw, 1600px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">For the \u201c<strong>Create Single Mapping<\/strong>\u201c, we\u2019ll use the endpoint https:\/\/dummyjson.com\/products\/add. This endpoint enables us to add new records to the API via a POST request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, we can click on save to store the connection<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-3-using-api-as-a-data-source\">Step 3: Using API As a Data Source<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now that we\u2019ve established a connection in Five, it can be utilized as a data source. For the purpose of this tutorial, we\u2019ll construct a basic form using this connection.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">First, click on \u201cVisual\u201d followed by \u201cForm Wizard\u201d. In the primary data source lookup, choose \u201cDummyProducts\u201d (or any other name you might have given your connection).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Five will take care of populating most of the details for you. At this stage, you\u2019re welcome to modify any settings as you see fit.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1024\" height=\"548\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-39-1024x548.png\" alt=\"\" class=\"wp-image-2006\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-39-1024x548.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-39-300x160.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-39-768x411.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-39-1536x821.png 1536w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-39-2048x1095.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Click \u2018Save\u2019 to store the form, and then we can finally run our application. To launch your app, hit the Run \u25b6\ufe0f button in the top right. If you can&#8217;t see the run button, it means you have initiate your development environment first. To do so, <a href=\"https:\/\/www.five.org\/t\/how-do-i-import-templates\/406\/2\" rel=\"nofollow noopener\" target=\"_blank\">follow steps 4 to 8 from this forum post<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1024\" height=\"190\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-16-2-1024x190.png\" alt=\"\" class=\"wp-image-2007\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-16-2-1024x190.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-16-2-300x56.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-16-2-768x142.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-16-2-1536x285.png 1536w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-16-2-2048x380.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">In your end-user application, you now have a form that contains all of the products from the API. You can click on each record to view their details, even make changes, add new records, and delete them as well.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img width=\"1024\" height=\"548\" src=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-40-1024x548.png\" alt=\"\" class=\"wp-image-2008\" srcset=\"https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-40-1024x548.png 1024w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-40-300x160.png 300w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-40-768x411.png 768w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-40-1536x821.png 1536w, https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2023\/10\/Frame-40-2048x1095.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Congratulations! You\u2019ve successfully built an application on Five that uses an API as a data source in just three simple steps.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-crud-permissions\">Step 4: CRUD Permissions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once we\u2019ve built our app it\u2019s now time to assign CRUD permissions as outlined in this video:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Multiuser And User Roles | Low-Code For Real Developers | Five.Co\" width=\"500\" height=\"281\" src=\"https:\/\/www.youtube.com\/embed\/7bcX-4O6-OY?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Multi-User Conversion<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Access the application settings within Five.<\/li>\n\n\n\n<li>Enable the \u201cMulti-User\u201d toggle, which automatically adds essential features like a login page, user management capabilities, and a default admin account setup.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Admin Account Setup<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Upon running the multi-user app for the first time, log in using the default \u201cadmin\u201d username and password.<\/li>\n\n\n\n<li>Immediately update the password to secure the admin account.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>User Role Creation<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Navigate to the \u201cRoles\u201d section under application settings.<\/li>\n\n\n\n<li>Create new roles (e.g., \u201cManagers\u201d) and define their permissions, focusing on what CRUD operations they can perform on specific tables or sections of the app.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Assigning Menus to Roles<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Organize the app\u2019s navigation by creating new menus or adjusting existing ones.<\/li>\n\n\n\n<li>Assign menus to specific roles, ensuring users only see navigation options relevant to their permissions.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Adding and Managing Users<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Through the \u201cUsers\u201d menu, add new users by providing details like username, email, and assigning them a role.<\/li>\n\n\n\n<li>Set initial passwords for these users, with an option for them to update upon first login.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">In the video we use our order management template the process. For instance, \u201cManagers\u201d might have read and update access to order details but not the ability to alter product information.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To view the rest of our use cases click&nbsp;<a href=\"https:\/\/preview-php85.dzine.org\/five\/use-cases\/\">here<\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\">Five automatically creates a clean and intuitive&nbsp;<a href=\"https:\/\/preview-php85.dzine.org\/five\/blog\/the-admin-panel-the-best-web-app-template\/\">admin panel user interface<\/a>&nbsp;on top of your data for you.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Running along the top and the left-hand side, Five gives you a menu that lets end-users navigate through your application. On the top, you have icons for in-app help or a user avatar that is particularly handy for multi-user applications. And in the center, there is a main area for your users to interact with your application, its forms, charts, dashboards, or any other element that you decide to develop for them.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This user interface is customizable through themes, buttons, or custom front-end components. It also handles more complex data structures very well, by letting you add pages, drill downs, or parent-child menus.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Five lets you develop more complex applications. Follow this&nbsp;<a href=\"https:\/\/www.youtube.com\/watch?v=jcRAhyw9rmI&amp;list=PLerqEA4wsHa2vY5vW3fK1Nkl4Npxn5MKQ\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">guided YouTube tutorial to delve deeper into Five\u2019s features<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Whatever you wish to build with Five:&nbsp;Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How to Build a REST API CRUD App in Five CRUD&nbsp;is a commonly used acronym in software and application development. The acronym describes the four basic operations that can be performed on a database:&nbsp;Create,&nbsp;Read,&nbsp;Update, and&nbsp;Delete. As developers or database administrators, we are often tasked with creating user roles that carry different CRUD permissions. Goals &amp; [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":2480,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_eb_attr":"","_uag_custom_page_level_css":"","footnotes":""},"categories":[21],"tags":[],"class_list":["post-2473","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog"],"acf":[],"uagb_featured_image_src":{"full":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/Five.Co-How-to-Build-a-REST-API-CRUD-Application.png",1280,720,false],"thumbnail":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/Five.Co-How-to-Build-a-REST-API-CRUD-Application-150x150.png",150,150,true],"medium":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/Five.Co-How-to-Build-a-REST-API-CRUD-Application-300x169.png",300,169,true],"medium_large":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/Five.Co-How-to-Build-a-REST-API-CRUD-Application-768x432.png",768,432,true],"large":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/Five.Co-How-to-Build-a-REST-API-CRUD-Application-1024x576.png",1024,576,true],"1536x1536":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/Five.Co-How-to-Build-a-REST-API-CRUD-Application.png",1280,720,false],"2048x2048":["https:\/\/preview-php85.dzine.org\/five\/wp-content\/uploads\/2024\/02\/Five.Co-How-to-Build-a-REST-API-CRUD-Application.png",1280,720,false]},"uagb_author_info":{"display_name":"Ryan Forrester","author_link":"https:\/\/preview-php85.dzine.org\/five\/author\/f1v5_ed9_au\/"},"uagb_comment_info":0,"uagb_excerpt":"How to Build a REST API CRUD App in Five CRUD&nbsp;is a commonly used acronym in software and application development. The acronym describes the four basic operations that can be performed on a database:&nbsp;Create,&nbsp;Read,&nbsp;Update, and&nbsp;Delete. As developers or database administrators, we are often tasked with creating user roles that carry different CRUD permissions. Goals &amp;&hellip;","_links":{"self":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/2473","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/comments?post=2473"}],"version-history":[{"count":1,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/2473\/revisions"}],"predecessor-version":[{"id":17439,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/posts\/2473\/revisions\/17439"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/media\/2480"}],"wp:attachment":[{"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/media?parent=2473"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/categories?post=2473"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/preview-php85.dzine.org\/five\/wp-json\/wp\/v2\/tags?post=2473"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}