| POST | /user/login |
|---|
export class ApiServiceRequest implements IServiceRequest, IHasApiKey, IHasDeviceInfo
{
/** @description The API Key required for authentication */
// @ApiMember(DataType="string", Description="The API Key required for authentication", IsRequired=true)
public apiKey: string;
/** @description Latitude of the user making this request */
// @ApiMember(DataType="double", Description="Latitude of the user making this request")
public latitude: number;
/** @description Longitude of the user making this request */
// @ApiMember(DataType="double", Description="Longitude of the user making this request")
public longitude: number;
public constructor(init?: Partial<ApiServiceRequest>) { (Object as any).assign(this, init); }
}
export class ApiServiceResponse implements IServiceResponse
{
public description: string;
public heading: string;
public wasSuccessful: boolean;
public modelState: Object;
public constructor(init?: Partial<ApiServiceResponse>) { (Object as any).assign(this, init); }
}
export class SystemUserPermission
{
public meeting: boolean;
public journey: boolean;
public attendance: boolean;
public notificationCenter: boolean;
public internalRating: boolean;
public debrief: boolean;
public thunderBoltActions: boolean;
public onTheMove: boolean;
public constructor(init?: Partial<SystemUserPermission>) { (Object as any).assign(this, init); }
}
export class AppSettings
{
public allowAbstainRatings: boolean;
public showMoodIndicatorOnApp: boolean;
public takePhotoForAnalysis: boolean;
public constructor(init?: Partial<AppSettings>) { (Object as any).assign(this, init); }
}
export class UserLoginResponse extends ApiServiceResponse
{
public allowAttendanceOnLaptop: boolean;
public profileImageUrl: string;
public friendlyName: string;
public systemUserId: number;
public username: string;
public permissions: SystemUserPermission;
public settings: AppSettings;
public startLatitude: number;
public startLongitude: number;
public hasStartLocation: boolean;
public endLatitude: number;
public endLongitude: number;
public hasEndLocation: boolean;
public isSalesPerson: boolean;
public feelingStatusMappings: string[];
public hasAiPermissions: boolean;
public refreshToken: string;
public isManagerOrPromotedTo: boolean;
public isTemplateApprover: boolean;
public outstandingApprovals: number;
public constructor(init?: Partial<UserLoginResponse>) { super(init); (Object as any).assign(this, init); }
}
export class UserLogin extends ApiServiceRequest
{
public username: string;
public password: string;
public utcOffset: number;
public constructor(init?: Partial<UserLogin>) { super(init); (Object as any).assign(this, init); }
}
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /user/login HTTP/1.1
Host: cochraneplus-api-dev.happen.zone
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"username":"String","password":"String","utcOffset":0,"apiKey":"String","latitude":0,"longitude":0}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"allowAttendanceOnLaptop":false,"profileImageUrl":"String","friendlyName":"String","systemUserId":0,"username":"String","permissions":{"meeting":false,"journey":false,"attendance":false,"notificationCenter":false,"internalRating":false,"debrief":false,"thunderBoltActions":false,"onTheMove":false},"settings":{"allowAbstainRatings":false,"showMoodIndicatorOnApp":false,"takePhotoForAnalysis":false},"startLatitude":0,"startLongitude":0,"hasStartLocation":false,"endLatitude":0,"endLongitude":0,"hasEndLocation":false,"isSalesPerson":false,"feelingStatusMappings":["String"],"hasAiPermissions":false,"refreshToken":"String","isManagerOrPromotedTo":false,"isTemplateApprover":false,"outstandingApprovals":0,"description":"String","heading":"String","wasSuccessful":false,"modelState":{}}