Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for additional incident fields #50880

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nkupton
Copy link

@nkupton nkupton commented Jan 3, 2025

Adds support for the following fields: ownerTeam, extraProperties, links, impactStartDate, actions

What

It appears that the initial version of this connector was created with the OpsGenie API documentation as a primary guide. However, real world responses show several important additional fields that are supported by the /v1/incidents List API, despite not being documented in the sample response: https://docs.opsgenie.com/docs/incident-api#list-incidents

Example:

curl -XGET -H "Authorization: GenieKey <REDACTED>" 'https://api.opsgenie.com/v1/incidents?query=status%3Aopen&limit=10&sort=createdAt&order=desc'
{"totalCount":1,"data":[
    {
        "id": "b5472d66-e652-4f46-ab22-7d21f9ea66485",
        "description": "testing incident description",
        "impactedServices": [],
        "tinyId": "1001",
        "message": "testing incident message",
        "status": "open",
        "tags": [
            "source:my-scripts"
        ],
        "createdAt": "2025-01-01T19:20:00.573Z",
        "updatedAt": "2025-01-02T21:35:17.619Z",
        "priority": "P4",
        "ownerTeam": "",
        "responders": [
            {
                "type": "user",
                "id": "ef466cc4-e4a5-462f-a01e-e19a70f61022"
            }
        ],
        "extraProperties": {
            "RCA": "URL",
            "Service": "add details",
            "Deployment ID": "add deployment ID if applicable",
            "Cause Category": "Internal or External",
            "Detection Method": "Alert, Manual"
        },
        "links": {
            "web": "https://zillowgroup.app.opsgenie.com/incident/detail/b5472d66-e652-4f46-ab22-7d21f9ea66485",
            "api": "https://api.opsgenie.com/v1/incidents/b5472d66-e652-4f46-ab22-7d21f9ea66485"
        },
        "impactStartDate": "2025-01-01T19:20:00.573Z",
        "actions": []
    }
],"paging":{"first":"https://api.opsgenie.com/v1/incidents?limit=10&sort=createdAt&offset=0&order=desc&query=status%3Aopen","last":"https://api.opsgenie.com/v1/incidents?limit=10&sort=createdAt&offset=0&order=desc&query=status%3Aopen"},"took":0.036,"requestId":"99ee308b7-9503-4b85-afff-464c9ddbb9bd"}

How

Expand the schema to include fields not adequately documented in the OpsGenie API.

Review guide

Most of these fields are additions, but I chose to rename details -> extraProperties because these appear to be the same field in different contexts. details is the term used by OpsGenie for Incident Create, but extraProperties is the term used to retrieve it by the Incident Get/List APIs.
https://docs.opsgenie.com/docs/incident-api#create-incident
https://docs.opsgenie.com/docs/incident-api#get-incident
https://docs.opsgenie.com/docs/incident-api#list-incident

User Impact

Important additional fields can be synced into Airbyte destinations.

Can this PR be safely reverted and rolled back?

  • YES 💚
  • NO ❌

The current documentation for OpsGenie's /v1/incidents API does not show the full set of fields that are actually available: https://docs.opsgenie.com/docs/incident-api#list-incidents

Adds support for the following: description, ownerTeam, extraProperties, links, impactStartDate, actions
Copy link

vercel bot commented Jan 3, 2025

@nkupton is attempting to deploy a commit to the Airbyte Growth Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants