FrameAppWS

<back to all web services

GetAlertsByUserRQ

Requires Authentication
The following routes are available for this service:
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

Python GetAlertsByUserRQ DTOs

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

HTTP + XML

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: application/xml
Content-Type: application/xml
Content-Length: length

<GetAlertsByUserRQ xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nwa.Model.Tipos.nwa.alerts">
  <Status>0</Status>
  <User>String</User>
</GetAlertsByUserRQ>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<GetAlertsByUserRS xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Nwa.Model.Tipos.nwa.alerts">
  <Code xmlns="http://schemas.datacontract.org/2004/07/Nwa.Model.Tipos.nwa.core">String</Code>
  <ErrorMessage xmlns="http://schemas.datacontract.org/2004/07/Nwa.Model.Tipos.nwa.core">String</ErrorMessage>
  <ErrorStackTrace xmlns="http://schemas.datacontract.org/2004/07/Nwa.Model.Tipos.nwa.core">String</ErrorStackTrace>
  <Data xmlns:d2p1="http://schemas.datacontract.org/2004/07/Nwa.Model.Contexto.nwa.alerts">
    <d2p1:SystemAlert>
      <d2p1:AlertOrigin>0</d2p1:AlertOrigin>
      <d2p1:AlertOriginDesc>String</d2p1:AlertOriginDesc>
      <d2p1:Fullinfo>String</d2p1:Fullinfo>
      <d2p1:GenerationType>0</d2p1:GenerationType>
      <d2p1:GenerationTypeDesc>String</d2p1:GenerationTypeDesc>
      <d2p1:Latitude>0</d2p1:Latitude>
      <d2p1:Longitude>0</d2p1:Longitude>
      <d2p1:Message>String</d2p1:Message>
      <d2p1:ModifiedDate>0001-01-01T00:00:00</d2p1:ModifiedDate>
      <d2p1:ModifiedDateDesc>String</d2p1:ModifiedDateDesc>
      <d2p1:ModifiedUser>String</d2p1:ModifiedUser>
      <d2p1:Notes>String</d2p1:Notes>
      <d2p1:Status>0</d2p1:Status>
      <d2p1:StatusDesc>String</d2p1:StatusDesc>
    </d2p1:SystemAlert>
  </Data>
</GetAlertsByUserRS>