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
-
you should put categories, classification in roles property. your json should look like this if i am not wrong.
{
"template_id":100545150,
"name":"MyTest",
"type":848,
"parent_id":14687693,
"roles":{
"categories":{
"100545153":{
"100545153_2":"MyTest",
"100545153_3":"Test"
}
}
}
}5
Answers
-
you should put categories, classification in roles property. your json should look like this if i am not wrong.
{
"template_id":100545150,
"name":"MyTest",
"type":848,
"parent_id":14687693,
"roles":{
"categories":{
"100545153":{
"100545153_2":"MyTest",
"100545153_3":"Test"
}
}
}
}5 -
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
0 -
Hello Bryan,
I'm trying the same and I'm wondering how are you dynamically creating the body argument.
Thank you
0 -
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.
0 -
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.
0 -
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?
0
Categories
- All Categories
- 122 Developer Announcements
- 53 Articles
- 149 General Questions
- 147 Thrust Services
- 56 OpenText Hackathon
- 35 Developer Tools
- 20.6K Analytics
- 4.2K AppWorks
- 9K Extended ECM
- 917 Cloud Fax and Notifications
- 84 Digital Asset Management
- 9.4K Documentum
- 31 eDOCS
- 181 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management
- 8 XM Fax
- Follow Categories