Azure DevOps Test Runs API GET请求日期格式错误问题咨询
Let's break down the issues causing your error and fix them step by step:
Fix the date range order first
Your current request hasminLastUpdatedDateset to2019-05-17T14:00:00.910ZandmaxLastUpdatedDateset to2019-05-15T14:00:00.910Z—this is backwards! The minimum date can't be later than the maximum date, and this logical mismatch is definitely triggering part of the "Invalid dates specified" error. Swap them sominLastUpdatedDateis the earlier date.Use the correct ISO 8601 date format
While the docs don't spell it out explicitly, Azure DevOps APIs rely on standard ISO 8601 UTC timestamps. Valid formats include:yyyy-MM-ddTHH:mm:ssZ(e.g.,2019-05-15T14:00:00Z)yyyy-MM-ddTHH:mm:ss.fffZ(with three-digit milliseconds, like your original but in the right order)
The key is ending withZto denote UTC, or including a timezone offset like+00:00.
Corrected API request example
Here's your fixed request with the date order swapped and valid formatting:https://dev.azure.com/organisation/project/_apis/test/runs?api-version=5.0&releaseEnvIds=12345&minLastUpdatedDate=2019-05-15T14:00:00.910Z&maxLastUpdatedDate=2019-05-17T14:00:00.910Z
Also, just a reminder: you're right about the 7-day limit for the date range—your adjusted range (2 days) falls well within that requirement, so that won't be an issue here.
内容的提问来源于stack exchange,提问作者Callum Wilson

