How to add user to meeting using v8 JSON API

Version 7.11.18 - when using the JSON API to add a user relationship to a meeting (V8/module/Meetings/xxx/relationships - data { “type”: “Users”, “id”: “xxxx” } - get a response with a 201 status code (“User with id xxxx has been added to Meeting with id xxx”) but the user does not show up under that meeting in the UI nor do I see any entry in table meetings_users with that meeting id.

Any ideas on what I am doing wrong?

Thanks a lot.

Somebody must know how to add a user to a meeting? I have tried replacing the “Users” with “users” and “meetings_users” since swagger.json says that the type in the requestbody is the name of the relationship but if I use anything besides “Users” I get an error stating that no such module exists so clearly the API is treating the type in the requestbody as a module name. The Meetings vardef does not include a relationship to Users other than meetings_assigned_user, meetings_modified_user and meetings_created_by although oddly none of those fields were altered after receiving the 201 response. The Users vardef does not contain any relationship for Meetings at all so maybe you can’t add a user to a meeting at all?

I don’t know, but what I would do if I were you is…

  • check the database for a meeting/user relationship created in the UI
  • compare the database of the meeting /user relationship created with the API

If the API returns true, it inserted something. There’s probably just a minor detail confusing the UI so it doesn’t show the record where you expect it to show.

This detail is either something on the meeting record, or on the user record, or on the relationship record. Once you know what it is, you can try figuring out how to get it done via the API…

The UI creates records in the meetings_users table. I have added this user to another meeting through the UI and verified that this is the table that gets updated. I don’t believe the API did actually do anything. Doing a global search for that user id it only shows up in 6 tables - meetings_users, securitygroups_users, tasks, tracker, user_preferences, and users. None of those show a recent modified date.

If the API doesn’t do anything then it’s most likely an API bug. Sorry I don’t know much to help you there.

You’ll have to dive into the API code and see where it goes wrong. Or create a custom API method and do it yourself.