In a previous post, we introduced the Rest API with an overview of Email management and deployment. In today's post, we'll introduce the User record.

 

URL : GET /system/user/{id}?depth={depth}

 

public class User
    {
        public List<string> betaAccess { get; set; }
        public List<string> capabilities { get; set; }
        public int? defaultContactViewId { get; set; }
        public string emailAddress { get; set; }
        public int? id { get; set; }
        public string loginName { get; set; }
        public string name { get; set; }
        public List<ProductPermission> productPermissions { get; set; }
        public List<TypePermissions> typePermissions { get; set; }
}
  

 

The user record contains information such as the beta access flags that are enabled as well as the areas of the application the user can access.

The sample project contains methods for retrieving a user and searching for lists of users. Note that a user create operation is not yet supported in the API.

 

A new open source project containing samples and helper methods for working with the user object is available here on Github.

Let's look at a sample json representation of the user object :

 

"type": "User",
      "id": "9",
      "createdAt": "1260902519",
      "createdBy": "8",
      "depth": "complete",
      "description": "John Smith",
      "name": "John Smith",
      "updatedAt": "1350572309",
      "updatedBy": "9",
      "betaAccess": [    
        "archiving_campaigns",
        "chatter_inside",
],
      "capabilities": [
        "mailer.updateContacts"
      ],
      "company": "OrionTest",
      "defaultAccountViewId": "100124",
      "defaultContactViewId": "100084",
      "emailAddress": "john.smith@eloqua.com",
      "loggedInAt": "1350686543",
      "loginName": "John.Smith",
      "preferences": {
        "type": "UserPreferences",
        "isMasterViewDocked": "false",
        "timezoneId": "64"
      },
      "productPermissions": [
        {
          "type": "ProductPermission",
          "productCode": "SecureHypersites"
        },
        {
          "type": "ProductPermission",
          "productCode": "EngageiPad"
        },
        {
          "type": "ProductPermission",
          "productCode": "EngageWeb"
        }
      ],
      "typePermissions": [
        {
          "type": "TypePermission",
          "objectType": "Campaign",
          "permissions": {
            "type": "TypePermissions",
            "create": "true",
            "read": "true"
          }
        },
        {
          "type": "TypePermission",
          "objectType": "Email",
          "permissions": {
            "type": "TypePermissions",
            "create": "true",
            "read": "true"
          }
     }
}
   

 

We hope that you find this helpful.

 

Thanks,

Fred