Skip to main content
DELETE
/
v1
/
incidents
/
{id}
/
remove_subscribers
Remove subscribers from incident
curl --request DELETE \
  --url https://api.rootly.com/v1/incidents/{id}/remove_subscribers \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '
{
  "data": {
    "type": "incidents",
    "attributes": {
      "user_ids": [
        "<string>"
      ],
      "remove_users_with_no_private_incident_access": false
    }
  }
}
'
import requests

url = "https://api.rootly.com/v1/incidents/{id}/remove_subscribers"

payload = { "data": {
        "type": "incidents",
        "attributes": {
            "user_ids": ["<string>"],
            "remove_users_with_no_private_incident_access": False
        }
    } }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/vnd.api+json"
}

response = requests.delete(url, json=payload, headers=headers)

print(response.text)
const options = {
  method: 'DELETE',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
  body: JSON.stringify({
    data: {
      type: 'incidents',
      attributes: {user_ids: ['<string>'], remove_users_with_no_private_incident_access: false}
    }
  })
};

fetch('https://api.rootly.com/v1/incidents/{id}/remove_subscribers', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.rootly.com/v1/incidents/{id}/remove_subscribers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "DELETE",
  CURLOPT_POSTFIELDS => json_encode([
    'data' => [
        'type' => 'incidents',
        'attributes' => [
                'user_ids' => [
                                '<string>'
                ],
                'remove_users_with_no_private_incident_access' => false
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer <token>",
    "Content-Type: application/vnd.api+json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.rootly.com/v1/incidents/{id}/remove_subscribers"

	payload := strings.NewReader("{\n  \"data\": {\n    \"type\": \"incidents\",\n    \"attributes\": {\n      \"user_ids\": [\n        \"<string>\"\n      ],\n      \"remove_users_with_no_private_incident_access\": false\n    }\n  }\n}")

	req, _ := http.NewRequest("DELETE", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/vnd.api+json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.delete("https://api.rootly.com/v1/incidents/{id}/remove_subscribers")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/vnd.api+json")
  .body("{\n  \"data\": {\n    \"type\": \"incidents\",\n    \"attributes\": {\n      \"user_ids\": [\n        \"<string>\"\n      ],\n      \"remove_users_with_no_private_incident_access\": false\n    }\n  }\n}")
  .asString();
require 'uri'
require 'net/http'

url = URI("https://api.rootly.com/v1/incidents/{id}/remove_subscribers")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n  \"data\": {\n    \"type\": \"incidents\",\n    \"attributes\": {\n      \"user_ids\": [\n        \"<string>\"\n      ],\n      \"remove_users_with_no_private_incident_access\": false\n    }\n  }\n}"

response = http.request(request)
puts response.read_body
{
  "data": {
    "id": "<string>",
    "type": "incidents",
    "attributes": {
      "title": "<string>",
      "created_at": "<string>",
      "updated_at": "<string>",
      "id": "<string>",
      "sequential_id": 123,
      "kind": "<string>",
      "slug": "<string>",
      "parent_incident_id": "<string>",
      "duplicate_incident_id": "<string>",
      "summary": "<string>",
      "private": false,
      "source": "<string>",
      "status": "<string>",
      "url": "<string>",
      "short_url": "<string>",
      "public_title": "<string>",
      "user": {},
      "severity": {
        "data": {
          "id": "<string>",
          "type": "severities",
          "attributes": {
            "name": "<string>",
            "created_at": "<string>",
            "updated_at": "<string>",
            "slug": "<string>",
            "description": "<string>",
            "color": "<string>",
            "position": 123,
            "notify_emails": [
              "<string>"
            ],
            "slack_channels": [
              {
                "id": "<string>",
                "name": "<string>"
              }
            ],
            "slack_aliases": [
              {
                "id": "<string>",
                "name": "<string>"
              }
            ]
          }
        },
        "included": [
          {
            "id": "<string>",
            "type": "<string>",
            "attributes": {},
            "relationships": {}
          }
        ]
      },
      "environments": [
        {
          "data": {
            "id": "<string>",
            "type": "environments",
            "attributes": {
              "name": "<string>",
              "created_at": "<string>",
              "updated_at": "<string>",
              "slug": "<string>",
              "description": "<string>",
              "notify_emails": [
                "<string>"
              ],
              "color": "<string>",
              "position": 123,
              "slack_channels": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "slack_aliases": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "properties": [
                {
                  "catalog_property_id": "<string>",
                  "value": "<string>"
                }
              ]
            }
          },
          "included": [
            {
              "id": "<string>",
              "type": "<string>",
              "attributes": {},
              "relationships": {}
            }
          ]
        }
      ],
      "incident_types": [
        {
          "data": {
            "id": "<string>",
            "type": "incident_types",
            "attributes": {
              "name": "<string>",
              "created_at": "<string>",
              "updated_at": "<string>",
              "slug": "<string>",
              "description": "<string>",
              "color": "<string>",
              "position": 123,
              "notify_emails": [
                "<string>"
              ],
              "slack_channels": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "slack_aliases": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "properties": [
                {
                  "catalog_property_id": "<string>",
                  "value": "<string>"
                }
              ]
            }
          },
          "included": [
            {
              "id": "<string>",
              "type": "<string>",
              "attributes": {},
              "relationships": {}
            }
          ]
        }
      ],
      "services": [
        {
          "data": {
            "id": "<string>",
            "type": "services",
            "attributes": {
              "name": "<string>",
              "created_at": "<string>",
              "updated_at": "<string>",
              "slug": "<string>",
              "description": "<string>",
              "public_description": "<string>",
              "notify_emails": [
                "<string>"
              ],
              "color": "<string>",
              "position": 123,
              "backstage_id": "<string>",
              "external_id": "<string>",
              "pagerduty_id": "<string>",
              "opsgenie_id": "<string>",
              "cortex_id": "<string>",
              "service_now_ci_sys_id": "<string>",
              "github_repository_name": "<string>",
              "github_repository_branch": "<string>",
              "gitlab_repository_name": "<string>",
              "gitlab_repository_branch": "<string>",
              "kubernetes_deployment_name": "<string>",
              "environment_ids": [
                "<string>"
              ],
              "service_ids": [
                "<string>"
              ],
              "owner_group_ids": [
                "<string>"
              ],
              "owner_user_ids": [
                123
              ],
              "alert_urgency_id": "<string>",
              "escalation_policy_id": "<string>",
              "alerts_email_enabled": true,
              "alerts_email_address": "<string>",
              "slack_channels": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "slack_aliases": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "alert_broadcast_enabled": true,
              "alert_broadcast_channel": {
                "id": "<string>",
                "name": "<string>"
              },
              "incident_broadcast_enabled": true,
              "incident_broadcast_channel": {
                "id": "<string>",
                "name": "<string>"
              },
              "properties": [
                {
                  "catalog_property_id": "<string>",
                  "value": "<string>"
                }
              ]
            }
          },
          "included": [
            {
              "id": "<string>",
              "type": "<string>",
              "attributes": {},
              "relationships": {}
            }
          ]
        }
      ],
      "functionalities": [
        {
          "data": {
            "id": "<string>",
            "type": "functionalities",
            "attributes": {
              "name": "<string>",
              "created_at": "<string>",
              "updated_at": "<string>",
              "slug": "<string>",
              "description": "<string>",
              "public_description": "<string>",
              "notify_emails": [
                "<string>"
              ],
              "color": "<string>",
              "backstage_id": "<string>",
              "external_id": "<string>",
              "pagerduty_id": "<string>",
              "opsgenie_id": "<string>",
              "opsgenie_team_id": "<string>",
              "cortex_id": "<string>",
              "service_now_ci_sys_id": "<string>",
              "position": 123,
              "environment_ids": [
                "<string>"
              ],
              "service_ids": [
                "<string>"
              ],
              "owner_group_ids": [
                "<string>"
              ],
              "owner_user_ids": [
                123
              ],
              "escalation_policy_id": "<string>",
              "slack_channels": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "slack_aliases": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "properties": [
                {
                  "catalog_property_id": "<string>",
                  "value": "<string>"
                }
              ]
            }
          },
          "included": [
            {
              "id": "<string>",
              "type": "<string>",
              "attributes": {},
              "relationships": {}
            }
          ]
        }
      ],
      "groups": [
        {
          "data": {
            "id": "<string>",
            "type": "groups",
            "attributes": {
              "name": "<string>",
              "created_at": "<string>",
              "updated_at": "<string>",
              "slug": "<string>",
              "description": "<string>",
              "notify_emails": [
                "<string>"
              ],
              "color": "<string>",
              "position": 123,
              "backstage_id": "<string>",
              "external_id": "<string>",
              "pagerduty_id": "<string>",
              "pagerduty_service_id": "<string>",
              "opsgenie_id": "<string>",
              "victor_ops_id": "<string>",
              "pagertree_id": "<string>",
              "cortex_id": "<string>",
              "service_now_ci_sys_id": "<string>",
              "user_ids": [
                123
              ],
              "admin_ids": [
                123
              ],
              "alerts_email_enabled": true,
              "alerts_email_address": "<string>",
              "alert_urgency_id": "<string>",
              "slack_channels": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "slack_aliases": [
                {
                  "id": "<string>",
                  "name": "<string>"
                }
              ],
              "alert_broadcast_enabled": true,
              "alert_broadcast_channel": {
                "id": "<string>",
                "name": "<string>"
              },
              "incident_broadcast_enabled": true,
              "incident_broadcast_channel": {
                "id": "<string>",
                "name": "<string>"
              },
              "auto_add_members_when_attached": true,
              "properties": [
                {
                  "catalog_property_id": "<string>",
                  "value": "<string>"
                }
              ]
            }
          },
          "included": [
            {
              "id": "<string>",
              "type": "<string>",
              "attributes": {},
              "relationships": {}
            }
          ]
        }
      ],
      "labels": {},
      "slack_channel_id": "<string>",
      "slack_channel_name": "<string>",
      "slack_channel_url": "<string>",
      "slack_channel_short_url": "<string>",
      "slack_channel_deep_link": "<string>",
      "slack_channel_archived": true,
      "slack_last_message_ts": "<string>",
      "zoom_meeting_id": "<string>",
      "zoom_meeting_start_url": "<string>",
      "zoom_meeting_join_url": "<string>",
      "zoom_meeting_password": "<string>",
      "zoom_meeting_pstn_password": "<string>",
      "zoom_meeting_h323_password": "<string>",
      "zoom_meeting_global_dial_in_numbers": [
        {
          "country": "<string>",
          "country_name": "<string>",
          "city": "<string>",
          "number": "<string>",
          "type": "<string>"
        }
      ],
      "google_drive_id": "<string>",
      "google_drive_parent_id": "<string>",
      "google_drive_url": "<string>",
      "google_meeting_id": "<string>",
      "google_meeting_url": "<string>",
      "microsoft_teams_meeting_id": "<string>",
      "microsoft_teams_meeting_url": "<string>",
      "microsoft_teams_channel_id": "<string>",
      "microsoft_teams_channel_name": "<string>",
      "microsoft_teams_channel_url": "<string>",
      "microsoft_teams_channel_short_url": "<string>",
      "microsoft_teams_chat_id": "<string>",
      "microsoft_teams_chat_url": "<string>",
      "microsoft_teams_team_id": "<string>",
      "google_chat_space_id": "<string>",
      "google_chat_space_name": "<string>",
      "google_chat_space_url": "<string>",
      "google_chat_space_short_url": "<string>",
      "google_chat_space_archived": true,
      "google_chat_space_domain_id": "<string>",
      "webex_meeting_id": "<string>",
      "webex_meeting_url": "<string>",
      "jira_issue_key": "<string>",
      "jira_issue_id": "<string>",
      "jira_issue_url": "<string>",
      "github_issue_id": "<string>",
      "github_issue_url": "<string>",
      "gitlab_issue_id": "<string>",
      "gitlab_issue_url": "<string>",
      "asana_task_id": "<string>",
      "asana_task_url": "<string>",
      "linear_issue_id": "<string>",
      "linear_issue_url": "<string>",
      "trello_card_id": "<string>",
      "trello_card_url": "<string>",
      "zendesk_ticket_id": "<string>",
      "zendesk_ticket_url": "<string>",
      "pagerduty_incident_id": "<string>",
      "pagerduty_incident_number": "<string>",
      "pagerduty_incident_url": "<string>",
      "opsgenie_incident_id": "<string>",
      "opsgenie_incident_url": "<string>",
      "opsgenie_alert_id": "<string>",
      "opsgenie_alert_url": "<string>",
      "service_now_incident_id": "<string>",
      "service_now_incident_key": "<string>",
      "service_now_incident_url": "<string>",
      "mattermost_channel_id": "<string>",
      "mattermost_channel_name": "<string>",
      "mattermost_channel_url": "<string>",
      "confluence_page_id": "<string>",
      "confluence_page_url": "<string>",
      "datadog_notebook_id": "<string>",
      "datadog_notebook_url": "<string>",
      "shortcut_story_id": "<string>",
      "shortcut_story_url": "<string>",
      "shortcut_task_id": "<string>",
      "shortcut_task_url": "<string>",
      "motion_task_id": "<string>",
      "motion_task_url": "<string>",
      "clickup_task_id": "<string>",
      "clickup_task_url": "<string>",
      "victor_ops_incident_id": "<string>",
      "victor_ops_incident_url": "<string>",
      "quip_page_id": "<string>",
      "quip_page_url": "<string>",
      "sharepoint_page_id": "<string>",
      "sharepoint_page_url": "<string>",
      "airtable_base_key": "<string>",
      "airtable_table_name": "<string>",
      "airtable_record_id": "<string>",
      "airtable_record_url": "<string>",
      "freshservice_ticket_id": "<string>",
      "freshservice_ticket_url": "<string>",
      "freshservice_task_id": "<string>",
      "freshservice_task_url": "<string>",
      "mitigation_message": "<string>",
      "resolution_message": "<string>",
      "cancellation_message": "<string>",
      "scheduled_for": "<string>",
      "scheduled_until": "<string>",
      "muted_service_ids": [
        "<string>"
      ],
      "in_triage_by": {},
      "started_by": {},
      "mitigated_by": {},
      "resolved_by": {},
      "closed_by": {},
      "cancelled_by": {},
      "in_triage_at": "<string>",
      "started_at": "<string>",
      "detected_at": "<string>",
      "acknowledged_at": "<string>",
      "mitigated_at": "<string>",
      "resolved_at": "<string>",
      "closed_at": "<string>",
      "cancelled_at": "<string>"
    }
  },
  "included": [
    {
      "id": "<string>",
      "type": "<string>",
      "attributes": {},
      "relationships": {}
    }
  ]
}
{
  "errors": [
    {
      "title": "<string>",
      "status": "<string>",
      "code": "<string>",
      "detail": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
required

Resource UUID

Body

application/vnd.api+json
data
object
required

Response

remove subscribers from incident

data
object
required
included
object[]