# User and Group APIs

**URL:** <https://forum.xwiki.org/t/user-and-group-apis/7715>\
**Category:** Development\
**Tags:** proposal\
**Created:** [November 5, 2020, 12:41pm UTC](https://forum.xwiki.org/t/user-and-group-apis/7715 "2020-11-05T12:41:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [November 5, 2020, 12:41pm UTC](https://forum.xwiki.org/t/user-and-group-apis/7715/1 "2020-11-05T12:41:48Z")

</div>

Hi devs,

# Context

Not long ago we started introducing a User API. We now need a Group API, and we need it fast, before the Unstable annotations on the User API expire, since introducing the Group API can have impact on the User API.

I’ve started a design page for the Group API at [https://design.xwiki.org/xwiki/bin/view/Proposal/GroupAPI](https://design.xwiki.org/xwiki/bin/view/Proposal/GroupAPI). For reference the User API page is at [https://design.xwiki.org/xwiki/bin/view/Proposal/UserAPI#HIterationNov2020](https://design.xwiki.org/xwiki/bin/view/Proposal/UserAPI#HIterationNov2020)

# Proposal

I’ve had a discussion yesterday with Manuel and Simon and we agreed that we prefer option 4 for the Group API (from [https://design.xwiki.org/xwiki/bin/view/Proposal/GroupAPI](https://design.xwiki.org/xwiki/bin/view/Proposal/GroupAPI)).

Basically it means having 3 APIs: one for Users, one for Groups and one for Actors (common between Users and Groups). The 3 APIs will be same (with different class name but essentially similar).

In term of modules and packaging it would mean:

- xwiki-platform-actor
  - xwiki-platform-actor-generic
    - xwiki-platform-actor-generic-\*

  - xwiki-platform-actor-user
    - xwiki-platform-actor-user-\*

- xwiki-platform-actor-group
  - xwiki-platform-actor-group-\*

In term of java packages it would mean:

- org.xwiki.actor.\*
- org.xwiki.actor.user.\*
- org.xwiki.actor.group.\*

This means:

- moving to legacy all non-Unstable classes from the current xwiki-platform-user modules.
- adding back, with an Unstable annotation, the classes that don’t have a new api yet (so that they can be used). It also means making sure we finish writing the new APIs before this Unstable expires

WDYT? Any better idea?

Thanks

---

<div class="post-metadata">

**Author:** ![vmassol](https://forum.xwiki.org/user_avatar/forum.xwiki.org/vmassol/32/6_2.png) [@vmassol](https://forum.xwiki.org/u/vmassol)\
**Post date:** [June 25, 2024, 4:31pm UTC](https://forum.xwiki.org/t/user-and-group-apis/7715/2 "2024-06-25T16:31:28Z")

</div>

> [@vmassol](#):
>
> We now need a Group API, and we need it fast, before the Unstable annotations on the User API expire, since introducing the Group API can have impact on the User API.

ouch…
