Bug 52805 - [Kelvin API] add unique identifier for classes
[Kelvin API] add unique identifier for classes
Status: NEW
Product: UCS@school
Classification: Unclassified
Component: HTTP-API (Kelvin)
UCS@school 4.4
Other Windows NT
: P5 normal (vote)
: ---
Assigned To: UCS@school maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-16 22:03 CET by Michael Grandjean
Modified: 2021-05-25 13:33 CEST (History)
2 users (show)

See Also:
What kind of report is it?: Feature Request
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Grandjean univentionstaff 2021-02-16 22:03:13 CET
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.
Comment 1 Daniel Tröder univentionstaff 2021-02-17 07:55:44 CET
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.