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

You can add a group by sending the POST request to the following URL:  /group.

Permissions to run the request: Account OwnerAdministratorsDepartment Administrators or users with a role with custom settings allowing to add groups. 

Request Headers

ParameterDescription
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 OwnerAdministratorsDepartment Administrators or a user with a role with custom settings allowing to add groups. 
X-Auth-Password (required)The password of Account OwnerAdministratorsDepartment Administrators or a user with a role with custom settings allowing to add groups. 
name (required)The name of the group.
userIds (optional)The IDs of the users who will be included in the group.

After the request has been completed, the system returns the response with the 201 code. The body of the response contains ID of the added group.

Response Codes

CodeTextDescription
201Successful operationnew group has been added.
400Bad RequestSome of the sent parameters are incorrect.
401UnauthorizedAn authorization error.
403Permission deniedThe user doesn't have enough permissions to add groups.

Sample Request

POST /group 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: 12345Q
Content-Type:application/xml

<?xml version="1.0" encoding="UTF-8"?>
<request>
    <name>New Hires</name>
    <userIds>
        <id>3fa85f64-5717-4562-b3fc-2c963f66afa6</id>
        <id>9265e422-deb9-11e9-b4d0-864db459a4d7</id>
    </userIds>
</request>

Sample Response

HTTP/1.1 201 Successful operation
Connection: close

<?xml version="1.0" encoding="UTF-8"?>
<response>b1496214-acab-11e9-8db0-120a62f268a9</response>
  • No labels