A side note / correction about the schema the API expects:
https://api-reference.pagerduty.com/#!/Incidents/put_incidents_id
“Inline Model 2” or similar object types throughout our API reference refers to an unnamed type of object that is defined ad-hoc in the scope of the resource.
So, when the API schema reference says “Array[Inline Model 2]”, it means an array of objects whose schema is defined in the lower levels of the schema definition of that resource, and it is labeled “Inline Model 2”.
In this case, the expected schema is thus an array of objects that have a single property, “assignee”.
The reason why it used only the last assignee is because both assignees were declared inside of an object, and because keys must be unique, one of the keys was discarded in the JSON serialization or de-serialization process.
The correct way to declare assignments would thus be to make each assignee entry its own object with the one “assignee” property containing the user reference. What that looks like when JSON-encoded:
"assignments": [
{
"assignee": {
"id":"PSXXXXX",
"type":"user_reference"
}
},
{
"assignee": {
"id":"PTXXXXX",
"type":"user_reference"
}
}
]
Cheers!