| GET | /api/dashboards |
|---|
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 TileDto:
id: Optional[str] = None
group_i_d: Optional[str] = None
type: int = 0
name: Optional[str] = None
order: int = 0
cols: int = 0
rows: int = 0
style: int = 0
data: Optional[str] = None
font_awesome_icon: Optional[str] = None
font_awesome_style: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class TileGroupDto:
id: Optional[str] = None
dashboard_i_d: Optional[str] = None
name: Optional[str] = None
cols: int = 0
rows: int = 0
order: int = 0
tiles: Optional[List[TileDto]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DashboardDto:
id: Optional[str] = None
user_i_d: int = 0
tile_groups: Optional[List[TileGroupDto]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetDashboard:
pass
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /api/dashboards HTTP/1.1 Host: doapigw.baasbv.nl Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<DashboardDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/IDB.API.DTO.Dashboard">
<ID>00000000-0000-0000-0000-000000000000</ID>
<TileGroups>
<TileGroupDto>
<Cols>0</Cols>
<DashboardID>00000000-0000-0000-0000-000000000000</DashboardID>
<ID>00000000-0000-0000-0000-000000000000</ID>
<Name>String</Name>
<Order>0</Order>
<Rows>0</Rows>
<Tiles>
<TileDto>
<Cols>0</Cols>
<Data>String</Data>
<FontAwesomeIcon>String</FontAwesomeIcon>
<FontAwesomeStyle>String</FontAwesomeStyle>
<GroupID>00000000-0000-0000-0000-000000000000</GroupID>
<ID>00000000-0000-0000-0000-000000000000</ID>
<Name>String</Name>
<Order>0</Order>
<Rows>0</Rows>
<Style>0</Style>
<Type>0</Type>
</TileDto>
</Tiles>
</TileGroupDto>
</TileGroups>
<UserID>0</UserID>
</DashboardDto>