Home > OS >  Need to get last activity date or some date to show inactive projects in azuredevops
Need to get last activity date or some date to show inactive projects in azuredevops

Time:08-10

I am trying to go through all of our projects in Azure DevOps to determine projects that haven't had any activity (builds, releases, commits, changes, what have you) along with their project leads within a given amount of time, say last year. I have yet not found a clear concise way to gather this information from our Azure DevOps organization, so I am here reaching out for some assistance.

Basically we are doing housekeeping activities to clean up the organization.

Thanks in advance.

CodePudding user response:

In Azure DevOps as so far I know there is no way to get a list of inactive projects, but of course there is a place call usage where you can get logs of all the activities of Projects(projects with activities). So what you can do is, from a list of projects, filter out which haven't had any activity.

Organization settings > Usage  

enter image description here

CodePudding user response:

You could use GET project API to check the "lastUpdateTime" of each projects.

https://docs.microsoft.com/en-us/rest/api/azure/devops/core/Projects/List?view=azure-devops-rest-7.1&tabs=HTTP

GET https://dev.azure.com/{organization}/_apis/projects?api-version=7.1-preview.4

Check the response body ("lastUpdateTime")

{
    "count": 13,
    "value": [
        {
            "id": "",
            "name": "Kim Test Project",
            "description": "",
            "url": "",
            "state": "wellFormed",
            "revision": 149,
            "visibility": "private",
            "lastUpdateTime": "2022-06-14T03:06:44.777Z"
        },
        {
            "id": "",
            "name": "",
            "url": "",
            "state": "wellFormed",
            "revision": 177,
            "visibility": "private",
            "lastUpdateTime": "2022-08-09T01:32:47.34Z"
  • Related