Skip to content
GitLab
    • Explore Projects Groups Topics Snippets
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • fusiondirectory-plugins fusiondirectory-plugins
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 65
    • Issues 65
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • fusiondirectoryfusiondirectory
  • fusiondirectory-pluginsfusiondirectory-plugins
  • Issues
  • #6012
Closed
Open
Issue created 5 years ago by coudot@coudotReporter
  • New related issue

  • New related issue

Improve REST webservice call syntax

Closed

Improve REST webservice call syntax

Some calls to REST webservices can be improved.

For the moment, I noticed:

  • the dateOfBirth syntax expected in modification is different from the syntax when reading the attribute
  • the userPassword attribute can be read but not modified

For user password:

curl -H 'Session-Token: koo5cmma2kt1915k9qthjm6ef2' -X PUT -d '"test"' 'https://fd.pfptnbdev.io/rest.php/v1/objects/user/uid=coudot,ou=users,dc=kroqi,dc=fr/user/userPassword'
[{"message":"Le champ obligatoire 'Mot de passe' n'est pas rempli\u202f!","line":44,"file":"\/usr\/share\/fusiondirectory\/include\/webservice\/class_fdRPCService.inc"

Even a user creation fails:

cat fd-rest-new-account.json
{	"attrs": {		"user": {			"givenName": "Baptiste",			"sn": "TEST",			"userPassword": "test"		},		"mailAccount": {			"mail": "baptiste.gaillet@test.fr"		},		"personalInfo": {			"personalTitle": "Monsieur",			"fdBadge": "16"		}	},	"template": "ou=users,dc=kroqi,dc=fr"}
curl -X POST -d @fd-rest-new-account.json -H "Session-Token: koo5cmma2kt1915k9qthjm6ef2" https://fd.pfptnbdev.io/rest.php/v1/objects/user
[{"message":"Le champ obligatoire 'Mot de passe' n'est pas rempli\u202f!","line":44,"file":"\/usr\/share\/fusiondirectory\/include\/webservice\/class_fdRPCService.inc"
An error occurred while loading designs. Please try again.

Tasks

0
Cannot read properties of undefined (reading 'workItem')

Linked items
0

Link issues together to show that they're related. Learn more.

Activity


  • coudot added plugin-webservice label 5 years ago

    added plugin-webservice label

  • bmortier assigned to @bmortier 5 years ago

    assigned to @bmortier

  • Côme Chilliet
    Côme Chilliet @cchilliet · 5 years ago
    Reporter

    For userPassword there is already #5979 (closed)

  • coudot
    coudot @coudot · 5 years ago
    Author Reporter

    Thanks a lot, I did not see the issue. Using the array as userPassword value is a acceptable workaround for the moment.

  • Côme Chilliet
    Côme Chilliet @cchilliet · 5 years ago
    Reporter

    the dateOfBirth syntax expected in modification is different from the syntax when reading the attribute

    @coudot This does not seem true, if I call PUT on /objects/user/<userdn>/personalInfo/dateOfBirth with input '2018-07-05', and then I call GET on the same path, I do get the same format. Can you provide an example of what format was returned to you by the API that was unexpected?

    Edited 5 years ago by Côme Chilliet
  • Côme Chilliet added 15m of time spent at 2019-11-27 5 years ago

    added 15m of time spent at 2019-11-27

  • bmortier assigned to @MCMic and unassigned @bmortier 5 years ago

    assigned to @MCMic and unassigned @bmortier

  • bmortier changed due date to December 03, 2019 5 years ago

    changed due date to December 03, 2019

  • bmortier added PJ1802-0188 label 5 years ago

    added PJ1802-0188 label

  • bmortier changed milestone to %FusionDirectory 1.4 5 years ago

    changed milestone to %FusionDirectory 1.4

    • coudot
      coudot @coudot · 5 years ago
      Author Reporter

      @MCMic Indeed, with GET / PUT it seems to work. I don't remember how I had the issue, so we can close this one.

    • Côme Chilliet
      Côme Chilliet @cchilliet · 5 years ago
      Reporter

      I expect it was in the result of a search, as explained in #6014 (comment 73647) the search works on LDAP attributes and returns LDAP values, so for dateOfBirth you’d get LDAP generalized time format. I think this needs to be better documented.

    • Please register or sign in to reply
  • Côme Chilliet added 1 deleted label 5 years ago

    added 1 deleted label

  • bmortier added user-manual label and removed 1 deleted label 5 years ago

    added user-manual label and removed 1 deleted label

  • bmortier removed due date 5 years ago

    removed due date

  • bmortier changed due date to December 23, 2019 5 years ago

    changed due date to December 23, 2019

  • Côme Chilliet closed 5 years ago

    closed

  • bmortier removed due date 5 years ago

    removed due date

  • dockx thibault added won't fix label 2 years ago

    added won't fix label

Please register or sign in to reply
Assignee
Côme Chilliet's avatar
Côme Chilliet
Assign to
Labels
3
Bugs Fixed plugin-dns
3
Bugs Fixed plugin-dns
    Assign labels
  • Manage project labels

Milestone
FusionDirectory 1.0.10
FusionDirectory 1.0.10 (expired)
Due date
None
None
None
Time tracking
No estimate or time spent
Confidentiality
Not confidential
Not confidential

You are going to turn on confidentiality. Only project members with at least the Reporter role, the author, and assignees can view or be notified about this issue.

Lock issue
Unlocked
0
0 Participants
Reference: fusiondirectory/fd-plugins#4591

Menu

Explore Projects Groups Topics Snippets