incident_io_client.api.alert_events_v2.alert_events_v2_create_http
asyncio
async
asyncio(
alert_source_config_id: str,
*,
client: Union[AuthenticatedClient, Client],
body: AlertEventsV2CreateHTTPRequestBody,
token: Union[Unset, str] = UNSET,
authorization: Union[Unset, str] = UNSET
) -> Optional[AlertResult]
CreateHTTP Alert Events V2
Create an alert event using an HTTP source.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_source_config_id |
str
|
|
required |
token |
Union[Unset, str]
|
|
UNSET
|
authorization |
Union[Unset, str]
|
|
UNSET
|
body |
AlertEventsV2CreateHTTPRequestBody
|
Example: {'deduplication_key': '4293868629', 'description': "We've detected a number of timeouts on hello.world.com, the service may be down. To fix...", 'metadata': {'service': 'hello.world.com', 'team': ['my-team']}, 'source_url': 'https://www.my-alerting-platform.com/alerts/my-alert-123', 'status': 'firing', 'title': '*errors.withMessage: PG::Error failed to connect'}. |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Optional[AlertResult]
|
AlertResult |
Source code in incident_io_client/api/alert_events_v2/alert_events_v2_create_http.py
asyncio_detailed
async
asyncio_detailed(
alert_source_config_id: str,
*,
client: Union[AuthenticatedClient, Client],
body: AlertEventsV2CreateHTTPRequestBody,
token: Union[Unset, str] = UNSET,
authorization: Union[Unset, str] = UNSET
) -> Response[AlertResult]
CreateHTTP Alert Events V2
Create an alert event using an HTTP source.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_source_config_id |
str
|
|
required |
token |
Union[Unset, str]
|
|
UNSET
|
authorization |
Union[Unset, str]
|
|
UNSET
|
body |
AlertEventsV2CreateHTTPRequestBody
|
Example: {'deduplication_key': '4293868629', 'description': "We've detected a number of timeouts on hello.world.com, the service may be down. To fix...", 'metadata': {'service': 'hello.world.com', 'team': ['my-team']}, 'source_url': 'https://www.my-alerting-platform.com/alerts/my-alert-123', 'status': 'firing', 'title': '*errors.withMessage: PG::Error failed to connect'}. |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Response[AlertResult]
|
Response[AlertResult] |
Source code in incident_io_client/api/alert_events_v2/alert_events_v2_create_http.py
sync
sync(
alert_source_config_id: str,
*,
client: Union[AuthenticatedClient, Client],
body: AlertEventsV2CreateHTTPRequestBody,
token: Union[Unset, str] = UNSET,
authorization: Union[Unset, str] = UNSET
) -> Optional[AlertResult]
CreateHTTP Alert Events V2
Create an alert event using an HTTP source.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_source_config_id |
str
|
|
required |
token |
Union[Unset, str]
|
|
UNSET
|
authorization |
Union[Unset, str]
|
|
UNSET
|
body |
AlertEventsV2CreateHTTPRequestBody
|
Example: {'deduplication_key': '4293868629', 'description': "We've detected a number of timeouts on hello.world.com, the service may be down. To fix...", 'metadata': {'service': 'hello.world.com', 'team': ['my-team']}, 'source_url': 'https://www.my-alerting-platform.com/alerts/my-alert-123', 'status': 'firing', 'title': '*errors.withMessage: PG::Error failed to connect'}. |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Optional[AlertResult]
|
AlertResult |
Source code in incident_io_client/api/alert_events_v2/alert_events_v2_create_http.py
sync_detailed
sync_detailed(
alert_source_config_id: str,
*,
client: Union[AuthenticatedClient, Client],
body: AlertEventsV2CreateHTTPRequestBody,
token: Union[Unset, str] = UNSET,
authorization: Union[Unset, str] = UNSET
) -> Response[AlertResult]
CreateHTTP Alert Events V2
Create an alert event using an HTTP source.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
alert_source_config_id |
str
|
|
required |
token |
Union[Unset, str]
|
|
UNSET
|
authorization |
Union[Unset, str]
|
|
UNSET
|
body |
AlertEventsV2CreateHTTPRequestBody
|
Example: {'deduplication_key': '4293868629', 'description': "We've detected a number of timeouts on hello.world.com, the service may be down. To fix...", 'metadata': {'service': 'hello.world.com', 'team': ['my-team']}, 'source_url': 'https://www.my-alerting-platform.com/alerts/my-alert-123', 'status': 'firing', 'title': '*errors.withMessage: PG::Error failed to connect'}. |
required |
Raises:
Type | Description |
---|---|
UnexpectedStatus
|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. |
TimeoutException
|
If the request takes longer than Client.timeout. |
Returns:
Type | Description |
---|---|
Response[AlertResult]
|
Response[AlertResult] |