tvpl.api

<back to all web services

GetEquipmentByIdRequest

Requires Authentication
The following routes are available for this service:
GET/equipment/{Id}
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using tvpl.api.ServiceModel;
using tvpl.data.Models;

namespace tvpl.api.ServiceModel
{
    public partial class GetEquipmentByIdRequest
    {
        public virtual int Id { get; set; }
    }

}

namespace tvpl.data.Models
{
    public partial class Equipment
    {
        public virtual int Id { get; set; }
        [Required]
        [StringLength(500)]
        public virtual string Name { get; set; }

        [StringLength(1000)]
        public virtual string ImageUrl { get; set; }

        public virtual string Description { get; set; }
        [StringLength(50)]
        public virtual string Unit { get; set; }

        public virtual int? MaterialTypeId { get; set; }
        public virtual int Status { get; set; }
        public virtual bool? IsDeleted { get; set; }
        public virtual DateTime? ApprovedAt { get; set; }
        public virtual int? ApprovedBy { get; set; }
        public virtual DateTime? CreatedAt { get; set; }
        public virtual int? CreatedBy { get; set; }
        public virtual DateTime? UpdatedAt { get; set; }
        public virtual int? UpdatedBy { get; set; }
        [Ignore]
        public virtual string MaterialTypeName { get; set; }

        [Ignore]
        public virtual string CreatedByName { get; set; }

        [Ignore]
        public virtual string ApprovedByName { get; set; }
    }

}

C# GetEquipmentByIdRequest DTOs

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

HTTP + XML

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: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<Equipment xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/tvpl.data.Models">
  <ApprovedAt>0001-01-01T00:00:00</ApprovedAt>
  <ApprovedBy>0</ApprovedBy>
  <ApprovedByName>String</ApprovedByName>
  <CreatedAt>0001-01-01T00:00:00</CreatedAt>
  <CreatedBy>0</CreatedBy>
  <CreatedByName>String</CreatedByName>
  <DeletedAt>0001-01-01T00:00:00</DeletedAt>
  <DeletedBy>0</DeletedBy>
  <Description>String</Description>
  <Id>0</Id>
  <ImageUrl>String</ImageUrl>
  <IsDeleted>false</IsDeleted>
  <MaterialTypeId>0</MaterialTypeId>
  <MaterialTypeName>String</MaterialTypeName>
  <Name>String</Name>
  <Status>0</Status>
  <Unit>String</Unit>
  <UpdatedAt>0001-01-01T00:00:00</UpdatedAt>
  <UpdatedBy>0</UpdatedBy>
</Equipment>