Error 405 (method not allowed) while using Azure AI Search API

Dav 0 Reputation points
2024-10-23T20:04:43.8+00:00

Hello,

I get the error 405 (method not allowed) while using the Azure AI Search API. I do not understand why.

I will explain what I want to do and the error I get. I do not have an extensive technical background so please excuse approximations if any.

  1. I created a vector database from which I can search successfully as seen below.
  2. User's image
  3. I want to access this externally. So I plan to use the API single search vector (https://learn.microsoft.com/en-us/azure/search/search-get-started-vector?tabs=azure-cli#single-vector-search-with-filter). The API request is written as follows: (url and api key and vectors are not displayed here ) ### Run a vector query with a filter POST {{baseUrl}}/indexes/hotels-vector-quickstart/docs/search?api-version=2023-11-01 HTTP/1.1
    *Content-Type: application/json*
    
    *Authorization: Bearer {{token}}*
    
    *{*
    
        *"count": true,*
    
        *"select": "chunk,title,parent_id,@search.score,text_vector",*
    
        *"filter": "Tags/any(tag: tag eq 'free wifi')",*
    
        *"vectorFilterMode": "postFilter",*
    
        *"vectorQueries": [*
    
        *{*
    
            ***"vector": [ VECTOR OMITTED ],***
    
            *"k": 7,*
    
            *"fields": "DescriptionVector",*
    
            *"kind": "vector",*
    
            *"exhaustive": true*
    
        *},*
    
    *]*
    
    }
  4. One note: Insted of "Vector omitted" above I actually send the full vector coming from OpenAI that are the same size as the one used by AzureAI Search.
  5. As a result of this API Request I get this:
    response: { headers: [HTTP/2 405,allow: GET,content-language: en,server: Microsoft-IIS/10.0,strict-transport-security: max-age=2592000,request-id: f20c21b8-fa0a-4bc3-a7fe-fa18f87919ef,elapsed-time: 9,strict-transport-security: max-age=15724800; includeSubDomains,date: Wed, 23 Oct 2024 20:03:26 GMT], result: , status: 405 }

Could you please help me finding what I do wrong? Thank you

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,339 questions
{count} votes

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.