Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.incidents.getById({
incidentId: 835824,
});
console.log(result);
}
run();import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.incidents.get_by_id(incident_id=835824)
# Handle response
print(res)curl --request GET \
--url https://api.syllable.cloud/api/v1/incidents/{incident_id} \
--header 'Syllable-API-Key: <api-key>'const options = {method: 'GET', headers: {'Syllable-API-Key': '<api-key>'}};
fetch('https://api.syllable.cloud/api/v1/incidents/{incident_id}', 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.syllable.cloud/api/v1/incidents/{incident_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Syllable-API-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://api.syllable.cloud/api/v1/incidents/{incident_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Syllable-API-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://api.syllable.cloud/api/v1/incidents/{incident_id}")
.header("Syllable-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/incidents/{incident_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Syllable-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"description": "Service outage in region X",
"start_datetime": "2023-10-01T08:00:00Z",
"resolution_datetime": "2023-10-01T12:00:00Z",
"impact_category": "High",
"sessions_impacted": 1500,
"markdown": "**Incident Details**",
"id": 1,
"last_updated_by": "user@mail.com",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"created_at": "2023-10-01T08:00:00Z",
"updated_at": "2023-10-01T08:00:00Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}incidents
Get Incident By Id
Get incident by ID
GET
/
api
/
v1
/
incidents
/
{incident_id}
Typescript (SDK)
import { SyllableSDK } from "syllable-sdk";
const syllableSDK = new SyllableSDK({
apiKeyHeader: process.env["SYLLABLESDK_API_KEY_HEADER"] ?? "",
});
async function run() {
const result = await syllableSDK.incidents.getById({
incidentId: 835824,
});
console.log(result);
}
run();import os
from syllable_sdk import SyllableSDK
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.incidents.get_by_id(incident_id=835824)
# Handle response
print(res)curl --request GET \
--url https://api.syllable.cloud/api/v1/incidents/{incident_id} \
--header 'Syllable-API-Key: <api-key>'const options = {method: 'GET', headers: {'Syllable-API-Key': '<api-key>'}};
fetch('https://api.syllable.cloud/api/v1/incidents/{incident_id}', 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.syllable.cloud/api/v1/incidents/{incident_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Syllable-API-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://api.syllable.cloud/api/v1/incidents/{incident_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Syllable-API-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://api.syllable.cloud/api/v1/incidents/{incident_id}")
.header("Syllable-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syllable.cloud/api/v1/incidents/{incident_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Syllable-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"description": "Service outage in region X",
"start_datetime": "2023-10-01T08:00:00Z",
"resolution_datetime": "2023-10-01T12:00:00Z",
"impact_category": "High",
"sessions_impacted": 1500,
"markdown": "**Incident Details**",
"id": 1,
"last_updated_by": "user@mail.com",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"created_at": "2023-10-01T08:00:00Z",
"updated_at": "2023-10-01T08:00:00Z"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}Authorizations
Path Parameters
Response
Successful Response
Response model for service incident operations.
Description of the service incident
Example:
"Service outage in region X"
Start time of the incident
Example:
"2023-10-01T08:00:00Z"
Resolution time of the incident
Example:
"2023-10-01T12:00:00Z"
Category of the impact
Example:
"High"
Number of sessions impacted
Example:
1500
Detailed markdown description of the incident
Example:
"**Incident Details**"
The ID of the incident to update
Example:
1
The email of the user who last updated the incident
Example:
"user@mail.com"
The ID of the organization
Example:
123
The ID of the sub-organization
Example:
456
The name of the sub-organization (DEPRECATED)
Example:
"SubOrg A"
Creation time of the incident
Example:
"2023-10-01T08:00:00Z"
Last update time of the incident
Example:
"2023-10-01T08:00:00Z"

