Rest/Api v9.15/v4: Patch "api/admin/users/{userId}" key 'status' is required

Stefan Hall shared this problem 18 days ago
Defect Logged

Hi,

according to the documentation, the “status” field is not mandatory, but it is if you use the API for a user update => https://developers.yellowfinbi.com/dev/api-docs/current/#operation/updateUserAdmin

If the “status” key is omitted in json (as in the documentation), a zero value is written to the database. This means that the data record is broken.

Personally, I think the documentation is correct, because if I don't want to change the status during an update, I don't need to know the current status in Yellowfin and set it again. That seems unnecessary to me. I therefore consider it to be another API error.

:) Stefan - YF 9.15, API 4.0

Replies (1)

photo
1

Hi Stefan,

I hope you're doing well. Thanks for noticing this quirk and bringing it to our attention.

In your testing, was the user currently ACTIVE or INACTIVE or some other status? For you, did it matter what was the current status of the user when the zero value was written or was the record broken no matter the current status of the user?

Kind regards,

Chris

photo
1

Hi Chris,

the current status is irrelevant. If you only want to change the name, the status is always “NULL” afterwards.

;) Stefan

photo
1

Hi Stefan,

Thanks for confirming. I'll test and get a bug report written up if I can replicate.

Kind regards,

Chris

photo
1

Hi Stefan,

I was able to replicate this in 9.15. The user is then corrupted and cannot be logged in.

In the previous version of Yellowfin, this still works correctly so I've written up a task for the developers.

Let me know if you have any further questions on this topic.

Kind regards,

Chris

photo
1

Hi Chris,

I have no further questions. Please log it as a defect and I will then wait another 3 months for a hopefully better API.

;) Stefan

photo
1

Hi Stefan,

No worries. This has now been fixed internally so should be rolled out in a future patch.

Kind regards,

Chris

photo
Leave a Comment
 
Attach a file