Univention Bugzilla – Bug 50933
Kelvin user create return 404 despite successful creation
Last modified: 2020-03-24 11:58:01 CET
According to the docs, the Kelvin API should return "201 Created" when a user was created successfully. Instead it returns a "404 Not found" in spite of the user being created successfully. root@master:~# univention-ldapsearch uid=bob1 root@master:~# cat create.json { "name": "bob1", "school": "https://master.ucs.demo/ucsschool/kelvin/v1/schools/DEMOSCHOOL", "firstname": "Bob", "lastname": "Marleyyy", "birthday": "1945-02-06", "disabled": true, "email": null, "record_uid": "bob25", "roles": ["https://master.ucs.demo/ucsschool/kelvin/v1/roles/teacher"], "schools": ["https://master.ucs.demo/ucsschool/kelvin/v1/schools/DEMOSCHOOL"], "source_uid": "Reggae DB", "password": "univention", "udm_properties": { "title": "Mr." } } root@master:~# curl -i -k -X POST "https://master.ucs.demo/ucsschool/kelvin/v1/users/" \ > -H "accept: application/json" \ > -H "Content-Type: application/json" \ > -H "Authorization: Bearer eyJ0eXAiOiJKV1QiL..." \ > -d "$(<create.json)" HTTP/1.1 404 Not Found Date: Wed, 11 Mar 2020 12:26:34 GMT Server: uvicorn content-length: 112 content-type: application/json Via: 1.1 master.ucs.demo {"message":"No python class: 'uid=bob1,cn=lehrer,cn=users,ou=DEMOSCHOOL,dc=ucs,dc=demo' is not a ImportTeacher"} root@master:~# univention-ldapsearch uid=bob1 dn: uid=bob1,cn=lehrer,cn=users,ou=DEMOSCHOOL,dc=ucs,dc=demo uid: bob1 ...