Add MIPItem to Sourcelist of AlarmDefintion

I’m trying to add a MIPItem (or multiple) to the sourcelist of an existing alarmdefintion from a plug-in in the Management Client.

In the code I set the sourcelist as followed by example:

if(alarmDefinition != null)

{

        string sourcelist = alarmDefinition.SourceList;

            if (sourcelist == "")

            {

              sourcelist += "MIPItem\[" + mipitem.FQID.ObjectId.ToString() + "\]";

            }

            else

            {

              sourcelist += ";MIPItem\[" + mipitem.FQID.ObjectId.ToString() + "\]";

            }

alarmDefinition.SourceList = sourcelist;

ValidateResult validateResult = alarmDefinition.ValidateItem();

        if (validateResult.ValidatedOk)

        {

          alarmDefinition.Save();

        }

}

If I run this code I get the error:

PATCH Unexpected statuscode BadRequest in ‘https:///API/rest/v1/alarmDefinitions/57207d22-afae-49cb-8c63-f4a9cb5f8810’ - Bad request: The ‘path’ is not a valid/recognized path:mipItems/d60d3fdc-f582-4193-97e3-296a9973aad2;MIPItem[2c5e153d-0c72-4785-bd4f-5acb377dd497]

Parameter name: path

To be clear, I changed for the purpose of this post, the correct FQDN is shown on my side.

So it seems the validae works but when Save() is called, the path parameter is changed to mipitems/GUID. In the error, the first mipItems/d60d3fdc-f582-4193-97e3-296a9973aad2 is the one that is already in the alarmdef and was added manually, the second MIPItem[2c5e153d-0c72-4785-bd4f-5acb377dd497] was added using this code.

Maybe adding a MIP item to sourcelist not allowed/supported in SDK?

Is there another way to do this?

Yes, it seems to mix the REST formatting with SOAP formatting for the path.

What VMS version are you working towards, and MIPSDK version are you working with ?

VMS is 2024 R2 and SDK is latest available

When I try with 2025R2 and start with a single ‘read’ of the AlarmDefinition, like

   var alarmDefinition = new AlarmDefinition(_serverId, $"AlarmDefinition[{a.Id}]");

This works for me. I am currently unable to check what we have fixed over the last year, but there has been some.

Than I suppose it is fixed in 2025 R2. When I try the same on 2025 R1 I get the same error. I do not have an 2025 R2 to test at this moment.

Will this be fixed in older versions by a future hotfix?

As far as I know, there is no plan at the moment to create hotfix for 2025R1. But it can be requested if a customer needs it. Our internal ID is EORP-2970.