Skip to main content

I’m attempting to retrieve incident & alert details, specifically the “To”, “From”, and “Body” from an incident that’s triggered via email. From a log_entries call, I’m able to fetch the channel type and summary but not the other fields I mentioned as well as “Subject”. 

The call i’m using:
curl -s -H "Authorization: Token token=<token>" -H "Accept: application/json" 'https://api.pagerduty.com/incidents/<incident_id>/log_entries

 

Example of a response:
{
      "id": "abc123",
      "type": "trigger_log_entry",
      "summary": "Triggered through email.",
      "self": "https://api.pagerduty.com/log_entries/abc123",
      "html_url": "https://finxact.pagerduty.com/incidents/def456/log_entries/abc123",
      "created_at": "2024-11-28T14:17:49Z",
      "agent": {
        "id": "PODSID1",
        "type": "generic_email_inbound_integration_reference",
        "summary": "Email",
        "self": "https://api.pagerduty.com/services/P5TB6FT/integrations/PODSID1",
        "html_url": "https://finxact.pagerduty.com/services/P5TB6FT/integrations/PODSID1"
      },
      "channel": {
        "type": "email",
        "summary": "Development Support"
      },
      "service": {
        "id": "PPTT123",
        "type": "service_reference",
        "summary": "Tech On Calls",
        "self": "https://api.pagerduty.com/services/PPTT123",
        "html_url": "https://finxact.pagerduty.com/service-directory/PPTT123"
      },
      "incident": {
        "id": "INC123",
        "type": "incident_reference",
        "summary": "#1234] Development Support",
        "self": "https://api.pagerduty.com/incidents/INC123",
        "html_url": "https://finxact.pagerduty.com/incidents/INC123"
      },
      "teams": o
        {
          "id": "TEAM123",
          "type": "team_reference",
          "summary": "FAST Technology",
          "self": "https://api.pagerduty.com/teams/TEAM123",
          "html_url": "https://finxact.pagerduty.com/teams/TEAM123"
        }
      ],
      "contexts": p],
      "event_details": {
        "description": "Development Support"
      }
    }

Be the first to reply!

Reply