incident_io_client.api.incidents_v2.incidents_v2_create
asyncio
async
asyncio(
*,
client: Union[AuthenticatedClient, Client],
body: IncidentCreatePayloadV2
) -> Optional[IncidentsV2CreateResponseBody]
Create Incidents V2
Create a new incident.
Note that if the incident mode is set to \"retrospective\" then the new incident will not be announced in Slack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body |
IncidentCreatePayloadV2
|
Example: {'custom_field_entries': [{'custom_field_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'values': [{'id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_catalog_entry_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_link': 'https://google.com/', 'value_numeric': '123.456', 'value_option_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_text': 'This is my text field, I hope you like it', 'value_timestamp': ''}]}], 'id': '01FDAG4SAP5TYPT98WGR2N7W91', 'idempotency_key': 'alert- uuid', 'incident_role_assignments': [{'assignee': {'email': 'bob@example.com', 'id': '01G0J1EXE7AXZ2C93K61WBPYEH', 'slack_user_id': 'USER123'}, 'incident_role_id': '01FH5TZRWMNAFB0DZ23FD1TV96'}], 'incident_status_id': '01G0J1EXE7AXZ2C93K61WBPYEH', 'incident_timestamp_values': [{'incident_timestamp_id': '01FCNDV6P870EA6S7TK1DSYD5H', 'value': '2021-08-17T13:28:57.801578Z'}], 'incident_type_id': '01FH5TZRWMNAFB0DZ23FD1TV96', 'mode': 'standard', 'name': 'Our database is sad', 'retrospective_incident_options': {'postmortem_document_url': 'https://docs.google.com/my_doc_id', 'slack_channel_id': 'abc123'}, 'severity_id': '01FH5TZRWMNAFB0DZ23FD1TV96', 'slack_channel_name_override': 'inc-123-database-down', 'slack_team_id': 'T02A1FSLE8J', 'summary': "Our database is really really sad, and we don't know why yet.", 'visibility': 'public'}. |
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[IncidentsV2CreateResponseBody]
|
IncidentsV2CreateResponseBody |
Source code in incident_io_client/api/incidents_v2/incidents_v2_create.py
asyncio_detailed
async
asyncio_detailed(
*,
client: Union[AuthenticatedClient, Client],
body: IncidentCreatePayloadV2
) -> Response[IncidentsV2CreateResponseBody]
Create Incidents V2
Create a new incident.
Note that if the incident mode is set to \"retrospective\" then the new incident will not be announced in Slack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body |
IncidentCreatePayloadV2
|
Example: {'custom_field_entries': [{'custom_field_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'values': [{'id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_catalog_entry_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_link': 'https://google.com/', 'value_numeric': '123.456', 'value_option_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_text': 'This is my text field, I hope you like it', 'value_timestamp': ''}]}], 'id': '01FDAG4SAP5TYPT98WGR2N7W91', 'idempotency_key': 'alert- uuid', 'incident_role_assignments': [{'assignee': {'email': 'bob@example.com', 'id': '01G0J1EXE7AXZ2C93K61WBPYEH', 'slack_user_id': 'USER123'}, 'incident_role_id': '01FH5TZRWMNAFB0DZ23FD1TV96'}], 'incident_status_id': '01G0J1EXE7AXZ2C93K61WBPYEH', 'incident_timestamp_values': [{'incident_timestamp_id': '01FCNDV6P870EA6S7TK1DSYD5H', 'value': '2021-08-17T13:28:57.801578Z'}], 'incident_type_id': '01FH5TZRWMNAFB0DZ23FD1TV96', 'mode': 'standard', 'name': 'Our database is sad', 'retrospective_incident_options': {'postmortem_document_url': 'https://docs.google.com/my_doc_id', 'slack_channel_id': 'abc123'}, 'severity_id': '01FH5TZRWMNAFB0DZ23FD1TV96', 'slack_channel_name_override': 'inc-123-database-down', 'slack_team_id': 'T02A1FSLE8J', 'summary': "Our database is really really sad, and we don't know why yet.", 'visibility': 'public'}. |
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[IncidentsV2CreateResponseBody]
|
Response[IncidentsV2CreateResponseBody] |
Source code in incident_io_client/api/incidents_v2/incidents_v2_create.py
sync
sync(
*,
client: Union[AuthenticatedClient, Client],
body: IncidentCreatePayloadV2
) -> Optional[IncidentsV2CreateResponseBody]
Create Incidents V2
Create a new incident.
Note that if the incident mode is set to \"retrospective\" then the new incident will not be announced in Slack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body |
IncidentCreatePayloadV2
|
Example: {'custom_field_entries': [{'custom_field_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'values': [{'id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_catalog_entry_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_link': 'https://google.com/', 'value_numeric': '123.456', 'value_option_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_text': 'This is my text field, I hope you like it', 'value_timestamp': ''}]}], 'id': '01FDAG4SAP5TYPT98WGR2N7W91', 'idempotency_key': 'alert- uuid', 'incident_role_assignments': [{'assignee': {'email': 'bob@example.com', 'id': '01G0J1EXE7AXZ2C93K61WBPYEH', 'slack_user_id': 'USER123'}, 'incident_role_id': '01FH5TZRWMNAFB0DZ23FD1TV96'}], 'incident_status_id': '01G0J1EXE7AXZ2C93K61WBPYEH', 'incident_timestamp_values': [{'incident_timestamp_id': '01FCNDV6P870EA6S7TK1DSYD5H', 'value': '2021-08-17T13:28:57.801578Z'}], 'incident_type_id': '01FH5TZRWMNAFB0DZ23FD1TV96', 'mode': 'standard', 'name': 'Our database is sad', 'retrospective_incident_options': {'postmortem_document_url': 'https://docs.google.com/my_doc_id', 'slack_channel_id': 'abc123'}, 'severity_id': '01FH5TZRWMNAFB0DZ23FD1TV96', 'slack_channel_name_override': 'inc-123-database-down', 'slack_team_id': 'T02A1FSLE8J', 'summary': "Our database is really really sad, and we don't know why yet.", 'visibility': 'public'}. |
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[IncidentsV2CreateResponseBody]
|
IncidentsV2CreateResponseBody |
Source code in incident_io_client/api/incidents_v2/incidents_v2_create.py
sync_detailed
sync_detailed(
*,
client: Union[AuthenticatedClient, Client],
body: IncidentCreatePayloadV2
) -> Response[IncidentsV2CreateResponseBody]
Create Incidents V2
Create a new incident.
Note that if the incident mode is set to \"retrospective\" then the new incident will not be announced in Slack.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
body |
IncidentCreatePayloadV2
|
Example: {'custom_field_entries': [{'custom_field_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'values': [{'id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_catalog_entry_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_link': 'https://google.com/', 'value_numeric': '123.456', 'value_option_id': '01FCNDV6P870EA6S7TK1DSYDG0', 'value_text': 'This is my text field, I hope you like it', 'value_timestamp': ''}]}], 'id': '01FDAG4SAP5TYPT98WGR2N7W91', 'idempotency_key': 'alert- uuid', 'incident_role_assignments': [{'assignee': {'email': 'bob@example.com', 'id': '01G0J1EXE7AXZ2C93K61WBPYEH', 'slack_user_id': 'USER123'}, 'incident_role_id': '01FH5TZRWMNAFB0DZ23FD1TV96'}], 'incident_status_id': '01G0J1EXE7AXZ2C93K61WBPYEH', 'incident_timestamp_values': [{'incident_timestamp_id': '01FCNDV6P870EA6S7TK1DSYD5H', 'value': '2021-08-17T13:28:57.801578Z'}], 'incident_type_id': '01FH5TZRWMNAFB0DZ23FD1TV96', 'mode': 'standard', 'name': 'Our database is sad', 'retrospective_incident_options': {'postmortem_document_url': 'https://docs.google.com/my_doc_id', 'slack_channel_id': 'abc123'}, 'severity_id': '01FH5TZRWMNAFB0DZ23FD1TV96', 'slack_channel_name_override': 'inc-123-database-down', 'slack_team_id': 'T02A1FSLE8J', 'summary': "Our database is really really sad, and we don't know why yet.", 'visibility': 'public'}. |
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[IncidentsV2CreateResponseBody]
|
Response[IncidentsV2CreateResponseBody] |