| GET,POST,PUT,DELETE,OPTIONS | /v1/Project/{ProjectID} | ||
|---|---|---|---|
| GET,POST,PUT,DELETE,OPTIONS | /v1/Project | ||
| GET,OPTIONS | /v1/Project/GetSingle/{ProjectUID} |
Imports System
Imports System.IO
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports CRM.AgencyPlatform.API.Internal
Namespace Global
Namespace CRM.AgencyPlatform.API.Internal
Public Partial Class Project
Public Overridable Property ProjectID As Integer
Public Overridable Property ProjectUID As Guid
Public Overridable Property ProjectName As String
Public Overridable Property ImageURL As String
Public Overridable Property ImageKey As String
Public Overridable Property ClientName As String
Public Overridable Property ClientPhone As String
Public Overridable Property ClientEmail As String
Public Overridable Property ProjectManagerID As Integer
Public Overridable Property ProjectManagerName As String
Public Overridable Property StartDate As Date?
Public Overridable Property EndDate As Date?
Public Overridable Property ActualStartDate As Date?
Public Overridable Property ActualEndDate As Date?
Public Overridable Property JobCount As Integer
Public Overridable Property CrewMemberCount As Integer
Public Overridable Property EquipmentCount As Integer
Public Overridable Property MaterialCount As Integer
Public Overridable Property ProjectStatusID As Short
Public Overridable Property ProjectStatusDescription As String
Public Overridable Property Budget As Decimal
Public Overridable Property CostToDate As Decimal
Public Overridable Property ProjectLocation As String
Public Overridable Property ProjectType As String
Public Overridable Property ProjectSponsor As String
Public Overridable Property CreatedBy As String
Public Overridable Property CreatedAt As Date?
Public Overridable Property UpdatedAt As Date?
Public Overridable Property ProjectDescription As String
Public Overridable Property Scope As String
Public Overridable Property StatusId As Integer
End Class
Public Partial Class ProjectRequest
Public Overridable Property ProjectUID As Guid
Public Overridable Property ProjectID As Integer
Public Overridable Property Project As List(Of Project) = New List(Of Project)
End Class
Public Partial Class ProjectResponse
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Project As List(Of Project) = New List(Of Project)
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .csv suffix or ?format=csv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /v1/Project/{ProjectID} HTTP/1.1
Host: api.dev.dynamics.trendsic.com
Accept: text/csv
Content-Type: text/csv
Content-Length: length
{"ProjectUID":"00000000000000000000000000000000","ProjectID":0,"Project":[{"ProjectID":0,"ProjectUID":"00000000000000000000000000000000","ProjectName":"String","ImageURL":"String","ImageKey":"String","ClientName":"String","ClientPhone":"String","ClientEmail":"String","ProjectManagerID":0,"ProjectManagerName":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","ActualStartDate":"0001-01-01T00:00:00.0000000","ActualEndDate":"0001-01-01T00:00:00.0000000","JobCount":0,"CrewMemberCount":0,"EquipmentCount":0,"MaterialCount":0,"ProjectStatusID":0,"ProjectStatusDescription":"String","Budget":0,"CostToDate":0,"ProjectLocation":"String","ProjectType":"String","ProjectSponsor":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","ProjectDescription":"String","Scope":"String","StatusId":0}]}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Project":[{"ProjectID":0,"ProjectUID":"00000000000000000000000000000000","ProjectName":"String","ImageURL":"String","ImageKey":"String","ClientName":"String","ClientPhone":"String","ClientEmail":"String","ProjectManagerID":0,"ProjectManagerName":"String","StartDate":"0001-01-01T00:00:00.0000000","EndDate":"0001-01-01T00:00:00.0000000","ActualStartDate":"0001-01-01T00:00:00.0000000","ActualEndDate":"0001-01-01T00:00:00.0000000","JobCount":0,"CrewMemberCount":0,"EquipmentCount":0,"MaterialCount":0,"ProjectStatusID":0,"ProjectStatusDescription":"String","Budget":0,"CostToDate":0,"ProjectLocation":"String","ProjectType":"String","ProjectSponsor":"String","CreatedBy":"String","CreatedAt":"0001-01-01T00:00:00.0000000","UpdatedAt":"0001-01-01T00:00:00.0000000","ProjectDescription":"String","Scope":"String","StatusId":0}]}