Cochrane+ App API

<back to all web services

AutoLogin

The following routes are available for this service:
POST/user/autologin

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 AutoLogin extends ApiServiceRequest
{
    public utcOffset: number;
    public systemUserId: number;
    public refreshToken: string;

    public constructor(init?: Partial<AutoLogin>) { super(init); (Object as any).assign(this, init); }
}

TypeScript AutoLogin DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /user/autologin HTTP/1.1 
Host: cochraneplus-api-dev.happen.zone 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"utcOffset":0,"systemUserId":0,"refreshToken":"String","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":{}}