Creating and Updating Users

Learn

You can create new users in the system and give them the appropriate access. This is because you have access to more than just the information provided by the 360Alumni GUI and you can perform complex operations such as approving users when they are created.

Create a New User with POST /api/users/

Follow these steps to create a user.

Click the POST /api/users/ method. Required parameters to create a new user include first_name, last_name and enabled. These parameters as well as all the optional parameters are described in the User Object reference.

Click Sandbox to display the form for entering values and trying the request.

Enter your API key in an HTTP request header.

Enter a string email address for the email parameter.

Enter a name for the first_name parameter.

Enter a name for the last_name parameter.

Enter 0 | 1 for the enabled parameter.

Enter an array ["admin" | "user"] for the groups parameter.

Click Try! to execute the API request.

The POST /api/users/ Request

The Response Body shows the JSON results. Note that the user_id field uniquely identifies a user. Make a note of this value to use for identifying the user in later examples.

Note: If the response header is "400 Bad Request" try sending the request as a JSON through the Content Textarea.

Get an Array of User Records with GET /api/users/

Click the GET /api/users/ method. Note that the page parameter is required and the default value is 1.

Click Sandbox to display the form for entering values and trying requests.

To request all user records:

Enter your API key in an HTTP request header.

Click Try! to execute the API request.

The Response Body contains a JSON array of User Objects. Note that the user_id field uniquly identifes each user. Save one of the user_id values to use in later examples.