16.2.8 rest call to create workspace with category/required attribute

Hello,

New to the development world, and I'm stuck on making a rest call to create a workspace and pass in the required attribute values so it's named correctly. If I remove the category from the template, I can create the workspace but the category doesn't get applied. If I remove the required value for the attribute, I can create the workspace but the category values don't get applied, everything is blank.

I'm making a post call to /api/v2/businessworkspaces
{"template_id":100545150,"name":"MyTest","type": 848,"parent_id":100795828,"categories":{"100545153":{"100545153_2":"MyTest","100545153_3":"Test"}}}

Am I doing something wrong?

Thanks,
Bryan

Best Answer

Answers

  • That was it, thanks a lot. I just copied the example from the Connected Workspaces REST api documentation so I guess it's wrong in there.

    Bryan

  • Ovidiu Moldovan
    edited September 30, 2019 #5

    Hello Bryan,

    I'm trying the same and I'm wondering how are you dynamically creating the body argument.

    Thank you

  • This was all through postman for testing, just to get something working to pass off to our normal developers for the heavy lifting, so I can't help with that part. Sorry.

  • Awais_Mirza
    edited January 14, 2021 #7

    Do you guys know if the same web-service can be used for update as well? SOAP web-services used to have a method for "createOrUpdateWorkspace", but I am getting a 400 BAD REQUEST, if I call the REST API using the same parameters. In my mind, the result should have been an update to the workspace but all I get is a 400 BAD REQUEST error.

    Thanks for your help.

  • SOAP web services continues to have the createOrUpdateWorkspace method listed under its interface description. However, it is hosted by the xECM web services, that is separately installed and configured as part of the xECM setup.

    I must ask - What aspect of an already created Connected Workspace are you looking to update with SOAP, or the REST approach?