How to remove unused runbook teams

This example shows you how to remove unused runbook teams that are no longer required.

1. Identify unused runbook teams

In the runbook below, we have identified four teams with no members. As a result, these teams are no longer necessary and will be removed from the runbook.

Let’s start by making an authenticated call to List Runbook Teams in a Runbook. We will use a GET request, the URL will look like the following:

/core/runbooks/{runbook_id}/runbook_teams

The API response provides a list of Runbook teams, each accompanied by a relationship indicating the user_count. If a runbook team has a user_count of 0, it can be removed from the runbook. For example, the following API response indicates that the Database Team has no associated users:

{
     "id": "2",
      "type": "runbook_team",
      "attributes": {
        "color": "rgb(230,114,80)",
        "linked": false,
        "name": "Database Team"
      },
      "relationships": {},
      "links": {},
      "meta": {
        "users_count": 0
      }

2. Delete a runbook team

To remove the runbook teams, you will need to utilize the Delete a Runbook Team endpoint. This involves sending a DELETE request, with the URL structured as follows:

/core/runbooks/{runbook_id}/runbook_teams/{id}

Note: The delete a runbook team endpoint will need to be executed for the App Owner, Database Team, Networks Team and the Validation Team using the runbook team ID’s identified in step 1.

From the screenshot below you can now see the runbook teams are no longer present.