x-ms-version is a HTTP header which is used in Service Management API calls to specify the version of operation. You could also specify x-ms-version in Azure Storage Services APIs. In other words users can specify which version of an operation they want to use by setting the x-ms-version request header. The benefits of x-ms-version is that if there is a new version of the API is available, it will not break the functionality of your existing code. Users can modify the code to call a newer version of API by specifying the x-ms-version HTTP Headers.
The x-ms-version request header value must be specified in the format YYYY-MM-DD. For example:
To understand it better, here is an example for you. I will call List Hosted Services Service Management API from Fiddler to get a list of the cloud services available under the specified subscription. This is what we need to do:
Here are the detailed steps:
7. As you could see, this has returned a list of Cloud services. And if you expand the tree, you could see several fields. So this was the response when we use 2009-10-01 to define the version for the operations. Now let's try again with a different x-ms-version value. This time we will use 2013-03-01 as value of x-ms-version.
8. After executing the request, I got the following response:
Now as you could see, for 2013-03-01 version of operation, I got a bit different response. This time I got 6 more fields in response. So now as you could see that we got different response because we passed different version number for x-ms-version.