Skip to content

Commit

Permalink
Update API schema and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
samstarling committed Jan 22, 2025
1 parent 9c46f33 commit 731b5bb
Show file tree
Hide file tree
Showing 7 changed files with 290 additions and 88 deletions.
5 changes: 0 additions & 5 deletions docs/resources/custom_field.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ description: |-
your own data needs.
Each field has a type:
Single-select, single value selected from a predefined list of options (e.g. Detection Method)Multi-select, as above but you can pick more than one option (e.g. Affected Teams)Text, freeform text field (e.g. Customer ID)Link, link URL that is synced to Slack bookmarks on the incident channel (e.g. External Status Page)Number, integer or fractional numbers (e.g. # Customers Affected)
Single-select and multi-select fields can also be powered by the Catalog. This will mean a field has a
catalogtypeid, which links it to the catalog type that it references.
We may add more custom field types in the future - we'd love to hear any other types you'd like to use!
---

Expand All @@ -30,9 +28,6 @@ Each field has a type:
- Link, link URL that is synced to Slack bookmarks on the incident channel (e.g. External Status Page)
- Number, integer or fractional numbers (e.g. # Customers Affected)

Single-select and multi-select fields can also be powered by the Catalog. This will mean a field has a
catalog_type_id, which links it to the catalog type that it references.

We may add more custom field types in the future - we'd love to hear any other types you'd like to use!

## Example Usage
Expand Down
61 changes: 48 additions & 13 deletions internal/apischema/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@
"Incident Attachments V1"
],
"summary": "List Incident Attachments V1",
"description": "List all incident attachements for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.",
"description": "List all incident attachments for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.",
"operationId": "Incident Attachments V1#List",
"parameters": [
{
Expand Down Expand Up @@ -600,7 +600,7 @@
"Incident Attachments V1"
],
"summary": "Delete Incident Attachments V1",
"description": "Unattaches an external resouce from an incident",
"description": "Unattaches an external resource from an incident",
"operationId": "Incident Attachments V1#Delete",
"parameters": [
{
Expand Down Expand Up @@ -7850,6 +7850,9 @@
"severity": {
"$ref": "#/definitions/EngineParamBindingPayloadV2"
},
"start_in_triage": {
"$ref": "#/definitions/EngineParamBindingPayloadV2"
},
"summary": {
"$ref": "#/definitions/EngineParamBindingPayloadV2"
},
Expand Down Expand Up @@ -7924,6 +7927,18 @@
"reference": "incident.severity"
}
},
"start_in_triage": {
"array_value": [
{
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"literal": "SEV123",
"reference": "incident.severity"
}
},
"summary": {
"array_value": [
{
Expand Down Expand Up @@ -9275,6 +9290,18 @@
"reference": "incident.severity"
}
},
"start_in_triage": {
"array_value": [
{
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"literal": "SEV123",
"reference": "incident.severity"
}
},
"summary": {
"array_value": [
{
Expand Down Expand Up @@ -10506,6 +10533,18 @@
"reference": "incident.severity"
}
},
"start_in_triage": {
"array_value": [
{
"literal": "SEV123",
"reference": "incident.severity"
}
],
"value": {
"literal": "SEV123",
"reference": "incident.severity"
}
},
"summary": {
"array_value": [
{
Expand Down Expand Up @@ -28465,11 +28504,6 @@
}
]
},
"id": {
"type": "string",
"description": "Unique identifier for the incident",
"example": "01FDAG4SAP5TYPT98WGR2N7W91"
},
"idempotency_key": {
"type": "string",
"description": "Unique string used to de-duplicate incident create requests",
Expand Down Expand Up @@ -28581,7 +28615,6 @@
]
}
],
"id": "01FDAG4SAP5TYPT98WGR2N7W91",
"idempotency_key": "alert-uuid",
"incident_role_assignments": [
{
Expand Down Expand Up @@ -33083,8 +33116,9 @@
"description": "The type of the related resource",
"example": "schedule",
"enum": [
"workflow",
"schedule"
"escalation_path",
"schedule",
"workflow"
]
},
"source_url": {
Expand Down Expand Up @@ -33134,8 +33168,9 @@
"description": "The type of the related resource",
"example": "schedule",
"enum": [
"workflow",
"schedule"
"escalation_path",
"schedule",
"workflow"
]
}
},
Expand Down Expand Up @@ -41544,7 +41579,7 @@
},
{
"name": "Custom Fields V2",
"description": "Manage custom fields.\n\nCustom fields are used to attach metadata to incidents, which you can use when searching\nfor incidents in the dashboard, triggering workflows, building announcement rules or for\nyour own data needs.\n\nEach field has a type:\n\n- Single-select, single value selected from a predefined list of options (e.g. Detection Method)\n- Multi-select, as above but you can pick more than one option (e.g. Affected Teams)\n- Text, freeform text field (e.g. Customer ID)\n- Link, link URL that is synced to Slack bookmarks on the incident channel (e.g. External Status Page)\n- Number, integer or fractional numbers (e.g. # Customers Affected)\n\nSingle-select and multi-select fields can also be powered by the Catalog. This will mean a field has a\ncatalog_type_id, which links it to the catalog type that it references.\n\nWe may add more custom field types in the future - we'd love to hear any other types you'd like to use!\n"
"description": "Manage custom fields.\n\nCustom fields are used to attach metadata to incidents, which you can use when searching\nfor incidents in the dashboard, triggering workflows, building announcement rules or for\nyour own data needs.\n\nEach field has a type:\n\n- Single-select, single value selected from a predefined list of options (e.g. Detection Method)\n- Multi-select, as above but you can pick more than one option (e.g. Affected Teams)\n- Text, freeform text field (e.g. Customer ID)\n- Link, link URL that is synced to Slack bookmarks on the incident channel (e.g. External Status Page)\n- Number, integer or fractional numbers (e.g. # Customers Affected)\n\nWe may add more custom field types in the future - we'd love to hear any other types you'd like to use!\n"
},
{
"name": "Escalations V2",
Expand Down
38 changes: 29 additions & 9 deletions internal/apischema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ paths:
tags:
- Incident Attachments V1
summary: List Incident Attachments V1
description: List all incident attachements for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.
description: List all incident attachments for a given external resource or incident. You must provide either a specific incident ID or a specific external resource type and external ID.
operationId: Incident Attachments V1#List
parameters:
- name: incident_id
Expand Down Expand Up @@ -542,7 +542,7 @@ paths:
tags:
- Incident Attachments V1
summary: Delete Incident Attachments V1
description: Unattaches an external resouce from an incident
description: Unattaches an external resource from an incident
operationId: Incident Attachments V1#Delete
parameters:
- name: id
Expand Down Expand Up @@ -5867,6 +5867,8 @@ definitions:
- severity-max
severity:
$ref: '#/definitions/EngineParamBindingPayloadV2'
start_in_triage:
$ref: '#/definitions/EngineParamBindingPayloadV2'
summary:
$ref: '#/definitions/EngineParamBindingPayloadV2'
workspace:
Expand Down Expand Up @@ -5911,6 +5913,13 @@ definitions:
value:
literal: SEV123
reference: incident.severity
start_in_triage:
array_value:
- literal: SEV123
reference: incident.severity
value:
literal: SEV123
reference: incident.severity
summary:
array_value:
- literal: SEV123
Expand Down Expand Up @@ -6708,6 +6717,13 @@ definitions:
value:
literal: SEV123
reference: incident.severity
start_in_triage:
array_value:
- literal: SEV123
reference: incident.severity
value:
literal: SEV123
reference: incident.severity
summary:
array_value:
- literal: SEV123
Expand Down Expand Up @@ -7413,6 +7429,13 @@ definitions:
value:
literal: SEV123
reference: incident.severity
start_in_triage:
array_value:
- literal: SEV123
reference: incident.severity
value:
literal: SEV123
reference: incident.severity
summary:
array_value:
- literal: SEV123
Expand Down Expand Up @@ -20269,10 +20292,6 @@ definitions:
value_option_id: 01FCNDV6P870EA6S7TK1DSYDG0
value_text: This is my text field, I hope you like it
value_timestamp: ""
id:
type: string
description: Unique identifier for the incident
example: 01FDAG4SAP5TYPT98WGR2N7W91
idempotency_key:
type: string
description: Unique string used to de-duplicate incident create requests
Expand Down Expand Up @@ -20353,7 +20372,6 @@ definitions:
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:
Expand Down Expand Up @@ -23785,8 +23803,9 @@ definitions:
description: The type of the related resource
example: schedule
enum:
- workflow
- escalation_path
- schedule
- workflow
source_url:
type: string
description: The url of the external repository where this resource is managed (if there is one)
Expand Down Expand Up @@ -23824,8 +23843,9 @@ definitions:
description: The type of the related resource
example: schedule
enum:
- workflow
- escalation_path
- schedule
- workflow
example:
annotations:
incident.io/terraform/version: 3.0.0
Expand Down
Loading

0 comments on commit 731b5bb

Please sign in to comment.