Page tree
Skip to end of metadata
Go to start of metadata

Request: GET /user

Permissions to Run the Request

Account Owner, Account Administrators, Department Administrators, Publishers or custom roles

Department Administrators, Publishers, and users with a custom role can get lists of users belonging to the departments they manage and their sub-departments.

Request Headers

HeaderDescription
X-Auth-Account-Url (required)The base URL of the account, e.g. http://myaccount.ispringlearn.com
X-Auth-Email (required)The login of Account Owner, Account Administrator, Department Administrator, Publishers, or a user with a custom role
X-Auth-Password (required)The password of Account Owner, Account AdministratorDepartment Administrator, Publishers, or a user with a custom role
ParameterDescription
departments (optional)

The array of departments IDs you want to get user lists of.

groups (optional)The array of groups IDs you want to get user lists of.

Possible Response Codes

CodeTextDescription
200Successful operationThe request has been processed successfully. 
400Bad Request A request error.
401UnauthorizedAn authorization error.
403Permission deniedThe user doesn't have enough permissions to complete the request.

Sample Request

GET /user?departments[]=e95b4ad0-5f50-11e9-80c4-0a580af406eb&groups[]=e0b394fc-44b9-11e9-92c8-0a580af401f6 HTTP/1.1
Host: api-learn.ispringlearn.com
X-Auth-Account-Url: https://myaccount.ispringlearn.com
X-Auth-Email: email@email.com
X-Auth-Password: password

Sample Response

HTTP/1.1 200 Successful operation
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<response>
	<userProfile>
		<userId>43eb7146-6280-11e9-b274-a6210366ac32</userId>
		<role>publisher</role>
		<departmentId>e95b4ad0-5f50-11e9-80c4-0a580af406eb</departmentId>
		<status>1</status>
		<fields>
          <field>
            <name>LOGIN</name>
            <value>helen@ispringsolutions.com</value>
          </field>
          <field>
            <name>EMAIL</name>
            <value>helen@ispringsolutions.com</value>
          </field>
          <field>
            <name>FIRST_NAME</name>
            <value>Helen</value>
          </field>
          <field>
            <name>LAST_NAME</name>
            <value>Smith</value>
          </field>
          <field>
            <name>JOB_TITLE</name>
            <value>Sales Manager</value>
          </field>
          <field>
            <name>COUNTRY</name>
            <value>643</value>
          </field>
        </fields>
		<groups>
			<id>e0b394fc-44b9-11e9-92c8-0a580af401f6 </id>
		</groups>
		<manageableDepartmentIds>
			<id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
		</manageableDepartmentIds>
		<addedDate>2019-04-30</addedDate>
		<lastLoginDate>2019-04-30</lastLoginDate>
	</userProfile>
    <userProfile>
		<userId>43eb7146-6280-11e9-b274-a6210366ac33</userId>
		<role>string</role>
		<departmentId>e95b4ad0-5f50-11e9-80c4-0a580af406eb</departmentId>
		<status>1</status>
		<fields>
          <field>
            <name>LOGIN</name>
            <value>daniel@ispringsolutions.com</value>
          </field>
          <field>
            <name>EMAIL</name>
            <value>daniel@ispringsolutions.com</value>
          </field>
          <field>
            <name>FIRST_NAME</name>
            <value>Daniel</value>
          </field>
          <field>
            <name>LAST_NAME</name>
            <value>Brown</value>
          </field>
          <field>
            <name>JOB_TITLE</name>
            <value>Sales Manager</value>
          </field>
          <field>
            <name>COUNTRY</name>
            <value>643</value>
          </field>
        </fields>
		<groups>
			<id>e0b394fc-44b9-11e9-92c8-0a580af401f6</id>
		</groups>
		<manageableDepartmentIds>
			<id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
		</manageableDepartmentIds>
		<addedDate>2019-04-29</addedDate>
		<lastLoginDate>2019-04-30</lastLoginDate>
	</userProfile>
</response>



  • No labels