MicrosoftDocs / vsts-rest-api-specs

MIT License
169 stars 116 forks source link

Deleted Items will appear in test run list, could we document what property to filter out on. #720

Open JasonF-BJSS opened 3 months ago

JasonF-BJSS commented 3 months ago

[Enter feedback here]

Deleted test runs appear in the Runs - list API, and there is no documented way to filter these out,

I have found the status is set to 255 when a run is deleted, however this is an assumption and basing API interaction on an un-documented behavior is problematic.

Please would it be possible to update the documentation with an approved method to filter on deleted test runs.

Sources:

Runs List: https://learn.microsoft.com/en-us/rest/api/azure/devops/test/runs/list?view=azure-devops-rest-7.1&tabs=HTTP

Runs Delete: https://learn.microsoft.com/en-us/rest/api/azure/devops/test/runs/delete?view=azure-devops-rest-7.1&tabs=HTTP

Current workaround:

    runs = []
    for run in all_runs:
        if not run.state == "255":
            runs.append(run)

    return runs

Document Details

Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.