It seems alertid's in the legacy api of Trend Micro Deep Security are not unique and linked to an individual alert. In different setups they can differ. Contacting Trend Micro support didn't give any clue on why it is like this. Legacy API will be phased out but covers some critical alerts which the REST API doesn't.
For example in one instance: alertid,name '28 = Unable to Upgrade the Agent Software'
in the another instance: '28 = Unable to communicate'