REST API to add Camera to a CameraGroup documentation is not correct

Hi,

I am trying to REST API to add Camera to a CameraGroup, but the documentation for the API does not make sense.

https://doc.developer.milestonesys.com/mipvmsapi/api/config-rest/v1/#tag/Grouping/operation/postcameraGroupsByIdcameras

I tried different variants of API call (including inspiration from Add a layouts to a layoutGroups), but nothing worked.

All other “Add” APIs in Grouping section seem to have the same issue in the documentation of not also in the implementation of the API.

Does anyone know what is the correct payload to add a camera to a camera group?

Thank you!

I must agree that the documentation is wrong. I will report this as a bug to Milestone Development.

When trying to figure it out using Postman I noticed the error that was given back:

{
    "error": {
        "httpCode": 400,
        "details": [
            {
                "errorText": "Bad request: parameters missing",
                "errorTextId": "99999"
            }
        ]
    },
    "params": {
        "itemSelection": {
            "type": "cameras",
            "id": "00000000-0000-0000-0000-000000000000"
        }
    }
}

Then I did a new POST with new payload and success:

If you find other pieces of faulty documentation, please post here on the Developer Forum and I will report it so that the documentation can be improved. Thank you for reporting this one.

Thank you for your answer.

I will try it on Monday and will post my result.