Rest api to access the index

Mansi Gusain 165 Reputation points
2025-01-22T07:22:17.49+00:00

Hey, I have been using the azure search index on the portal itself to query, but I wanted to try it using Postman. so this is the url - https://ai-search-service-<hidden>.search.windows.net and i have the primary key what else is required. Can i ask and query from the index using a rest api?in postman?

Thanks in advance.

Azure AI Search
Azure AI Search
An Azure search service with built-in artificial intelligence capabilities that enrich information to help identify and explore relevant content at scale.
1,168 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Sampath 0 Reputation points Microsoft Vendor
    2025-02-03T11:10:05.6333333+00:00

    Hello @Mansi Gusain,

    Greetings!

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out! I hope you are doing well.

    Based on this Microsoft documentation, the Azure AI Search REST URL should be structured as follows:

    https://<your-search-service-name>.search.windows.net/indexes/searchindex-confluence-uxr/docs/search?api-version=2024-07-01
    

    The request method should be set to POST and Next, add the required headers as shown below:

    enter image description here

    In Postman, navigate to the Body section, select "raw" and "JSON", and then add your search index query.

    For example, you can use the following queries:

    {
    
      "search": "*",
    
      "top": 10,
    
      "select": "id,content"
    
    }
    

    (or)

    {
    
    "search": "*",
    
    "top": 1,
    
    "select": "HotelId,HotelName"
    
    }
    

    PostMan

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.