Buzz: Questions & Answers

DLAP API Console - sample command for listenrollments

Follow
Aileen Sweeney

Is it possible to list all enrollment for child sub-domains under a parent domain using the cmd listenrollments? For Example Parent domain 100 has 3 sub-domains id of  101, 102, and 103. How does one format the command to get all enrollment data from 100 and on down? This sample does not work - syntax error 

cmd=listenrollments&domainid=100&show=current&userdomainid=100|101|102|103&includedescendantdomains=true&query=/startdate>'07/01/2016'&select=data,course,domain,user   

Comments (3)

Sort by
Brad Marshall
  • Agilix team member

Your `startdate` wasn't formatted correctly. I also stripped out `userdomainid` because it is redundant (and doesn't work passing more than one) with `includedescendantdomains`. 

cmd=listenrollments
&domainid=100
&show=current
&includedescendantdomains=true
&query=/startdate>2016-07-01
&select=data,course,domain,user
0 Comment actions Permalink
Aileen Sweeney

Is it possible to filter the results by roleid?

What is the correct syntax?

cmd=listenrollments&domainid=nnnnnnnn&limit=0&select=data,course,domain,user

This returns all but I want to limit the filter to only show those with a roleid of 62764742

&query=/roleid='62764742'

 

This sample returned more results than just for the course specified.These are made up values for domainid and courseid just to show the syntax being used.

cmd=listenrollments&domainid=nnnnnnnn&limit=0&select=data,course,domain,user&query/courseid= '123456789'

0 Comment actions Permalink
Scott Taylor

Hello Aileen,

It is not possible to filter the results by RoleID. The available options are listed under the 'query' section of the documentation for the ListEnrollments command.

The command where you are querying by CourseID appears to be missing '=' between query and /courseid, the rest appears to be correct. It should be formatted like so:
cmd=listenrollments&domainid=nnnnnnnn&limit=0&select=data,course,domain,user&query=/courseid= '123456789'

0 Comment actions Permalink
Please sign in to leave a comment.