Share via

Can't "Refresh a URL programmatically" in Language Studio

Daniel Hjelm 50 Reputation points
2023-03-16T14:02:22.3733333+00:00

I am trying to use the "Refresh a URL programmatically" following this guide: https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/question-answering/how-to/export-import-refresh#refresh-a-url-programmatically. I get Status Code 202 on my response but the URL is not refreshed in Language Studio. This is the entire response I get:

{

    "statusCode": 202,

    "headers": {

        "operation-location": "MyEndpoint",

        "x-envoy-upstream-service-time": "57",

        "apim-request-id": "28c7a0bd-8d5d-406b-a4d2-f415dcf67528",

        "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload",

        "x-content-type-options": "nosniff",

        "x-ms-region": "West Europe",

        "Date": "Thu, 16 Mar 2023 13:33:12 GMT",

        "Content-Length": "0"

    }

}
Azure Language in Foundry Tools
Azure Language in Foundry Tools

An Azure service that provides natural language capabilities including sentiment analysis, entity extraction, and automated question answering.

Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments

Answer accepted by question author

Rohit Mungi 49,131 Reputation points Microsoft Employee Moderator
2023-03-21T17:15:33.5566667+00:00

Using a GET operation on the operation-location URL could you please check the status of the job?

This is documented on this page to check the update status of source. The query should look like below:

curl -X GET -H "Ocp-Apim-Subscription-Key: {API-KEY}" -H "Content-Type: application/json" -d '' 'https://{ENDPOINT}.api.cognitive.microsoft.com/language/query-knowledgebases/projects/{PROJECT-NAME}/sources/jobs/{JOB-ID}?api-version=2021-10-01'

I believe the status of the job has most probably failed so the update is not seen in your project in language studio.

If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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