Get full incident report detail
Returns the full report including every question, answer, and attachment metadata for a single incident report.
GET
/
api
/
external
/
incidentreports
/
reportdata
Get full incident report detail
curl --request GET \
--url https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata \
--header 'Authorization: Bearer <token>' \
--header 'external-gh-apim-sub-key: <api-key>'import requests
url = "https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata"
headers = {
"Authorization": "Bearer <token>",
"external-gh-apim-sub-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'external-gh-apim-sub-key': '<api-key>'}
};
fetch('https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata', 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://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata",
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>",
"external-gh-apim-sub-key: <api-key>"
],
]);
$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://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("external-gh-apim-sub-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata")
.header("Authorization", "Bearer <token>")
.header("external-gh-apim-sub-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["external-gh-apim-sub-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": {
"incidentReportId": 123,
"formName": "<string>",
"customerName": "<string>",
"customerApiReferenceNumber": "<string>",
"siteType": "<string>",
"siteName": "<string>",
"siteAddress": "<string>",
"siteCity": "<string>",
"siteState": "<string>",
"siteCountry": "<string>",
"sitePostCode": "<string>",
"siteApiReferenceNumber": "<string>",
"patrolSiteName": "<string>",
"patrolSiteAddress": "<string>",
"patrolSiteCity": "<string>",
"patrolSiteState": "<string>",
"patrolSiteCountry": "<string>",
"patrolSitePostCode": "<string>",
"patrolSiteApiReferenceNumber": "<string>",
"staffName": "<string>",
"licenseNumber": "<string>",
"reportId": "<string>",
"dateCreated": "2023-11-07T05:31:56Z",
"submittedByName": "<string>",
"submittedDate": "2023-11-07T05:31:56Z",
"modifiedByName": "<string>",
"modifiedDate": "2023-11-07T05:31:56Z",
"previousIncidentReportId": 123,
"incidentReportDetail": [
{
"incidentReportDetailId": 123,
"parentIncidentReportDetailAnswerId": 123,
"parentIncidentReportDetailId": 123,
"setNumber": 123,
"isNeedAction": true,
"actionDescription": "<string>",
"incidentReportQuestion": {},
"incidentReportDetailAnswers": [
{}
]
}
]
},
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": "<unknown>",
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": "<unknown>",
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}Authorizations
JWT issued by POST /api/external/token/request. Send as Authorization: Bearer <token>.
Guardhouse API Management subscription key. Required on every request. The same value is used by all API consumers within a region — contact Guardhouse Support for the subscription key.
Query Parameters
The incident report's numeric ID.
Semicolon-separated list of customer IDs. Defaults to the customers your API key is scoped to.
Semicolon-separated list of site IDs. Defaults to the sites your API key is scoped to.
Company ID. Normally derived from your API key claims; only set this if you have multi-company access.
⌘I
Get full incident report detail
curl --request GET \
--url https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata \
--header 'Authorization: Bearer <token>' \
--header 'external-gh-apim-sub-key: <api-key>'import requests
url = "https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata"
headers = {
"Authorization": "Bearer <token>",
"external-gh-apim-sub-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'external-gh-apim-sub-key': '<api-key>'}
};
fetch('https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata', 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://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata",
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>",
"external-gh-apim-sub-key: <api-key>"
],
]);
$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://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("external-gh-apim-sub-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata")
.header("Authorization", "Bearer <token>")
.header("external-gh-apim-sub-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://gateway-api.guardhousehq.com/api/external/incidentreports/reportdata")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["external-gh-apim-sub-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": {
"incidentReportId": 123,
"formName": "<string>",
"customerName": "<string>",
"customerApiReferenceNumber": "<string>",
"siteType": "<string>",
"siteName": "<string>",
"siteAddress": "<string>",
"siteCity": "<string>",
"siteState": "<string>",
"siteCountry": "<string>",
"sitePostCode": "<string>",
"siteApiReferenceNumber": "<string>",
"patrolSiteName": "<string>",
"patrolSiteAddress": "<string>",
"patrolSiteCity": "<string>",
"patrolSiteState": "<string>",
"patrolSiteCountry": "<string>",
"patrolSitePostCode": "<string>",
"patrolSiteApiReferenceNumber": "<string>",
"staffName": "<string>",
"licenseNumber": "<string>",
"reportId": "<string>",
"dateCreated": "2023-11-07T05:31:56Z",
"submittedByName": "<string>",
"submittedDate": "2023-11-07T05:31:56Z",
"modifiedByName": "<string>",
"modifiedDate": "2023-11-07T05:31:56Z",
"previousIncidentReportId": 123,
"incidentReportDetail": [
{
"incidentReportDetailId": 123,
"parentIncidentReportDetailAnswerId": 123,
"parentIncidentReportDetailId": 123,
"setNumber": 123,
"isNeedAction": true,
"actionDescription": "<string>",
"incidentReportQuestion": {},
"incidentReportDetailAnswers": [
{}
]
}
]
},
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": "<unknown>",
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}{
"status": {
"code": 123,
"errorMessage": "<string>"
},
"data": "<unknown>",
"count": 123,
"message": "<string>",
"errors": [
{
"code": 100,
"message": "<string>"
}
]
}