Get user status via SDK

Dear community members,

I would like to retrieve the status of a WS user via the SDK. With "status", I mean whether the user is enabled or has been disabled. I could not find the property under WSuser object which would help me to find this information. Or I oversaw it.

I would like to find this information via the SDK since I am retrieving the users of a vendor. As far as I could see, I cannot retrieve a vendor from the REST API.

Thanks in advance for your support.

Regards,

Laurent

Parents Reply
  • Hi Laurent,

    Unfortunately, the REST API doesn't have any methods to retrieve vendors specifically but from the User based endpoints you can see if a User is part of Vendor object.

    If you call the Get User or Get Users endpoint using either of the URLs:

    http://yoururl.com/ws-api/v1/users/1001?token=364958459

    http://yoururl.com/ws-api/v1/users?token=364958459 

    Here is a screenshot of the sort of response:

    Screenshot of Trados Studio's REST API response in JSON format showing user details including id, username, and vendor information with 'SDL Vendor' as the name.

    Also, just to add, Did you know its possible to write Custom REST endpoints for WS? In my Role in SDL I have been creating a few for other customers recently to help them with requests like this to fill small gaps and meet specific needs not currently met by the out of the box API.

    So if you wanted a dedicated REST endpoint for obtaining Vendor information then is could be achieved in this manner also.

    Thanks

    Ryan 



    Generated Image Alt-Text
    [edited by: Trados AI at 10:36 AM (GMT 0) on 4 Mar 2024]
Children