Update an existing incident
import os
from syllable_sdk import SyllableSDK
from syllable_sdk.utils import parse_datetime
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.incidents.update(request={
"description": "Service outage in region X",
"start_datetime": parse_datetime("2023-10-01T08:00:00Z"),
"resolution_datetime": parse_datetime("2023-10-01T12:00:00Z"),
"impact_category": "High",
"sessions_impacted": 1500,
"markdown": "**Incident Details**",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"id": 1,
"created_at": parse_datetime("2023-10-01T08:00:00Z"),
"updated_at": parse_datetime("2023-10-01T08:00:00Z"),
})
# Handle response
print(res)
{
"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**",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"id": 1,
"created_at": "2023-10-01T08:00:00Z",
"updated_at": "2023-10-01T08:00:00Z",
"last_updated_by": "user@mail.com"
}
Request model to update an existing service incident.
Successful Response
Response model for service incident operations.
import os
from syllable_sdk import SyllableSDK
from syllable_sdk.utils import parse_datetime
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.incidents.update(request={
"description": "Service outage in region X",
"start_datetime": parse_datetime("2023-10-01T08:00:00Z"),
"resolution_datetime": parse_datetime("2023-10-01T12:00:00Z"),
"impact_category": "High",
"sessions_impacted": 1500,
"markdown": "**Incident Details**",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"id": 1,
"created_at": parse_datetime("2023-10-01T08:00:00Z"),
"updated_at": parse_datetime("2023-10-01T08:00:00Z"),
})
# Handle response
print(res)
{
"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**",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"id": 1,
"created_at": "2023-10-01T08:00:00Z",
"updated_at": "2023-10-01T08:00:00Z",
"last_updated_by": "user@mail.com"
}
Update an existing incident
import os
from syllable_sdk import SyllableSDK
from syllable_sdk.utils import parse_datetime
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.incidents.update(request={
"description": "Service outage in region X",
"start_datetime": parse_datetime("2023-10-01T08:00:00Z"),
"resolution_datetime": parse_datetime("2023-10-01T12:00:00Z"),
"impact_category": "High",
"sessions_impacted": 1500,
"markdown": "**Incident Details**",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"id": 1,
"created_at": parse_datetime("2023-10-01T08:00:00Z"),
"updated_at": parse_datetime("2023-10-01T08:00:00Z"),
})
# Handle response
print(res)
{
"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**",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"id": 1,
"created_at": "2023-10-01T08:00:00Z",
"updated_at": "2023-10-01T08:00:00Z",
"last_updated_by": "user@mail.com"
}
Request model to update an existing service incident.
Successful Response
Response model for service incident operations.
import os
from syllable_sdk import SyllableSDK
from syllable_sdk.utils import parse_datetime
with SyllableSDK(
api_key_header=os.getenv("SYLLABLESDK_API_KEY_HEADER", ""),
) as ss_client:
res = ss_client.incidents.update(request={
"description": "Service outage in region X",
"start_datetime": parse_datetime("2023-10-01T08:00:00Z"),
"resolution_datetime": parse_datetime("2023-10-01T12:00:00Z"),
"impact_category": "High",
"sessions_impacted": 1500,
"markdown": "**Incident Details**",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"id": 1,
"created_at": parse_datetime("2023-10-01T08:00:00Z"),
"updated_at": parse_datetime("2023-10-01T08:00:00Z"),
})
# Handle response
print(res)
{
"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**",
"organization_id": 123,
"sub_organization_id": 456,
"sub_organization": "SubOrg A",
"id": 1,
"created_at": "2023-10-01T08:00:00Z",
"updated_at": "2023-10-01T08:00:00Z",
"last_updated_by": "user@mail.com"
}