Go-to-Light Service 4.0.0.2397 - 121 - API License to Cloud Demo

<back to all web services

SaveArea

Requires Authentication
The following routes are available for this service:
All Verbs/SaveArea/{Area}
import Foundation
import ServiceStack

public class SaveArea : Codable
{
    /**
    * Area
    */
    // @ApiMember(Description="Area", IsRequired=true)
    public var area:Area

    required public init(){}
}

public class Area : Codable
{
    public var areaID:Int
    public var label:String
    public var stockroomID:Int?
    public var content:[AreaContent] = []
    public var numberOfPixels:Int

    required public init(){}
}

public class AreaContent : Codable
{
    public var id:Int
    public var lcAddress:String
    public var pixelStart:Int
    public var pixelStop:Int
    public var areaID:Int
    public var pos:Int
    public var reverse:Bool

    required public init(){}
}


Swift SaveArea DTOs

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

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /SaveArea/{Area} HTTP/1.1 
Host: clouddemo.pickeos.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{"Area":{"AreaID":0,"Label":"String","StockroomID":0,"Content":[{"ID":0,"LCAddress":"String","PixelStart":0,"PixelStop":0,"AreaID":0,"Pos":0,"Reverse":false}],"NumberOfPixels":1}}