How to react to message from Microsoft regarding updating API's
Asked Answered
A

4

6

I got a message from Microsoft in the last few days

Azure SQL Database 2014-04-01 APIs will be retired on 31 October 2025.

You're receiving this email because you use Azure SQL Database APIs.

To improve performance and security, we're updating Azure SQL Database APIs. As part of this, all version 2014-04-01 APIs will be retired on 31 October 2025. You'll need to update your resources, including templates, tools, scripts, and programs, to use a newer API version by then. Any API calls still using the older versions after that date will stop working until you've updated them.

I access my Azure SQL Databases in the following manner.

  1. From the WebApp via a Java connection and an ODBC driver

    public final class DBConnection {
    private static DataSource ds = null;
    private static DBConnection instance = null;
    
    private DBConnection() throws NamingException {
       InitialContext ic = new InitialContext();
       ds = (DataSource) ic.lookup(Monitor.getDsName());
    }
    
    <dependency>
         <groupId>com.microsoft.sqlserver</groupId>
         <artifactId>mssql-jdbc</artifactId>
         <version>10.2.1.jre11</version>
     </dependency>
    
  2. via sqlcmd

  3. via node.js

     const configDB = {
    
     user: "",
     password: "",
     server: "myserver.database.windows.net",
     database: "mydb",
     connectionTimeout: 3000,
     parseJSON: true,
     options: {
         encrypt: true,
         enableArithAbort: true
     },
     pool: {
         min: 0,
         idleTimeoutMillis: 3000
     }
     };
     const poolDB = new sql.ConnectionPool(configDB);
     aLine='EXEC ...'
     await poolFOI.connect();
     let resultDB = await poolDB.request().query(aLine);
    
  4. Via Azure Logic Apps (using an API Connections)

  5. Via Azure Function Apps (connecting similar to the WebApp Above)

  6. Via SSMS

Which of these are possibly triggering the message about Azure SQL Database APIs? Also I started using Azure after 2020, so it does not make sense to me that I would be using APIs from 2014

Axum answered 2/11, 2022 at 16:12 Comment(1)
This question isn't about SQL Server (Azure SQL Database isn't SQL Server), it's about the Azure SQL Database API, which you aren't interacting with SQL Server as far as I can tell. So i would suggest tagging the technologies you are asking about.Jermyn
C
11

The API mentioned in the email (I also got the same) is for managing the SQL Database Servers and the Database itself (in other words they are the control plane API) and not the data inside them. You would use the SQL REST API to perform management operations on the SQL Database resources.

They will have no impact on how you connect to the database and manage the data inside those databases which is what your code is currently doing.

So unless you are using the version 2014-04-01 of the REST API to manage the SQL Database Servers and SQL Databases (and not the data inside them), you can safely ignore the email.

You can learn more about the SQL Database REST APIs here: https://learn.microsoft.com/en-us/rest/api/sql/.

Cattima answered 2/11, 2022 at 18:20 Comment(0)
R
3

I started using Azure after 2020, so it does not make sense to me that I would be using APIs from 2014

2014-04-01 refers to a specific version of the Azure SQL Database APIs. Azure API HTTP requests specify their version explicitly, usually via a header or query parameter. It looks like Azure SQL Database specifies the API version in an api-version query parameter. API versions are not updated very often, so it's normal to use a version that's years old. E.g., the next stable version after 2014-04-01 is 2021-11-01.

Whatever libraries you're using are probably tied to a specific version, and you can probably just upgrade those libraries to use a later API version. If you're not sure which library is using the old version, you can try using an HTTP proxy to sniff the traffic and inspect the api-version query parameter.

Rounds answered 2/11, 2022 at 16:28 Comment(2)
Thank you for your clarification about the API Versions being updated on an irregular basis. With regard to your second point, before using a HTTP proxy to sniff the traffic, would it be possible for you to clarify which of the six different types of connections that I list might be more problematic than others.Axum
@gordon613: I have no idea, sorry.Rounds
W
2

I found an answer which helps with a little more context on finding out usage here: https://learn.microsoft.com/en-us/answers/questions/1072411/how-do-i-update-an-azure-sql-database-to-a-newer-v

You could use this query to find out more on your usage:

HttpIncomingRequests  
| where TIMESTAMP > ago(1d)  
| where targetResourceProvider == 'MICROSOFT.SQL'  
| where subscriptionId == 'xxxxxxxxxxxx'  
| where apiVersion == "2014-04-01" or apiVersion == "2014-01-01" or apiVersion == "2014-04-01-preview"

To possibly answer "Which of these are possibly triggering the message about Azure SQL Database APIs?":

Customers who have registered for Microsoft.SQL will receive these notifications, Even though if the customer did not create the Azure SQL DB they receive it due to the Microsft.SQL is registered for the subscription.

Sounds like we should get more details soon? (It was posted Nov 2nd)

there will be coming up more details on this retirement in the next few weeks

Wakerife answered 4/12, 2023 at 15:53 Comment(1)
I "think" you can only use that query if you have Azure Data Explorer cluster, but correct me if I'm wrongAryn
A
2

If you stumble upon this question like me and get bombarded by MS emails telling you to upgrade all Azure SQL Database resources that use version 2014-04-01 APIs to a newer stable version by October 31, 2025, and if you are as clueless as I am, then this answer from Uwe Fuchs will probably help you the most:

https://learn.microsoft.com/en-us/answers/questions/2006332/problem-retire-older-version-azure-sql-apis?source=docs

It's the only good answer that explains exactly how and where to run the query against the Azure Resource Graph.

HttpIncomingRequests
| where TIMESTAMP > ago(30d)
| where targetResourceProvider == 'MICROSOFT.SQL'
| where subscriptionId == 'update-this-to-your-subid' //make sure you update this
| where apiVersion == "2014-04-01" or apiVersion == "2014-01-01" or apiVersion == "2014-04-01-preview"

To use this query:

  1. Search for "Resource Graph Explorer" on the Azure portal.
  2. Open Resource Graph Explorer and paste the query into the query window.
  3. Execute the query to see if any resources are using the deprecated API versions.

If it returns an error like in my case "Query is invalid[...]", it most likely just means that you are not using the Azure SQL API at all and there is nothing for you to do.

For example, I only access Azure SQL with .Net applications via a connection string using TCP. That's why I get the error with the query, because I never made HttpIncomingRequests and therefore this table does not exist in the graph.

Ambrogio answered 28/8, 2024 at 15:12 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.