tvpl.api

<back to all web services

GetEquipmentByIdRequest

Requires Authentication
The following routes are available for this service:
GET/equipment/{Id}
namespace tvpl.api.ServiceModel

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

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

        [<StringLength(1000)>]
        member val ImageUrl:String = null with get,set

        member val Description:String = null with get,set
        [<StringLength(50)>]
        member val Unit:String = null with get,set

        member val MaterialTypeId:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val Status:Int32 = new Int32() with get,set
        member val IsDeleted:Nullable<Boolean> = new Nullable<Boolean>() with get,set
        member val ApprovedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val ApprovedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val CreatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val CreatedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        member val UpdatedAt:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val UpdatedBy:Nullable<Int32> = new Nullable<Int32>() with get,set
        [<Ignore>]
        member val MaterialTypeName:String = null with get,set

        [<Ignore>]
        member val CreatedByName:String = null with get,set

        [<Ignore>]
        member val ApprovedByName:String = null with get,set

    [<AllowNullLiteral>]
    type GetEquipmentByIdRequest() = 
        member val Id:Int32 = new Int32() with get,set

F# GetEquipmentByIdRequest DTOs

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

HTTP + CSV

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

GET /equipment/{Id} HTTP/1.1 
Host: etc-api.vsmlab.vn 
Accept: text/csv
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"id":0,"name":"String","imageUrl":"String","description":"String","unit":"String","materialTypeId":0,"status":0,"isDeleted":false,"approvedAt":"0001-01-01T00:00:00.0000000+07:06","approvedBy":0,"createdAt":"0001-01-01T00:00:00.0000000+07:06","createdBy":0,"updatedAt":"0001-01-01T00:00:00.0000000+07:06","updatedBy":0,"materialTypeName":"String","createdByName":"String","approvedByName":"String"}