NewContact

POST NewContact

URL: /api/Contact/NewContact

Description 

Retrieve a blank Yurbi Contact object. This call does not create a new contact and the only argument required is a sessionToken. This call returns a JSON structure to populate a new contact record which then must be saved (see /api/Contact/SaveContact).

Method 

POST

Data Params

{
sessionToken : [string]
}

Example

{
sessionToken : "HJQXIYYL[AZVTTRPILOHXHLWW"
}

Success Response 

Code: 200 

Response will empty if no matching dashboards found. If one or more matching dashboards are found then a JSON array will be returned in x number of matches of DashboardListItem.

{
  "AllApplications":[],
  "AllGroups":[],
  "AllRoles":[],
  "ApplicationConstraints":[],
  "AuthType":null,
  "ComboName":null,
  "CreateDate":"2016-06-06T21:17:40.8220078-04:00",
  "Description":null,
  "EmailAddress":null,
  "ErrorCode":0,
  "ErrorMessage":null,
  "FirstName":null,
  "FullName":null,
  "ID":null,
  "LastName":null,
  "LoginDate":"0001-01-01T00:00:00",
  "LoginName":null,
  "ModifyDate":"2016-06-06T21:17:40.8220078-04:00",
  "Pin":null,
  "Preferences":[],
  "SecurityGroups":[],
  "UserApplications":[],
  "UserState":0,
  "isAdmin":false,
  "isAgent":false,
  "isArchitect":false,
  "isBuilder":false,
  "isFirstRun":false,
  "isSuperAdmin":false
}

Definition of DashboardListItem

NameDescriptionType
AllApplicationsDescription of Dashboardobject
AllGroupsUnique id of stored dashboard, used to retrieve dashboard for display.object
AllRoles1 if this dashboard is in logged in users’ favorite list.object
Application ConstraintsName of the dashboard.object
AuthTypeSearch list index value.integer
ComboNameRead Only do not set.string
CreateDateCreation Datedate
DescriptionDescription of contact.string
EmailAddressUser’s email address used for scheduled reports.string
ErrorCodeError code.integer
ErrorMessageError messagestring
FirstNameFirst Namestring
FullnameRead Only do not set.string
LoginDateRead Onlydate
LoginNameUser’s loginstring
ModifyDateLast modify date of contact recorddate
PinUser’s password if not using windows authentication. Set only, server will never return this when retrieving contact record for edit.string
PreferencesUser preferences.object
SecurityGroupsList of security groups the user belongs to.object
UserApplicationsList of Yurbi apps user has access to.object
UserStateinteger
isAdminUI Flag only does not give user admin permission.boolean
isAgentUI Flag only does not give user Agent access.boolean
isArchitectUI Flag only does not give user Architect access.boolean
isBuilderUI Flag only does not give user Builder access.boolean
isFirstRunUI Flag only.boolean
isSuperAdminUI Flag only does not give user Super Admin Accessboolean

Sample Call

$.ajax({
  url: "/api/Contact/NewContact",
  dataType: "json",
    data : {
    sessionToken : “HJQXIYYL[AZVTTRPILOHXHLWW”},
  type : "POST",
  success : function(r) {
    console.log(r);
  }
});

Was this article helpful?

DoLogin
NewPolicy