Connected Workspaces REST API 16.2: Create business workspace bug or wrong documentation?

SteffenM
SteffenM Member

Hi there,

I recently tried to create business workspaces with this rest api call:

POST api/v2/businessworkspaces/

The documentation specifies the body as a JSON string as this example:

{
"template_id": 23234,
"name": "Test",
"parent_id": 23235,
"description": "",
"categories": {
"23228": {
"23228_2": "5654",
"23228_3": ""
}
}
}

This would never work for me until I debugged Content Server to what went wrong.
The "categories" is only processed, when it is nested into "roles", which does not make sense to me.

With this JSON as body, it does work:

{
"template_id": 23234,
"name": "Test",
"parent_id": 23235,
"description": "",
"roles": {
"categories": {
"23228": {
"23228_2": "5654",
"23228_3": ""
}
}
}
}

The Content Server version is 16.2.10.
Does anybody experience the same issue?

Best regards,
Steffen

Comments

  • Yes, I had the same issue. Someone pointed out on the forums the correct format is as you found in your second example. It needs to have the "roles":{... before it actually works. If I remember correctly, it's written correctly in one of the samples, but the actual API reference documentation has it wrong.

  • Can you raise a support call for this to ensure OT are made aware and can update the docs otherwise people will ask the question again soon