| Requires the role: | dealer-api-mds |
| All Verbs | /diagram/{Guid} |
|---|
Imports System
Imports System.Collections
Imports System.Collections.Generic
Imports System.Runtime.Serialization
Imports ServiceStack
Imports ServiceStack.DataAnnotations
Imports Mds.Api.ServiceModel
Imports Tiptopweb.MojoPortal.Shared.Poco
Namespace Global
Namespace Mds.Api.ServiceModel
Public Partial Class Diagram
Public Overridable Property Guid As Guid
End Class
Public Partial Class DiagramImageDetail
Public Overridable Property Url As String
Public Overridable Property Width As Integer
Public Overridable Property Height As Integer
End Class
Public Partial Class DiagramPartDetail
Public Sub New()
Coordinates = New List(Of Coordinate)
End Sub
Public Overridable Property Number As Integer
Public Overridable Property PartName As String
Public Overridable Property PartId As String
Public Overridable Property ImageUrl As String
Public Overridable Property Coordinates As List(Of Coordinate)
End Class
Public Partial Class DiagramResponse
Public Sub New()
Parts = New List(Of DiagramPartDetail)
End Sub
Public Overridable Property ResponseStatus As ResponseStatus
Public Overridable Property Name As String
Public Overridable Property Guid As Guid
Public Overridable Property DateLastUpdate As Nullable(Of Date)
Public Overridable Property Image As DiagramImageDetail
Public Overridable Property Parts As List(Of DiagramPartDetail)
End Class
End Namespace
Namespace Tiptopweb.MojoPortal.Shared.Poco
Public Partial Class Coordinate
Public Overridable Property x1 As Integer
Public Overridable Property y1 As Integer
Public Overridable Property x2 As Integer
Public Overridable Property y2 As Integer
End Class
End Namespace
End Namespace
To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /diagram/{Guid} HTTP/1.1
Host: mds-api.mojomotorcycles.com.au
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length
{"Guid":"00000000000000000000000000000000"}
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length
{"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}},"Name":"String","Guid":"00000000000000000000000000000000","DateLastUpdate":"\/Date(-62135596800000-0000)\/","Image":{"Url":"String","Width":0,"Height":0},"Parts":[{"Number":0,"PartName":"String","PartId":"String","ImageUrl":"String","Coordinates":[{"x1":0,"y1":0,"x2":0,"y2":0}]}]}