Univention Bugzilla – Bug 52805
[Kelvin API] add unique identifier for classes
Last modified: 2021-05-25 13:33:45 CEST
With more systems trying to or wanting to use the Kelvin API, we see new requirements. One results in the need for a unique identifier for classes that is NOT the groupname. Scenario: We have a source system that contains school classes. These classes should be created in UCS@school and updated via the Kelvin API. We do have services connected to UCS@school that require that class group objects are _renamed_ to function properly, e.g. the "6a" becomes the "7a" (simply changing the group membership for users is not sufficient). Our source system is not capable of recognizing a rename of the class in a way to properly tell the Kelvin API about this. Instead of telling the Kelvin API "6a is now 7a", the source system is only capable of saying "6a has members foo, bar, baz" before the rename and "7a has members foo, bar, baz" after the rename. However, the source system stores unique identifiers for classes. This would give us the possibility to use these identifiers also for renaming classes via Kelvin API. The source system would then be able to say: - "class with ID=4711 has name=6a and members="foo, bar, baz" before the rename - "class with ID=4711 has name=7a and members="foo, bar, baz" after the rename This would be of much use in projects with this source system. However, Kelvin would need to be enabled to use this identifier for the resource "classes" instead of the class name.
Assuming '=' is not allowed in group names, this could be achieved by interpreting a call like: PATCH /ucsschool/kelvin/v1/classes/custom-id=4711 PUT /ucsschool/kelvin/v1/classes/custom-id=4711 If the 'name' contains a '=' then a UDM attribute 'custom-id' with value '4711' is used to identify the group, else the old behavior is used. The 'school' attribute is currently mandatory. I'd say it should stay that way also in the above case.