Add an API manually using the Azure portal (2024)

  • Article

This article shows steps to add an API manuallyto the API Management instance. When you want to mock the API, you can create a blank API or define it manually. For details about mocking an API, see Mock API responses.

If you want to import an existing API, see related topics section.

In this article, we create a blank API and specify httpbin.org (a public testing service) as a backend API.

Prerequisites

Complete the following quickstart: Create an Azure API Management instance

Go to your API Management instance

  1. In the Azure portal, search for and select API Management services.

    Add an API manually using the Azure portal (1)

  2. On the API Management services page, select your API Management instance.

    Add an API manually using the Azure portal (2)

Create an API

  1. Navigate to your API Management service in the Azure portal and select APIs from the menu.
  2. From the left menu, select + Add API.
  3. Select HTTP from the list.
    Add an API manually using the Azure portal (3)
  4. Enter the backend Web service URL (for example, https://httpbin.org) and other settings for the API. The settings are explained in the Import and publish your first API tutorial.
  5. Select Create.

At this point, you have no operations in API Management that map to the operations in your backend API. If you call an operation that is exposed through the back end but not through the API Management, you get a 404.

Note

By default, when you add an API, even if it's connected to some backend service, API Management won't expose any operations until you allow them. To allow an operation of your backend service, create an API Management operation that maps to the backend operation.

Add and test an operation

This section shows how to add a "/get" operation to map it to the back end "http://httpbin.org/get" operation.

Add an operation

  1. Select the API you created in the previous step.
  2. Select + Add Operation.
  3. In the URL, select GET and enter /get in the resource.
  4. Enter "FetchData" for Display name.
  5. Select Save.

Test an operation

Test the operation in the Azure portal. You can also test it in the Developer portal.

  1. Select the Test tab.
  2. Select FetchData.
  3. Press Send.

The response that the "http://httpbin.org/get" operation generates appears. If you want to transform your operations, see Transform and protect your API.

Add and test a parameterized operation

This section shows how to add an operation that takes a parameter. In this case, we map the operation to "http://httpbin.org/status/200".

Add the operation

  1. Select the API you created in the previous step.
  2. Select + Add Operation.
  3. In the URL, select GET and enter /status/{code} in the resource. Optionally, you can provide some information associated with this parameter. For example, enter "Number" for TYPE, "200" (default) for VALUES.
  4. Enter "GetStatus" for Display name.
  5. Select Save.

Test the operation

Test the operation in the Azure portal. You can also test it in the Developer portal.

  1. Select the Test tab.

  2. Select GetStatus. By default the code value is set to "200". You can change it to test other values. For example, type "418".

  3. Press Send.

    The response that the "http://httpbin.org/status/200" operation generates appears. If you want to transform your operations, see Transform and protect your API.

Add and test a wildcard operation

This section shows how to add a wildcard operation. A wildcard operation lets you pass an arbitrary value with an API request. Instead of creating separate GET operations as shown in the previous sections, you could create a wildcard GET operation.

Caution

Use care when configuring a wildcard operation. This configuration may make an API more vulnerable to certain API security threats.

Add the operation

  1. Select the API you created in the previous step.
  2. Select + Add Operation.
  3. In the URL, select GET and enter /* in the resource.
  4. Enter "WildcardGet" for Display name.
  5. Select Save.

Test the operation

Test the operation in the Azure portal. You can also test it in the Developer portal.

  1. Select the Test tab.

  2. Select WildcardGet. Try the GET operations that you tested in previous sections, or try a different supported GET operation.

    For example, in Template parameters, update the value next to the wildcard (*) name to headers. The operation returns the incoming request's HTTP headers.

  3. Press Send.

    The response that the "http://httpbin.org/headers" operation generates appears. If you want to transform your operations, see Transform and protect your API.

Note

It can be important to understand how the host for the backend API you're integrating with handles trailing slashes on an operation URL. For more information, see this API Management FAQ.

Append other APIs

You can compose an API of APIs exposed by different services, including:

  • An OpenAPI specification
  • A SOAP API
  • A GraphQL API
  • A Web App hosted in Azure App Service
  • Azure Function App
  • Azure Logic Apps
  • Azure Service Fabric

Append a different API to your existing API using the following steps.

Note

When you import another API, the operations are appended to your current API.

  1. Go to your Azure API Management instance in the Azure portal.

    Add an API manually using the Azure portal (4)

  2. Select APIs on the Overview page or from the menu on the left.

    Add an API manually using the Azure portal (5)

  3. Click ... next to the API that you want to append another API to.

  4. Select Import from the drop-down menu.

    Add an API manually using the Azure portal (6)

  5. Select a service from which to import an API.

    Add an API manually using the Azure portal (7)

  • API import limitations
  • Import an OpenAPI specification
  • Import a SOAP API
  • Import a SOAP API and convert to REST
  • Import an App Service API
  • Import a Container App API
  • Import a WebSocket API
  • Import a GraphQL API
  • Import a GraphQL schema and set up field resolvers
  • Import an Azure Function App
  • Import an Azure Logic App
  • Import a Service Fabric service
  • Import an OData API
  • Import SAP OData metadata
  • Import a gRPC API
  • Edit an API

Next steps

Transform and protect a published API

I'm an expert in Azure API Management and related concepts, with a demonstrable depth of knowledge in API management and integration. My expertise includes hands-on experience in creating, configuring, and managing APIs on the Azure platform. Let's dive into the key concepts outlined in the provided article:

  1. Adding an API Manually to API Management:

    • The article explains the process of manually adding an API to Azure API Management. This involves creating a blank API and specifying a backend Web service URL, such as .
  2. Creating Operations in API Management:

    • After adding an API, the article emphasizes the need to create operations in API Management that map to the operations in the backend API. Without these mappings, calls to operations on the backend won't be exposed through API Management.
  3. Adding and Testing Operations:

    • The article walks through the process of adding operations, such as a "/get" operation mapped to "". It also demonstrates how to test these operations in both the Azure portal and the Developer portal.
  4. Parameterized Operations:

    • The article shows how to add an operation that takes a parameter, in this case, mapping to "". It guides users on testing parameterized operations with different values.
  5. Wildcard Operations:

    • The concept of wildcard operations is introduced, allowing users to pass arbitrary values with an API request. The article provides caution about potential security threats and demonstrates how to add, configure, and test a wildcard operation.
  6. Appending Other APIs:

    • Users are informed that it's possible to compose an API of APIs exposed by different services. The article outlines steps to append another API to an existing one, covering various scenarios like OpenAPI, SOAP, GraphQL, Web App, Function App, Logic App, Service Fabric, and more.
  7. API Import Limitations:

    • The article provides details on the limitations and considerations when importing various types of APIs, such as OpenAPI specifications, SOAP APIs, WebSocket APIs, GraphQL APIs, and others.
  8. Editing an API:

    • There's a brief mention of editing an API, suggesting that users can make changes to the configuration of an existing API.
  9. Next Steps: Transform and Protect a Published API:

    • The article concludes by pointing out that the next steps involve transforming and protecting a published API, indicating the importance of securing and optimizing the API after it has been added and tested.

This overview should give you a comprehensive understanding of the concepts covered in the article related to Azure API Management. If you have specific questions or need further clarification on any topic, feel free to ask.

Add an API manually using the Azure portal (2024)

FAQs

How do I register an API in Azure portal? ›

Create an API

Navigate to your API Management service in the Azure portal and select APIs from the menu. From the left menu, select + Add API. Select HTTP from the list. Enter the backend Web service URL (for example, https://httpbin.org ) and other settings for the API.

How do I add API to Azure API Management? ›

Import a backend API
  1. In the Azure portal, navigate to your API Management instance.
  2. In the left menu, select APIs > + Add API.
  3. Under Create from definition, select OpenAPI.
  4. Enter API settings. You can set the values during creation or configure them later by going to the Settings tab. ...
  5. Select Create.
Jun 12, 2023

Where is the API key in Azure portal? ›

Obtain an API key from the Azure OpenAI resource. In the Azure portal, find a key on the Keys and Endpoint page of the Azure OpenAI resource. Go to your API Management instance, and select Named values in the left menu.

How do I add an API? ›

The typical steps involved in using an API are:
  1. Look for an API that will meet your needs.
  2. Understand the API terms for using.
  3. Read the API documentation so you can test the API.
  4. Request an API key.
  5. Using the API documentation to make an API request.
  6. Interpret the API response to see if it meets your needs.
Nov 30, 2023

How do I import an API into Azure? ›

When you import another API, the operations are appended to your current API.
  1. Go to your Azure API Management instance in the Azure portal.
  2. Select APIs on the Overview page or from the menu on the left.
  3. Click ... ...
  4. Select Import from the drop-down menu.
  5. Select a service from which to import an API.
May 22, 2024

Is Azure portal an API? ›

Trusted by companies of all sizes. "Customization is one of the strongest features of Azure API Management. We can customize our portal easily, moving components into the base, adding our own images and text, and choosing from a wide variety of layouts to highlight our brand."

How do I access Azure APIs? ›

To access the API, you register a client app with Microsoft Entra ID and request a token.
  1. Register an app in Microsoft Entra ID.
  2. On the app's overview page, select API permissions.
  3. Select Add a permission.
  4. On the APIs my organization uses tab, search for Log Analytics and select Log Analytics API from the list.
Jul 2, 2024

What is API portal? ›

API portals are bridges between API providers and API consumers that provide information about the API at every stage of an API's lifecycle. API portals allow providers to expose and publicize their APIs, educate developer communities about them, provision user access, generate client keys and more.

How to check API in Azure Portal? ›

In the Azure portal, navigate to your API Management instance. On the Overview page, on the Monitor tab, review key metrics for your APIs. To investigate metrics in detail, select Metrics from the left menu. From the drop-down, select metrics you're interested in.

How do I call an API in Azure? ›

In the Azure portal, select your web app or API app. In the app menu that opens, under API, select API definition. Set the API definition location to the URL for your swagger. json file.

How do I create and deploy an API in Azure? ›

Publish the API app to Azure App Service
  1. In Solution Explorer, right-click the project and select Publish.
  2. In the Publish dialog, select Azure and select the Next button.
  3. Select Azure App Service (Windows) and select the Next button.
  4. Select Create a new Azure App Service. ...
  5. Select the Create button.
Nov 4, 2022

How do I connect to Azure portal? ›

You can find this username within the Azure tile of the Customer Control Panel (CCP). 2) You can either access the Azure Portal but clicking on the hyperlink within the Welcome email or by clicking the “Log In” button under the Azure tile of the CCP. 4) Enter the login credentials and click on the Sign in button.

What is Azure API Management Portal? ›

Azure API Management is a fully managed service that helps developers to securely expose their APIs to external and internal customers.

Where is the secret key in Azure portal? ›

1 answer
  1. Login to the Azure Portal.
  2. Navigate to Azure Active Directory.
  3. Select App Registrations , locate the Azure AD App that you're trying to find the Client ID and Client Secret Key for.
  4. Within the Azure AD App, select Certificates & Secrets.
May 2, 2022

How to host an API on Azure? ›

In the Azure management console, create a new Web-app resource by clicking 'Create a resource' -> Web -> Web App. In the next menu, choose a name/URL for the Web App and define other Web App settings (though the default should be sufficient). Deploy the API Server by copying the files to the web-app.

How do I create an API in Azure function? ›

Isolated worker process C# class library functions and all other language runtimes should instead use Azure API Management integration from the portal.
  1. Prerequisites. ...
  2. Create a Functions project. ...
  3. Update the function code. ...
  4. Run and verify the API locally. ...
  5. Publish the project to Azure. ...
  6. Get the function access key.
Jan 29, 2023

How does API work in Azure? ›

All requests from client applications first reach the API gateway, which then forwards them to respective backend services. The API gateway acts as a facade to the backend services, allowing API providers to abstract API implementations and evolve backend architecture without impacting API consumers.

How do I make an API call in Azure? ›

In the Azure portal, select your web app or API app. In the app menu that opens, under API, select API definition. Set the API definition location to the URL for your swagger. json file.

Top Articles
VMware Training, Online Professional Courses | CBT Nuggets
High-End Computer Ban!
Unit 30 Quiz: Idioms And Pronunciation
Skyward Houston County
Obor Guide Osrs
Missing 2023 Showtimes Near Cinemark West Springfield 15 And Xd
THE 10 BEST Women's Retreats in Germany for September 2024
Southeast Iowa Buy Sell Trade
Obituary (Binghamton Press & Sun-Bulletin): Tully Area Historical Society
7.2: Introduction to the Endocrine System
Yi Asian Chinese Union
Puretalkusa.com/Amac
27 Places With The Absolute Best Pizza In NYC
Elden Ring Dex/Int Build
Geometry Escape Challenge A Answer Key
Maxpreps Field Hockey
United Dual Complete Providers
Soccer Zone Discount Code
Walmart stores in 6 states no longer provide single-use bags at checkout: Which states are next?
Royal Cuts Kentlands
Pjs Obits
Tyler Sis University City
Craigslist Battle Ground Washington
Shadbase Get Out Of Jail
Living Shard Calamity
Milwaukee Nickname Crossword Clue
Rek Funerals
Meet the Characters of Disney’s ‘Moana’
Garden Grove Classlink
Tomb Of The Mask Unblocked Games World
Jeep Cherokee For Sale By Owner Craigslist
Wow Quest Encroaching Heat
SF bay area cars & trucks "chevrolet 50" - craigslist
Sabrina Scharf Net Worth
Mid America Irish Dance Voy
Gfs Ordering Online
Craigs List Hartford
QVC hosts Carolyn Gracie, Dan Hughes among 400 laid off by network's parent company
Gamestop Store Manager Pay
Jaefeetz
BCLJ July 19 2019 HTML Shawn Day Andrea Day Butler Pa Divorce
Killer Intelligence Center Download
Upcoming Live Online Auctions - Online Hunting Auctions
Product Test Drive: Garnier BB Cream vs. Garnier BB Cream For Combo/Oily Skin
Pelican Denville Nj
Great Clips Virginia Center Commons
Mkvcinemas Movies Free Download
Provincial Freeman (Toronto and Chatham, ON: Mary Ann Shadd Cary (October 9, 1823 – June 5, 1893)), November 3, 1855, p. 1
Famous Dave's BBQ Catering, BBQ Catering Packages, Handcrafted Catering, Famous Dave's | Famous Dave's BBQ Restaurant
Booked On The Bayou Houma 2023
Guidance | GreenStar™ 3 2630 Display
Latest Posts
Article information

Author: Kelle Weber

Last Updated:

Views: 5605

Rating: 4.2 / 5 (53 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Kelle Weber

Birthday: 2000-08-05

Address: 6796 Juan Square, Markfort, MN 58988

Phone: +8215934114615

Job: Hospitality Director

Hobby: tabletop games, Foreign language learning, Leather crafting, Horseback riding, Swimming, Knapping, Handball

Introduction: My name is Kelle Weber, I am a magnificent, enchanting, fair, joyous, light, determined, joyous person who loves writing and wants to share my knowledge and understanding with you.