Method: getActiveUsersByPeriod

Permissions to Run Request

Account Owner, Account Administrators, Department Administrators, Authoror custom roles

Department Administrators can get active users belonging to the departments they manage and their sub-departments.

Request Parameters

ParameterTypeDescription
token (required)stringAccess token. You can obtain a token by making a request
acitvityDate[startDate] (optional)string

If this parameter is used, only users belonging to the specified group will be retrieved

If the activityDate parameter is not passed, the billing period value from the subscription is taken.

acitvityDate[endDate] (optional)string

If the activityDate parameter is not passed, the billing period value from the subscription is taken

Return Values

After the request is successfully processed, the system returns an object with the following properties:

ParameterTypeDescription
usersUserProfile[]

An array containing user profiles.The UserProfile object has the same properties as the getUserProfile method

nextPageTokenstringThe token needed to continue to the next page
workLeaveStatus (optional)string

A work leave status. An array with the following parameters:

  • workLeaveReason  
    Reasons for work leave status
  • startDate
    The work leave status start date. You can add it in the yyyy-mm-dd format
  • endDate
    The work leave status end date. You can add it in the yyyy-mm-dd format

Possible Errors

ErrorDescription
Permission denied

The user doesn't have permission to complete the request. For example, Department Administrator can't get a list of users belonging to a department they don't manage

Sample Request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://ispringlearn.com/go/services/api/soap">
   <soapenv:Header/>
   <soapenv:Body>
      <soap:GetActiveUsersByPeriodRequest>
         <soap:credentials>
            <soap:token>XxPm9-CtfLemV_EJfYb-gESxBsiq_OUu0W_Vpg2RhBg</soap:token>
         </soap:credentials>
         <!--Optional:-->
         <soap:activityDate>
            <!--Optional:-->
            <soap:startDate>2020-1-1</soap:startDate>
            <!--Optional:-->
            <soap:endDate>2026-1-1</soap:endDate>
         </soap:activityDate>
      </soap:GetActiveUsersByPeriodRequest>
   </soapenv:Body>
</soapenv:Envelope>

Sample Response

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://ispringlearn.com/go/services/api/soap">
   <SOAP-ENV:Body>
      <ns1:GetActiveUsersByPeriodResult>
         <ns1:activeUsersByPeriod>
            <ns1:ids>
               <ns1:id>998415dc-2192-11ef-9b9c-0242ac130078</ns1:id>
            </ns1:ids>
            <ns1:activityStartDate>2020-01-01T00:00:00+00:00</ns1:activityStartDate>
            <ns1:activityEndDate>2026-01-01T00:00:00+00:00</ns1:activityEndDate>
         </ns1:activeUsersByPeriod>
      </ns1:GetActiveUsersByPeriodResult>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
  • No labels