PagerDuty / go-pagerduty

go client library for PagerDuty v2 API
https://v2.developer.pagerduty.com/docs/rest-api
Apache License 2.0
287 stars 240 forks source link

ResponderRequest regression - API method is no longer functional #451

Closed jwestbury closed 2 years ago

jwestbury commented 2 years ago

Looks like ResponderRequest was fixed in #328, but a regression was introduced in #389 which broke this method again. I'm seeing the following request body from the SDK, which results in a 2100 (Not Found) response:

{
    "message": "Testing",
    "requester_id": "P1P12P1",
    "responder_request_targets": [
        {
            "id": "P1P12P1",
            "type": "user_reference"
        }
    ]
}

Meanwhile, the API explorer produces the following request body, which works with an identical issue ID:

{
  "message": "Testing",
  "requester_id": "P1P12P1",
  "responder_request_targets": [
    {
      "responder_request_target": {
        "id": "P1P12P1",
        "type": "user_reference"
      }
    }
  ]
}

Any chance of getting the "correct" behavior reintroduced?

CerealBoy commented 2 years ago

Would this be resolved by the (now outdated) #442 ?

jwestbury commented 2 years ago

Would this be resolved by the (now outdated) #442 ?

Looks like it probably would.

ChuckCrawford commented 2 years ago

This should now be resolved by https://github.com/PagerDuty/go-pagerduty/pull/452 and included in the eventual 1.6 release.

Thank you all for your patience. Please let us know if anyone runs into additional issues here.