You are not logged in.
Pages: 1
Hi,
Since the recent Chorus upgrade some of our API calls don't seem to be working anymore. Specifically we're trying to use GetChildren() to get a list of the top level folders through the API and it's not returning the same list of folders that it used to. The data that we're sending is:
{
"apiVersion":"2.0",
"sessionId":"[our session ID]",
"action":"Contexts.GetChildren",
"inParams":{
"context":"me"
}
}
It's returning:
{"result":{"api":"OK","action":"OK"},"sideLoad":[],"outParams":[],"sessionTrackingId":"[session tracking ID]"}
Any help gratefully appreciated.
Offline
Hi,
Looking at the API documentation it seems that the name of the expected input parameter is 'scope' rather than 'context':
Contexts.GetChildren
(
[int scope = 'me']
)
Please try changing that and see if you have better luck.
Best Regards,
Steve
Offline
Hi Steve,
Thanks so much for getting back to me, I really appreciate the assistance. We've tried changing it to scope but it's still not returning anything. We're now sending:
{ "apiVersion":"2.0", "sessionId":"[our session ID]", "action":"Contexts.GetChildren", "inParams":{ "scope":"me" } }
And getting back the same
{"result":{"api":"OK","action":"OK"},"sideLoad":[],"outParams":[],"sessionTrackingId":"[session tracking ID]"}
Is there anything else obvious that we're doing wrong?
Offline
Hi,
The 'me' context now refers to the private space of the user associated with your session. If you manually create a space temporarily in your private space, you should see it listed when you use Contexts.GetChildren().
e.g. 'group1234'
If you then create a subspace within your new temporary space, you could then see the spaces inside the temporary space by calling Contexts.GetChildren() with the 'scope' value set to the previous context id i.e. 'group1234' instead of 'me'
Best Regards,
Steve
Offline
Thanks Steve, I'll give that a go. It would be great to update the API docs to make this clear to future developers.
Offline
Hi,
You might also want to try setting 'scope' to 'dom0' to get the top level list of spaces. I have logged a change requests regarding the docs.
Best Regards,
Steve
Offline
Ah, is that the top level scope?! Marvellous, thanks :)
Offline
Pages: 1