PATCH | /api/groups/{ID}/update |
---|
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 UpdateGroup:
id: Optional[str] = None
group: Optional[TileGroupDto] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
PATCH /api/groups/{ID}/update HTTP/1.1
Host: doapigw.baasbv.nl
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"ID":"00000000-0000-0000-0000-000000000000","Group":{"ID":"00000000-0000-0000-0000-000000000000","DashboardID":"00000000-0000-0000-0000-000000000000","Name":"String","Cols":0,"Rows":0,"Order":0,"Tiles":[{"ID":"00000000-0000-0000-0000-000000000000","GroupID":"00000000-0000-0000-0000-000000000000","Type":0,"Name":"String","Order":0,"Cols":0,"Rows":0,"Style":0,"Data":"String","FontAwesomeIcon":"String","FontAwesomeStyle":"String"}]}}
HTTP/1.1 200 OK Content-Type: text/jsonl Content-Length: length {"ID":"00000000-0000-0000-0000-000000000000","DashboardID":"00000000-0000-0000-0000-000000000000","Name":"String","Cols":0,"Rows":0,"Order":0,"Tiles":[{"ID":"00000000-0000-0000-0000-000000000000","GroupID":"00000000-0000-0000-0000-000000000000","Type":0,"Name":"String","Order":0,"Cols":0,"Rows":0,"Style":0,"Data":"String","FontAwesomeIcon":"String","FontAwesomeStyle":"String"}]}