Pecuario.Backend

<back to all web services

GetDashboard

The following routes are available for this service:
GET/api/v1/dashboard
namespace Pecuario.Backend.Application.DTOs

open System
open System.Collections
open System.Collections.Generic
open System.Runtime.Serialization
open ServiceStack
open ServiceStack.DataAnnotations

    [<AllowNullLiteral>]
    type Status() = 
        member val Message:String = null with get,set
        member val StatusCode:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type BaseResponse() = 
        member val Status:Status = null with get,set

    [<AllowNullLiteral>]
    type AnimalCategory() = 
        member val Id:Int32 = new Int32() with get,set
        [<Required>]
        [<StringLength(50)>]
        member val Name:String = null with get,set

        member val Alias:String = null with get,set
        member val Order:Int32 = new Int32() with get,set
        member val Enabled:Boolean = new Boolean() with get,set

    [<AllowNullLiteral>]
    type DashboardLand() = 
        member val Id:String = null with get,set
        member val Description:String = null with get,set
        member val Image:String = null with get,set
        member val Type:String = null with get,set
        member val Price:String = null with get,set
        member val CityRegionName:String = null with get,set
        member val PriceType:String = null with get,set

    [<AllowNullLiteral>]
    type GetDashboardResponse() = 
        inherit BaseResponse()
        member val AnimalCategories:ResizeArray<AnimalCategory> = new ResizeArray<AnimalCategory>() with get,set
        member val AnimalsByCategory:Dictionary<Int32, List<DashboardAnimal>> = new Dictionary<Int32, List<DashboardAnimal>>() with get,set
        member val Lands:ResizeArray<DashboardLand> = new ResizeArray<DashboardLand>() with get,set
        member val Greeting:String = null with get,set
        member val FarmsCount:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type GetDashboard() = 
        interface IGet
        member val CountryId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val MaxAnimals:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val MaxLands:Nullable<Int32> = new Nullable<Int32>() with get,set

F# GetDashboard 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.

GET /api/v1/dashboard HTTP/1.1 
Host: pecuario-backend.develsystems.com 
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"animalCategories":[{"id":0,"name":"String","alias":"String","order":0,"enabled":false}],"animalsByCategory":{"0":[{"id":"String","description":"String","image":"String","type":"String","price":"String","cityRegionName":"String","priceType":"String"}]},"lands":[{"id":"String","description":"String","image":"String","type":"String","price":"String","cityRegionName":"String","priceType":"String"}],"greeting":"String","farmsCount":0}