Mds.Api

<back to all web services

Diagram

Requires Authentication
Requires the role:dealer-api-mds
The following routes are available for this service:
All Verbs/diagram/{Guid}
namespace Mds.Api.ServiceModel

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

    [<AllowNullLiteral>]
    type DiagramImageDetail() = 
        member val Url:String = null with get,set
        member val Width:Int32 = new Int32() with get,set
        member val Height:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type Coordinate() = 
        member val x1:Int32 = new Int32() with get,set
        member val y1:Int32 = new Int32() with get,set
        member val x2:Int32 = new Int32() with get,set
        member val y2:Int32 = new Int32() with get,set

    [<AllowNullLiteral>]
    type DiagramPartDetail() = 
        member val Number:Int32 = new Int32() with get,set
        member val PartName:String = null with get,set
        member val PartId:String = null with get,set
        member val ImageUrl:String = null with get,set
        member val Coordinates:ResizeArray<Coordinate> = new ResizeArray<Coordinate>() with get,set

    [<AllowNullLiteral>]
    type DiagramResponse() = 
        member val ResponseStatus:ResponseStatus = null with get,set
        member val Name:String = null with get,set
        member val Guid:Guid = new Guid() with get,set
        member val DateLastUpdate:Nullable<DateTime> = new Nullable<DateTime>() with get,set
        member val Image:DiagramImageDetail = null with get,set
        member val Parts:ResizeArray<DiagramPartDetail> = new ResizeArray<DiagramPartDetail>() with get,set

    [<AllowNullLiteral>]
    type Diagram() = 
        member val Guid:Guid = new Guid() with get,set

F# Diagram DTOs

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

HTTP + JSV

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/jsv
Content-Type: text/jsv
Content-Length: length

{
	Guid: 00000000000000000000000000000000
}
HTTP/1.1 200 OK
Content-Type: text/jsv
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: 0001-01-01,
	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
				}
			]
		}
	]
}