create business workspaces

Hey all,
I try to find the documentation of to create a businessworkspaces with rest api.
I know it has to be something like: "cs.exe/api/v2/businessworkspaces.
could someone help me out?

Tagged:

Comments

  • I created some business workspaces a few years ago. It was undocumented then, looks like it's still undocumented. So standard warning - as it's undocumented you can't rely on it. It can change without notice.

    I was using /api/v2/businessworkspaces/ and I posted a FormData object with:

    • template_id
    • name
    • type (hard coded to 848)
    • parent_id
    • mime_type (hard coded to "Business Workspace")

    There's a few other options available but as I didn't need them I haven't recorded what they were.

    To check if things have changed, create a workspace in the Smart UI and use either fiddler or the network tab in your browser to check the objects that were created and sent.

  • Kindly help me to create the business workspace using rest api
  • Hi jeroen mak,

    @jeroen mak have you been sorted out the Business workspace creation using Rest API's, i have been struggling from past 2 days to resolve this issue, Kindly share your code to resolve the issue from my end.

  • AdrianLuca
    edited March 17, 2020 #5

    Hi all,

    first of all you need to authenticate, and in order to do this, you need to retrieve the OTCSTICKET by calling http:///livelink/cs/api/v1/auth , using POST method, with following body arguments: username and password

    The above call will return the ticket

    {
    "ticket": "hzEbtEV8naT9ZHhKzUsNKO6j04qKoWOt53HUrfMpWHXLACsxSqjpwC6iUt/LcPxaohitg/KO4XYrbu/eCUkRQiCCU+x61EJS"
    }

    Copy the ticket value and place it in the header of the second request as OTCSTICKET key, calling POST http:///livelink/cs/api/v2/businessworkspaces/

    headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
    headers.add("OTCSTICKET", "hzEbtEV8naT9ZHhKzUsNKO6j04qKoWOt53HUrfMpWHXLACsxSqjpwC6iUt/LcPxaohitg/KO4XYrbu/eCUkRQiCCU+x61EJS");

    As body request you should pass two arguments: body and format

    body : {"name":"DG-0000008/07.01.2020","type":"848","parent_id":"202481","template_id":"158540","roles":{"categories":{"156619":{"156619_3":"DG-0000008/07.01.2020"}}}}
    format : xml

    Body argument description
    {"name":"DG-0000008/07.01.2020","type":"848","parent_id":"202481","template_id":"158540","roles":{"categories":{"156619":{"156619_3":"DG-0000008/07.01.2020"}}}}

    name - name of the business workspace that will be created
    type - 848 is default id for business workspace, use the same
    parent_id - folder nickname (id) where the business workspace will be created, use a folder nickname from your system
    template_id - business workspace template id that you are using
    categories - list of category id, if you are using categories.
    e.g 156619 category id
    156619_3 category attribute

    Response should be something similar with attched, where 281228 is the id of the newly created business workspace


    .

    Thank you,
    Adrian

  • i get a argument "parent ID" invalid error....is it because of some issue in category mapping