Skip to content

Query

Query interface for dispatch, users, programs and statistics.

QueryDispatch

core.QueryDispatch(query)

Run a dispatch query

  • query:String dispatch query

Dispatch list

QueryUser

core.QueryUser(query)

Run a user query

  • query:String user query

User Array

QueryPrograms

core.QueryPrograms(query)

Run a program query

  • query:String program query

ProgramParticipation Array

QueryStats

core.QueryStats(query)

Run a stats query

  • query:String stats query
  • Stats list object
    • users: UserTotal Array
    • results: UserStatistic Array
    • start
    • end
    • operator

OrgList

core.OrgList()

Return the list of child orgs.

Org Array

OrgUserQuery

core.OrgUserQuery({org=id, query=string})

Run a user query on a specific child org

  • Object
    • org:UUID org id
    • query:String user query

User Array

OrgChildAllowed

core.OrgChildAllowed(orgId)

Check if a child org is within scope.

  • orgId:UUID org Id

Boolean

FindUserByEmail

core.FindUserByEmail(email)

Find user by email

  • email:String email address

User

FindUserByExternalId

core.FindUserByExternalId(id)

Find user by external id registered for that org

  • id:String external id

User

LastActivity

core.LastActivity(userId)

Check if a user was active within a specific time range

  • Object
    • userId:UUID user id
    • from:Date date in YYYY-MM-DD format
    • to:Date date in YYYY-MM-DD format
    • ignore:UUID[] array of tracker ids; optional

Date or nil