Trendsic Platform Service

<back to all web services

WebixKanbanTaskCreateRequest

The following routes are available for this service:
POST/v1/webix/kanban/tasks
POST/v1/webix/kanban/tasks/{ProjectUID}
import Foundation
import ServiceStack

public class WebixKanbanTaskCreateRequest : WebixKanbanTask
{
    public var projectUID:String

    required public init(){ super.init() }

    private enum CodingKeys : String, CodingKey {
        case projectUID
    }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
        let container = try decoder.container(keyedBy: CodingKeys.self)
        projectUID = try container.decodeIfPresent(String.self, forKey: .projectUID)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
        var container = encoder.container(keyedBy: CodingKeys.self)
        if projectUID != nil { try container.encode(projectUID, forKey: .projectUID) }
    }
}

public class WebixKanbanTask : Codable
{
    public var id:String
    public var status:String
    public var user_id:Int
    public var text:String
    public var color:String
    public var tags:[String] = []
    public var comments:[WebixKanbanComment] = []
    public var attachments:[KanbanTaskAttachment] = []
    public var list:Int

    required public init(){}
}

public class WebixKanbanComment : Codable
{
    public var id:String
    public var user_id:Int?
    public var date:String
    public var text:String

    required public init(){}
}

public class KanbanTaskAttachment : Codable
{
    public var id:String
    public var link:String
    public var size:Int

    required public init(){}
}

public class WebixKanbanTaskResponse : WebixKanbanTask
{
    required public init(){ super.init() }

    required public init(from decoder: Decoder) throws {
        try super.init(from: decoder)
    }

    public override func encode(to encoder: Encoder) throws {
        try super.encode(to: encoder)
    }
}


Swift WebixKanbanTaskCreateRequest DTOs

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

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

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

POST /v1/webix/kanban/tasks HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"ProjectUID":"00000000000000000000000000000000","id":"00000000000000000000000000000000","status":"String","user_id":0,"text":"String","color":"String","tags":["String"],"comments":[{"id":"String","user_id":0,"date":"String","text":"String"}],"attachments":[{"id":"00000000000000000000000000000000","link":"String","size":0}],"list":0}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"id":"00000000000000000000000000000000","status":"String","user_id":0,"text":"String","color":"String","tags":["String"],"comments":[{"id":"String","user_id":0,"date":"String","text":"String"}],"attachments":[{"id":"00000000000000000000000000000000","link":"String","size":0}],"list":0}