HDC REST API v2.0!
Published Feb 18 2020 12:30 PM 4,164 Views
Microsoft

As a part of the work to enable automatic driver delivery for everyone. We had to make changes to our API surface. As there are differences in the models, this would have been a breaking change for our API consumers. With that in mind you’ll see our documentation now references v2.0 in the API paths.

 

E.g.

 

 

https://manage.devcenter.microsoft.com/v2.0/my/hardware/products/{productID}/submissions/{submissionId}/shippingLabels

 

 

 

We will keep v1.0 up and running until September 1, 2020. At that time we will decommission HDC API v1.

 

For most of the API surface, all you need do is update the version number in the path. Though note that the following APIs have changes to their models, which will require just a bit more tweaking:

https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/create-a-new-shipping-label

https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/manage-shipping-labels

 

And a reminder that our up to date API reference can be found here:

https://docs.microsoft.com/en-us/windows-hardware/drivers/dashboard/dashboard-api

1 Comment
Copper Contributor

We have an app based on the Hardware Dashboard API sample which has been working for a year+ up until a week ago.  After investigation we found that the API had expired. After renewing the key the app is now producing tokens. We've also moved to specifying v2.0 in the request Url as described above. The app now hits a 403 response getting an existing product id. Here are the call details.

 

Token request
{Method: POST, RequestUri: 'https://login.microsoftonline.com/c1c2acae-a7ad-48b7-a7e0-88c9198c3a43/oauth2/token', Version: 1.1, Content: System.Net.Http.StringContent, Headers:
{
Content-Type: application/x-www-form-urlencoded; charset=utf-8
}}
Content: {System.Net.Http.StringContent}
Headers: {}
Method: {POST}
Properties: Count = 0
RequestUri: {https://login.microsoftonline.com/c1c2acae-a7ad-48b7-a7e0-88c9198c3a43/oauth2/token}
Version: {1.1}

 

token request content
grant_type=client_credentials&client_id=c70d7683-9fa1-404c-ae30-2a98953ce5a9&client_secret=__OUR_API_SECRET__=&resource=https://manage.devcenter.microsoft.com

 

GET PRODUCT:
GET /v2.0/my/hardware/products/14375692472057896

 

request:
{Method: GET, RequestUri: '/v2.0/my/hardware/products/14375692472057896', Version: 1.1, Content: <null>, Headers:
{
MS-CorrelationId: a55bedbf-1336-4aac-b3c9-b21b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hazJBQUEuIiwic3ViIjoiNDQ4ODk1ZWEtOTgxYS00MzU4LTgzMGUtNGUxNWY5MWNjYTkxIiwidGlkIjoiYzFjMmFjYWUtYTdhZC00OGI3LWE3ZTAtODhjOTE5OGMzYTQzIiwidXRpIjoiYVBQd0RsZmNFVUtFVjNrajAzU2tBQSIsInZlciI6IjEuMCJ9.AA239DJDfVNm4oOIzizOioIqcVF-a8hEi9yC9QBSPdthLRLng5q7Ah35h-3P83h54brcJOKRCSm2Fw-DAu9wkFZs4T_ZN
Bab3h51CyBkK1E1pgiDMdn79AE9YC-qgMNPvNVnDK-VD_mOtQ1YXn_i-RmIitgbzuhSM9i99JTQS7r0bgrl7iDVV0R6ThDEacGEqNaV8kv7_i8nSvqk8kFuvIwE--jwej-qk_HikvhtnRAtttr2L1iN4-XS0PcfNwhJKQAkJBD2gaUUJmmY6NM9Ruf77AHbjQeauKpbzPKyUUtP0-jhHjECp8XUr3Dls6DebpvPcMUmUTJFcSyXO9mkhA
}
Method: {GET}
Properties: Count = 0
RequestUri: {/v2.0/my/hardware/products/14375692472057896}
Version: {1.1}

 

response
{StatusCode: 403, ReasonPhrase: 'Forbidden', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
Transfer-Encoding: chunked
Request-Context: appId=cid-v1:7c23eef7-4ead-46df-8a76-525b2a71dec2
Date: Mon, 21 Jun 2021 19:25:16 GMT
X-Powered-By: ASP.NET
}}
Content: {System.Net.Http.StreamContent}
Headers: {Transfer-Encoding: chunked
Request-Context: appId=cid-v1:7c23eef7-4ead-46df-8a76-525b2a71dec2
Date: Mon, 21 Jun 2021 19:25:16 GMT
X-Powered-By: ASP.NET
}
IsSuccessStatusCode: false
ReasonPhrase: "Forbidden"
RequestMessage: {Method: GET, RequestUri: 'https://manage.devcenter.microsoft.com/v2.0/my/hardware/products/14375692472057896', Version: 1.1, Content: <null>, Headers:
{
MS-CorrelationId: a55bedbf-1336-4aac-b3c9-b21b8538e106
MS-RequestId: 5b4c761a-0f32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