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 .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.

POST /diagram/{Guid} HTTP/1.1 
Host: mds-api.mojomotorcycles.com.au 
Accept: application/xml
Content-Type: application/xml
Content-Length: length

<Diagram xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mds.Api.ServiceModel">
  <Guid>00000000-0000-0000-0000-000000000000</Guid>
</Diagram>
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length

<DiagramResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Mds.Api.ServiceModel">
  <DateLastUpdate>0001-01-01T00:00:00</DateLastUpdate>
  <Guid>00000000-0000-0000-0000-000000000000</Guid>
  <Image>
    <Height>0</Height>
    <Url>String</Url>
    <Width>0</Width>
  </Image>
  <Name>String</Name>
  <Parts>
    <DiagramPartDetail>
      <Coordinates xmlns:d4p1="http://schemas.datacontract.org/2004/07/Tiptopweb.MojoPortal.Shared.Poco">
        <d4p1:Coordinate>
          <d4p1:x1>0</d4p1:x1>
          <d4p1:x2>0</d4p1:x2>
          <d4p1:y1>0</d4p1:y1>
          <d4p1:y2>0</d4p1:y2>
        </d4p1:Coordinate>
      </Coordinates>
      <ImageUrl>String</ImageUrl>
      <Number>0</Number>
      <PartId>String</PartId>
      <PartName>String</PartName>
    </DiagramPartDetail>
  </Parts>
  <ResponseStatus xmlns:d2p1="http://schemas.servicestack.net/types">
    <d2p1:ErrorCode>String</d2p1:ErrorCode>
    <d2p1:Message>String</d2p1:Message>
    <d2p1:StackTrace>String</d2p1:StackTrace>
    <d2p1:Errors>
      <d2p1:ResponseError>
        <d2p1:ErrorCode>String</d2p1:ErrorCode>
        <d2p1:FieldName>String</d2p1:FieldName>
        <d2p1:Message>String</d2p1:Message>
        <d2p1:Meta xmlns:d5p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
          <d5p1:KeyValueOfstringstring>
            <d5p1:Key>String</d5p1:Key>
            <d5p1:Value>String</d5p1:Value>
          </d5p1:KeyValueOfstringstring>
        </d2p1:Meta>
      </d2p1:ResponseError>
    </d2p1:Errors>
    <d2p1:Meta xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>String</d3p1:Key>
        <d3p1:Value>String</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </d2p1:Meta>
  </ResponseStatus>
</DiagramResponse>