All Verbs | /alerts/getbyuser |
---|
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 CoreRS:
code: Optional[str] = None
error_message: Optional[str] = None
error_stack_trace: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class SystemAlert:
generation_type: Optional[int] = None
generation_type_desc: Optional[str] = None
alert_origin: Optional[int] = None
alert_origin_desc: Optional[str] = None
message: Optional[str] = None
longitude: Optional[float] = None
latitude: Optional[float] = None
modified_user: Optional[str] = None
modified_date: Optional[datetime.datetime] = None
modified_date_desc: Optional[str] = None
notes: Optional[str] = None
fullinfo: Optional[str] = None
status: Optional[int] = None
status_desc: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetAlertsByUserRS(CoreRS):
data: Optional[List[SystemAlert]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetAlertsByUserRQ:
user: Optional[str] = None
status: Optional[int] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /alerts/getbyuser HTTP/1.1
Host: ws.jimsnwa.com
Accept: text/jsv
Content-Type: text/jsv
Content-Length: length
{
User: String,
Status: 0
}
HTTP/1.1 200 OK Content-Type: text/jsv Content-Length: length { Data: [ { GenerationType: 0, GenerationTypeDesc: String, AlertOrigin: 0, AlertOriginDesc: String, Message: String, Longitude: 0, Latitude: 0, ModifiedUser: String, ModifiedDate: 0001-01-01, ModifiedDateDesc: String, Notes: String, Fullinfo: String, Status: 0, StatusDesc: String } ], Code: String, ErrorMessage: String, ErrorStackTrace: String }