OpenShare

I'm trying to import TMs into GroupShare. I'm able to do it all except create Organizations and Libraries in GroupShare which is needed for the import. Is this something that can be done via some API I missed. I've checked all the API manuals (2011).

Any ideas on how creation of Organizations and Libraries in GroupShare could be automated ?

-Chris

Parents
  • Hi Chris,

    With the release of SDL Studio GroupShare 2014 we introduced User Management through the REST API.

    You can currently use the REST API to do the following:

    • Create/Edit/Delete/Search Users
    • Create/Edit/Delete/Search Roles
    • Create/Edit/Delete/Search Organization
    • Add/Remove User from a Role

    You can access the current documenation on a GroupShare Server by browsing to the URL: http://localhost:41234/help/management/Documentation
    (This is currently not accessible remotely, so you need to be RDPed into the actually Server)

    One piece you need which is not yet documented is that you need to put a request first to get a token (which will be valid for 8 hours).

    To do so, you send a Post Request to

    URL:  http://servername/authentication/api/0.7/login

    Headers:

    Header             Value

    Authorization   Basic c2E6c2E=

    Content-Type application/json

    Body (json):  ["ManagementRestApi"]

    This will return a token to you.

    Once you have this token, you need to send an Authorization Header with the following for every REST Call:

    Header               Value

    Authorization      Bearer Token

    An example would look like this:

    Bearer AAIAAKPwOXgXWRZPIfL2wl47hJKWPRa1JCax8dbLiuj9BzTJM3Meg96mmMTtYW6odsYaX5-G6MZrpLmDApsAO15CU_4O_VEuNd7cOYLmF4HKorulHKJ3Z0p5bQsH6Oej_YDWphD50AoolNk6EX6IfWuY3-dKQODu4EBUdFjqSXE9MDJh12Bevmi8k_bdwrulyjfMYbs5EH9mYZLO1a1huw65Zm2TGI7ne2xGhPbVuJAkpXu_VoIxnK92z8t-4sXKtwXqZPLDWXIvY-Mbp_zDCTsgWGE9-vzcHg-oxQ4901V7MCOZYxFtF0PjZAmjN2-XuN9Bukwa3cxxSrqxWqDFlNY1TiYJikFEsxV5G_qcMmZWnnay7O7gpwFSnAceAaI7Eo1rNSEwkUjRqT_QJFMoLkvLMAPAnVg8auHJ6S_YR3TxhVPVI7y8aTCyWGCsKBpAuyYWeTX7BqNouPp2OQJ-P6CM4jy2iw_knib0jZQI90v4yU4VTQQNXaKdAsEUCC1-9AIkyxT0Db6nNgblZoq8Nlfxxlwlq4G1pC4pnwjCidbRSP92bkHpSXhw328p5gld9u1TM8c8GxGNf5HVkMfS1QZwHyhy8ORqcBT3ibzcgz5zoSfnJPKjZicMCgEmDHwP1_DkvYxvlVxVrbrh9jKVDJKEfS5MpxKQkG79jX1ux8_BriSuhAIAAAACAABUbiXeEiSg12mr3GY8ia00FoGa8ybZ1DIfy4s_G4b7Nlt1aL6UIQauYjY5yVJ1h4VVGOAj76V_JmBRrY8dZtE2J5SNflmCK8SAESOK5soVlI_rVhlI8p4ee3Gsyhe77bJFBTGbH1AH4wYiASX_i1WdGOmWoKrv6A0z_GVUkQi49OwGCfklWD40w0Z9jHibJa-94kL89NElzsjSm4tWWs1C0nAV9Ur88RmqKTDyO5tVu0bLcvPhRFpEoBNbYt0YbI2HahQsY0tNGCeCBySZYNLyQdFwx6GD9od8iATG6TY9jS_SiqmK8Iv4XYe927voExF2-SpLw07xQb3ATBFeW7yAQqCnLVMCiRK5CIbzpOHVJFoMMYyYSxXtXAZbE0r_0dAVVj58wV8laGxsibFHDaT6EqPLnCXhEC7SMQuIrZRcgUUQRXV0TagpAbNMnBbeigocY6LEJ97AB22GTIW2WkBPAE1szXxUB7QwGllZsG2b2OjOpvSRpd38YvGxYmAUL9a871GHGL5nhzjbdul5b2NYqkNPAVSYIzx-Z5zBIU4bbaPKD4LX8sCLbLWusXrmZs2BOZamta9ZIyG-vYQxcjXBHQecry5mgkOtAy4a6qut6cIfDUaSLW7fZXsRhqTGW7yaL50ObhFzc5NplCQRSTekJgn0sTxafmAUnEIHIhMpQv8b50fUbCmcvXps8PFZG6mIoHfr2qrTkB3AL0FESn833M4MQNvY_PPKO74CaKdQvY-7v69XVpn432nvfRf_LBWs9nlvsc-QQhJAVsFSV3t82UnW5O_Bk2BKXLP-BYkcVpVYGYyCZQReIOGteFqSeASbkFfXoxAnxbw8Lztzq2bD

    One very nice tool to get started and playing around with the REST API is the Postman - REST Client for Google Chrome:

    chrome.google.com/.../fdmmgilgnpjigdojojpjoooidkmcomcm

    I hope this helps you get started, if you do have any further questions let us know.

    Best Regards,

    Luis Lopes

    Product Manager

    Best regards,
    Luis Lopes | Principal Product Manager | RWS | (twitter) @Luis___Lopes |

  • Hi Luis,

    Thanks for the reply. Unfortunately we are not running GroupShare 2014 yet. We are using GroupShare 2011. Having a REST API does seem like it would solve the problem, is this not available for GroupShare 2011 ? We have a lot of Organizations and Libraries to create, is there any possible way of doing it automatically somehow?

    -Chris

  • Hi Chris,

    There are a lot of dependencies between SQL DBs and Tables for Organizations, so we do not recommend working directly in the SQL Database.

    What's stopping you from upgrading to GS 2014?

    Cheers,

    Luis

    Best regards,
    Luis Lopes | Principal Product Manager | RWS | (twitter) @Luis___Lopes |

  • Hi Luis,

    thanks for explaining the REST API.

    I'm currently trying to reset a user password, and according to the documentation I assume that should work with the PUT request to change user data. With this request I can sucessfully change other fields like desciption and display name, but not the password.

    Is this the right way to change the password?

    Thanks and best regards

    Thomas

  • Hi Thomas,

    Changing Password is currently not supported yet through the REST API.

    I will make sure we provide this functionality. Could you let me know the Use Case for that functionality? That would help.

    Thanks,

    Luis

    Best regards,
    Luis Lopes | Principal Product Manager | RWS | (twitter) @Luis___Lopes |

  • Hi Luis,

    thanks for your reply. We are building a tool for user management that can access the SDL Groupshare via the REST API. One of the requirements is to reset a password for one or more users, so we would like to submit the username and the new password to the hittp request, if that's possible (or if you could just extend the PUT request for user change, so that not only fields like description, but also the password can be changed?).

    Thanks and best regards

    Thomas

  • Hi Luis,

    I have another question: Our user that handles the user management should be able to maintain the users, but not have complete Administrator rights.

    Therefore we created a new role. With this role, we can now create users, but we can not assign any roles to the new user (on the roles tab, the checkboxes for the roles are visible but disabled).The role we created has the following permissions so far:

    View Library

    View Organization

    View User

    Add User

    Edit User

    Delete User

    View Background Tasks

    Manage Roles

    View DB Server

    View Container

    View Language Resource

    View Fields

    View TM

    Can you tell us what we're missing here?

    Thanks for you help and best regards

    Thomas

  • Hi Thomas,

    You are missing the Edit Organization permission. If you add that, it works.

    Thanks,

    Luis

    Best regards,
    Luis Lopes | Principal Product Manager | RWS | (twitter) @Luis___Lopes |

  • Hi Luis,

    thanks for your help, now it's working!

    Best regards

    Thomas

  • Hi Luis, in using the REST api I got the authorization, i'm able to retrieve, let's say, the list of users, but i get an (valid) empty response on getting the project list (projectserver/api/1.0/Projects). I tried with two different groupshare servers.

    Since the management/api/1.0/Users request is almost identical to the aforementioned one, I thought it could be an authorization issue.

    The authorized user has the administrator role on the root organization. 

    I noticed in the response header of login there's a key "Accept-Ranges" = none, but I'm not sure it has anything to do with the authorizations granted.

    The body for the login request is ["ProjectServerRestApi","ManagementRestApi"]

    Do You have any suggestion?

    Thank you in advance!

    --

    Enrico

  • Hi Enrico,

    Yes, GetProjects will currently only return empty, we are working on fully implementing this.

    Thanks,

    Luis

    Best regards,
    Luis Lopes | Principal Product Manager | RWS | (twitter) @Luis___Lopes |

Reply Children
No Data