Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2019-04-17 12:41:15

iteracy
Member
Registered: 2019-02-28
Posts: 12

GetChildren() no longer working

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

#2 2019-04-17 13:26:07

steve
Third Light Staff
Registered: 2013-06-06
Posts: 85

Re: GetChildren() no longer working

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

#3 2019-04-17 13:45:10

iteracy
Member
Registered: 2019-02-28
Posts: 12

Re: GetChildren() no longer working

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

#4 2019-04-17 16:32:51

steve
Third Light Staff
Registered: 2013-06-06
Posts: 85

Re: GetChildren() no longer working

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

#5 2019-04-18 08:40:50

iteracy
Member
Registered: 2019-02-28
Posts: 12

Re: GetChildren() no longer working

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

#6 2019-04-18 09:48:47

steve
Third Light Staff
Registered: 2013-06-06
Posts: 85

Re: GetChildren() no longer working

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

#7 2019-04-18 10:15:48

iteracy
Member
Registered: 2019-02-28
Posts: 12

Re: GetChildren() no longer working

Ah, is that the top level scope?! Marvellous, thanks :)

Offline

Board footer