The Wayback Machine - https://web.archive.org/web/20240605183741/https://www.geeksforgeeks.org/microsoft-azure-using-json-with-azure-logic-apps/
Open In App

Microsoft Azure – Using JSON with Azure Logic Apps

Last Updated : 03 Apr, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will look into how to create JSON Schema that can be used in Azure logic apps. For the sake of example, here one of our goals is to create an Azure logic app that gets triggered by an HTTP request. 

Now, when we pass our JSON payload over, we want it to be validated. So, let’s look into a few tools that we could use to generate some sample JSON data, as well as to create a JSON Schema based on it. 

First, let’s look at ObjGen. This is an online tool that we could use to just mark out some sample JSON data. So, notice we could come here and we could just start typing in some properties and giving it values, and on the right side, it will just generate some information for us.we

Now, we could copy our JSON data and we can go over to another tool called the JSON Schema tool. What we could do here now, is paste in that JSON data, and hit “Submit”. 

Notice here on the right side, it’s going to create that JSON Schema that we could use as shown below:

{
    "$schema": "http://json-schema.org/draft-07/schema",
    "$id": "http://example.com/example.json",
    "type": "object",
    "title": "The root schema",
    "description": "The root schema comprises the entire JSON document.",
    "default": {},
    "examples": [
        {
            "CompanyName": "Geeksforgeeks",
            "CompanyOwner": "Sandeep Jain"
        }
    ],
    "required": [
        "CompanyName",
        "CompanyOwner"
    ],
    "properties": {
        "CompanyName": {
            "$id": "#/properties/CompanyName",
            "type": "string",
            "title": "The CompanyName schema",
            "description": "An explanation about the purpose of this instance.",
            "default": "",
            "examples": [
                "Geeksforgeeks"
            ]
        },
        "CompanyOwner": {
            "$id": "#/properties/CompanyOwner",
            "type": "string",
            "title": "The CompanyOwner schema",
            "description": "An explanation about the purpose of this instance.",
            "default": "",
            "examples": [
                "Sandeep Jain"
            ]
        }
    },
    "additionalProperties": true
}

Now, we could use this JSON Schema inside of the HTTP action inside of the Azure logic app to help validate that JSON, that might come over in the body.


Previous Article
Next Article

Similar Reads

Microsoft Azure - Creating an HTTP Trigger with Azure Logic Apps
In this article, we will look into how to set up an HTTP Request Trigger that could be used in an Azure Logic App. These triggers get activated whenever an event occurs. The event needs to be decided by the trigger creator. Follow the below steps to create an HTTP trigger with Azure Logic Apps: Step 1: If we want to create a Logic App, the first th
2 min read
Microsoft Azure - Roll Back Versions of Azure Logic Apps
In this article, we will look into how you could quickly roll back to a previous version of an Azure Logic App. When working with Logic Apps inside of the Azure portal, you may need to go back to your previous version of your Logic App. Now follow the below steps to roll back the previous version of your Logic app: Step 1: Inside of our Logic App,
1 min read
Microsoft Azure - Modifying API Connections With Logic Apps
In this article, we will look into how to modify an existing API connection with Azure logic apps. This can come in handy while making changes to the existing API for better performance and managing exchange of data through the API. Follow the below steps to edit an existing API: Step 1: If you want to edit the existing API connections inside of on
2 min read
Microsoft Azure - Cloning Web Apps using Azure App Services
In this article, we will look into the process of cloning web apps in Azure App Services. If you have an existing application in Azure App Services that you like to have copied over into another region, one option you have is to simply clone it. Follow the below steps to clone and Azure App to another region: Step 1: In the search bar search "clone
2 min read
Microsoft Azure - Create Web Apps in Azure
Here, In this article, we'll see how we can create an App Service Web App which lets you quickly build, deploy, and scale enterprise-grade web, mobile, and API apps running on any platform. App Service allows you to select your runtime stack (available stacks: Python, .Net, Java, PHP, Node, Ruby) while creating a web app. Azure Web App provides gre
2 min read
Microsoft Azure - Getting started with Azure Static Web Apps
Azure Static Web App is a Serverless Web Application offered by Azure to host Static Site Content like Images, Videos, and Code files like HTML, CSS, JavaScript, Markdown, Text files, JSON, XML files with high efficiency and it is pre-rendered content is distributed globally. No Web Services are required for deploy so it is cost-effective. So no ne
4 min read
Microsoft Azure - Develop Apps with Azure Database For PostgreSQL
In this article, we will learn how to use a Flexible Server in Azure Database for Postgres SQL. We can create an Azure Database for Postgres SQL with a Flexible Server which allows for configuration and control of the database server. Implementation: Follow the below-given steps to develop apps with Microsoft Azure Database for PostgreSQL. Step 1:
3 min read
Microsoft Azure - Get Azure VM Properties using Azure PowerShell
The purpose of using the Azure PowerShell Commands is to quickly analyze the overall properties of VM/VMs at once the filtering the with select and where conditions. To find the properties of an Azure VM, you can perform the following commands in Azure Cloud Shell to get the details. Command: Get-AzVM Output: 1. Get all properties of an Azure Virtu
2 min read
Microsoft Azure - RDP to Azure Virtual Machines using Azure Bastion
In this article, we will learn how to do RDP(Remote Desktop Protocol) / SSH(Secure Shell) Connection to an Azure VM using Azure Bastion. First, let's discuss Azure Bastion. The Azure Bastion service is a fully platform-managed PaaS service that you provision inside your virtual network. It provides secure and seamless RDP/SSH connectivity to your v
3 min read
Microsoft Azure - Check Status of Azure VM using Azure PowerShell
The following Azure PowerShell command helps you to find the Azure VM Config and properties details of Os Name, Os Version, Hyper V Generation, Disks properties, Extensions properties of Type Handler Version, Status and Message, VM Agents properties of Type Handler Version, Status and Message and also VM Power Status Codes, Messages, Plugins, Time
3 min read