User account
The user account contains the minimum information needed to create a user in EthosCE. When creating or updating a user, only the following fields are valid: name, mail, roles and status.
When calling a GET request for user data, the return is amended with additional information. These fields are not required, nor valid, in creation and update calls.
var user = { "name" : "webservice_username", // Username "mail" : "webservice@dlcdev.com", "status" : 1, // 1 = Enabled, 0 = Blocked "roles" : [ {"id":123123123} // The internal role id. {"id":789789789} ] };
User profile
The user profile contains all additional data related to an account, including a user's address, first and last name, as well as all custom fields. Required fields vary depending on the profile type selection.
var profile2 = { "user" : 1, "label" : "Profile", "type" : "profile", "field_first_name" : "Tom", // A text field "field_middle_name" : "Stewart", "field_last_name" : "Baker", "field_profile_location" : { // An address field "street" : "1520 Locust Street", "additional" : "Suite 1000", "city" : "Phila", "province" : "PA", "postal_code" : "19102", "country" : "us", }, // The field types below are not used in the main profile, but may be used in additional profile types // They are listed here for reference "field_text_area" : { // A text area field "value" : "this is the summary<b>This is bold</b>", // Basic HTML structure is supported "format" : "filtered_html" // Text format is a required field. All users have access to Filtered HTML }, "field_boolean" : 1, // A single on/off checkbox or radio button selection "field_checkbox_select" : { // A multi-select box or group of checkboxes // The first key in this array is the language selection, which defaults to 'undefined' "und" : { // Using the keys found in the field Allowed Values configuration "option_one", "option_two", }, }, };
Authentication Name
The authentication name is used to track the user's unique key provided by an external SSO service. The module value may vary by installation. In this example, the user is assigned a key for compatibility with SimpleSAML.
var authmap = { "uid" : 1, "authname" : "external_user_id", "module" : "simplesamlphp_auth", };
Additional Data Structures