| All Verbs | /DefineAreas/{Areas} |
|---|
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 AreaContent:
id: int = 0
lc_address: Optional[str] = None
pixel_start: int = 0
pixel_stop: int = 0
area_i_d: int = 0
pos: int = 0
reverse: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Area:
area_i_d: int = 0
label: Optional[str] = None
stockroom_i_d: Optional[int] = None
content: List[AreaContent] = field(default_factory=list)
number_of_pixels: int = 0
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class DefineAreas:
# @ApiMember(Description="Areas", IsRequired=true)
areas: List[Area] = field(default_factory=list)
"""
Areas
"""
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /DefineAreas/{Areas} HTTP/1.1
Host: clouddemo.pickeos.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"Areas":[{"AreaID":0,"Label":"String","StockroomID":0,"Content":[{"ID":0,"LCAddress":"String","PixelStart":0,"PixelStop":0,"AreaID":0,"Pos":0,"Reverse":false}],"NumberOfPixels":1}]}