Gurus, it seems that api3
civicrm_api3('Activity', 'create', [ 'id' => 1234, 'case_id' => 12, ]);
does not assign the activity to the case. From my reading of funtion civicrm_api3_activity_create($params), I can imagine that it depends on enabling the CiviCase setting "Enable deprecated Embedded Activity Revisions" and it won't work without it by design. Could that be?
I came across this problem when testing the api because Dataprocessor resp. the ActionProvider extensions expose and use the api param case_id without effect.
My use case is a dataprocessor which processes an event registration which has to be assigned to as case.
CiviCRM is v5.37.2