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
Name | Description | Type |
AllApplications | Description of Dashboard | object |
AllGroups | Unique id of stored dashboard, used to retrieve dashboard for display. | object |
AllRoles | 1 if this dashboard is in logged in users’ favorite list. | object |
Application Constraints | Name of the dashboard. | object |
AuthType | Search list index value. | integer |
ComboName | Read Only do not set. | string |
CreateDate | Creation Date | date |
Description | Description of contact. | string |
EmailAddress | User’s email address used for scheduled reports. | string |
ErrorCode | Error code. | integer |
ErrorMessage | Error message | string |
FirstName | First Name | string |
Fullname | Read Only do not set. | string |
LoginDate | Read Only | date |
LoginName | User’s login | string |
ModifyDate | Last modify date of contact record | date |
Pin | User’s password if not using windows authentication. Set only, server will never return this when retrieving contact record for edit. | string |
Preferences | User preferences. | object |
SecurityGroups | List of security groups the user belongs to. | object |
UserApplications | List of Yurbi apps user has access to. | object |
UserState | integer | |
isAdmin | UI Flag only does not give user admin permission. | boolean |
isAgent | UI Flag only does not give user Agent access. | boolean |
isArchitect | UI Flag only does not give user Architect access. | boolean |
isBuilder | UI Flag only does not give user Builder access. | boolean |
isFirstRun | UI Flag only. | boolean |
isSuperAdmin | UI Flag only does not give user Super Admin Access | boolean |
Sample Call
$.ajax({
url: "/api/Contact/NewContact",
dataType: "json",
data : {
sessionToken : “HJQXIYYL[AZVTTRPILOHXHLWW”},
type : "POST",
success : function(r) {
console.log(r);
}
});