How to update API version

Amol Harde 25 Reputation points
2023-09-26T06:54:03.4233333+00:00

Hello All,

We are getting the following error for the previous version of the API

"message":"Form Recognizer API (v3) 2022-06-30-preview has been deprecated. Please upgrade to the latest Form Recognizer GA service - https://aka.ms/FormRecognizer."

Please guide us on how to update the new version

We have used java sdk.

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,718 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. santoshkc 9,405 Reputation points Microsoft Vendor
    2023-09-26T12:17:49.14+00:00

    Hi @Amol Harde ,

    Thank you for reaching out to the Microsoft Q&A forum!

    To migrate from the 2022-06-30-preview API version to the latest 2023-07-31 (GA) API version using the SDK, update to the current version of the language specific SDK. The Document Intelligence SDK enables the use and management of the Document Intelligence service in your application. The SDK builds on the underlying Document Intelligence REST API allowing you to easily use those APIs within your programming language paradigm. Here's how you use the Document Intelligence SDK for your preferred language:

    1. Install the SDK client library User's image
    2. Import the SDK client library into your application User's image
    3. Set up authentication There are two supported methods for authentication

    User's image

    Use an Azure Active Directory (Azure AD) token credential

    Note: Regional endpoints do not support AAD authentication. Create a custom subdomain for your resource in order to use this type of authentication.

    Authorization is easiest using the DefaultAzureCredential. It provides a default token credential, based upon the running environment, capable of handling most Azure authentication scenarios.

    Here's how to acquire and use the DefaultAzureCredential for Java applications:

    1. Install the Azure Identity library for Java: User's image

    2.Register an Azure AD application and create a new service principal. 3.Grant access to Document Intelligence by assigning the Cognitive Services User role to your service principal. 4.Set the values of the client ID, tenant ID, and client secret of the Azure AD application as environment variables: AZURE_CLIENT_IDAZURE_TENANT_ID, and AZURE_CLIENT_SECRET, respectively. 5.Create your DocumentAnalysisClient instance and TokenCredential variable: User's image

    For more information, see Authenticate the client

    1. Build your application Create a client object to interact with the Document Intelligence SDK, and then call methods on that client object to interact with the service. The SDKs provide both synchronous and asynchronous methods. For more insight, try a quickstart in a language of your choice.

     I hope this information helps! Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, Thanks.


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.