| POST | /Authentication |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Authentication:
email: Optional[str] = None
password: Optional[str] = None
code: Optional[str] = None
subscription_object: Optional[Object] = None
device_id: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class AuthenticationResponse:
auth_token: Optional[str] = None
workspace: Optional[str] = None
user_id: Optional[str] = None
teams: Optional[List[str]] = None
mobile_task_range_past: int = 0
mobile_task_range_future: int = 0
retain_customer_database: Optional[str] = None
retain_asset_database: Optional[str] = None
user_type: Optional[str] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /Authentication HTTP/1.1
Host: dev.fieldsquared.com
Accept: application/json
Content-Type: application/json
Content-Length: length
{"Email":"String","Password":"String","Code":"String","SubscriptionObject":{},"DeviceId":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"AuthToken":"String","Workspace":"String","UserId":"String","Teams":["String"],"MobileTaskRangePast":0,"MobileTaskRangeFuture":0,"RetainCustomerDatabase":"String","RetainAssetDatabase":"String","UserType":"String"}