Skip to main content
GET
/
v1
/
incident_attachments
List
curl --request GET \
  --url https://api.incident.io/v1/incident_attachments \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.incident.io/v1/incident_attachments"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.incident.io/v1/incident_attachments', 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.incident.io/v1/incident_attachments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);

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

curl_close($curl);

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

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

func main() {

url := "https://api.incident.io/v1/incident_attachments"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

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

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

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.incident.io/v1/incident_attachments")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.incident.io/v1/incident_attachments")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
{
  "incident_attachments": [
    {
      "id": "01FCNDV6P870EA6S7TK1DSYD5H",
      "incident_id": "01FCNDV6P870EA6S7TK1DSYD5H",
      "resource": {
        "external_id": "123",
        "permalink": "https://my.pagerduty.com/incidents/ABC",
        "resource_type": "pager_duty_incident",
        "title": "The database has gone down"
      }
    }
  ]
}
🔑 Requires the attachments.view scope.

Authorizations

Authorization
string
header
required

API key from your incident.io dashboard (Settings → API keys)

Query Parameters

incident_id
string

Incident that this attachment is against

Example:

"01G0J1EXE7AXZ2C93K61WBPYEH"

external_id
string

ID of the resource in the external system

Example:

"123"

resource_type
enum<string>

E.g. PagerDuty: the external system that holds the resource

Available options:
pager_duty_incident,
opsgenie_alert,
datadog_monitor_alert,
github_pull_request,
gitlab_merge_request,
sentry_issue,
jira_issue,
jsm_alert,
atlassian_statuspage_incident,
zendesk_ticket,
google_calendar_event,
outlook_calendar_event,
slack_file,
salesforce_case,
scrubbed,
statuspage_incident
Example:

"pager_duty_incident"

Response

200 - application/json

OK response.

incident_attachments
object[]
required
Example:
[
{
"id": "01FCNDV6P870EA6S7TK1DSYD5H",
"incident_id": "01FCNDV6P870EA6S7TK1DSYD5H",
"resource": {
"external_id": "123",
"permalink": "https://my.pagerduty.com/incidents/ABC",
"resource_type": "pager_duty_incident",
"title": "The database has gone down"
}
}
]