POST api/well-fields/{wieldId}/maps

Upload well field map file POST api/well-fields/{wieldId:int}/maps

Request Information

URI Parameters

NameDescriptionTypeAdditional information
wieldId

Well field id

integer

Required

Body Parameters

Map DTO of well field

MapOfWieldDto
NameDescriptionTypeAdditional information
Id

Map id

integer

None.

Name

Map name: by default - file name (map creates from file - FileSpec)

string

None.

Description

Map description

string

None.

ScaleCoefficient

Map scale coefficient

decimal number

None.

WellFieldId

Well field (parent) id

integer

None.

IdOfFileSpec

Id of map image from FileSpec table

globally unique identifier

None.

FileSpecDto

File spec for this map

FileSpecDto

None.

ListOfDtoOfWellMarker

Wells in this map

Collection of WellMarkerOfMapOfWieldDto

None.

WellFieldMapAreasDto

Map areas

Collection of WellFieldMapAreaDto

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": 1,
  "Name": "sample string 2",
  "Description": "sample string 3",
  "ScaleCoefficient": 4.1,
  "WellFieldId": 1,
  "IdOfFileSpec": "e0a74960-7f53-4627-8f80-5830588ed976",
  "FileSpecDto": {
    "Id": "d6844a28-3ded-4025-9719-fafbbed0cef7",
    "Name": "sample string 2",
    "Extension": "sample string 3",
    "ContentType": "sample string 4",
    "Length": 5,
    "ContainerName": "72fb1721-6a37-4923-bf5c-ece62bd6cb6b",
    "CreatedUnixTime": 7,
    "FileUrl": "sample string 8",
    "ImgWidth": 1,
    "ImgHeight": 1
  },
  "ListOfDtoOfWellMarker": [
    {
      "CoordX": 1.0,
      "CoordY": 2.0,
      "IdOfMapOfWield": 3,
      "IdOfWell": 4,
      "IsDrilled": true
    },
    {
      "CoordX": 1.0,
      "CoordY": 2.0,
      "IdOfMapOfWield": 3,
      "IdOfWell": 4,
      "IsDrilled": true
    }
  ],
  "WellFieldMapAreasDto": [
    {
      "Id": 1,
      "Name": "sample string 2",
      "Description": "sample string 3",
      "Opacity": 4.1,
      "StrokeWidth": 5.1,
      "FillColor": "sample string 6",
      "Coords": "sample string 7",
      "WellFieldMapId": 8
    },
    {
      "Id": 1,
      "Name": "sample string 2",
      "Description": "sample string 3",
      "Opacity": 4.1,
      "StrokeWidth": 5.1,
      "FillColor": "sample string 6",
      "Coords": "sample string 7",
      "WellFieldMapId": 8
    }
  ]
}

application/xml, text/xml

Sample:
<MapOfWieldDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Reyvart.WellFileManager.Web.Models">
  <Description>sample string 3</Description>
  <FileSpecDto>
    <ContainerName>72fb1721-6a37-4923-bf5c-ece62bd6cb6b</ContainerName>
    <ContentType>sample string 4</ContentType>
    <CreatedUnixTime>7</CreatedUnixTime>
    <Extension>sample string 3</Extension>
    <FileUrl>sample string 8</FileUrl>
    <Id>d6844a28-3ded-4025-9719-fafbbed0cef7</Id>
    <ImgHeight>1</ImgHeight>
    <ImgWidth>1</ImgWidth>
    <Length>5</Length>
    <Name>sample string 2</Name>
  </FileSpecDto>
  <Id>1</Id>
  <IdOfFileSpec>e0a74960-7f53-4627-8f80-5830588ed976</IdOfFileSpec>
  <ListOfDtoOfWellMarker>
    <WellMarkerOfMapOfWieldDto>
      <CoordX>1</CoordX>
      <CoordY>2</CoordY>
      <IdOfMapOfWield>3</IdOfMapOfWield>
      <IdOfWell>4</IdOfWell>
      <IsDrilled>true</IsDrilled>
    </WellMarkerOfMapOfWieldDto>
    <WellMarkerOfMapOfWieldDto>
      <CoordX>1</CoordX>
      <CoordY>2</CoordY>
      <IdOfMapOfWield>3</IdOfMapOfWield>
      <IdOfWell>4</IdOfWell>
      <IsDrilled>true</IsDrilled>
    </WellMarkerOfMapOfWieldDto>
  </ListOfDtoOfWellMarker>
  <Name>sample string 2</Name>
  <ScaleCoefficient>4.1</ScaleCoefficient>
  <WellFieldId>1</WellFieldId>
  <WellFieldMapAreasDto>
    <WellFieldMapAreaDto>
      <Coords>sample string 7</Coords>
      <Description>sample string 3</Description>
      <FillColor>sample string 6</FillColor>
      <Id>1</Id>
      <Name>sample string 2</Name>
      <Opacity>4.1</Opacity>
      <StrokeWidth>5.1</StrokeWidth>
      <WellFieldMapId>8</WellFieldMapId>
    </WellFieldMapAreaDto>
    <WellFieldMapAreaDto>
      <Coords>sample string 7</Coords>
      <Description>sample string 3</Description>
      <FillColor>sample string 6</FillColor>
      <Id>1</Id>
      <Name>sample string 2</Name>
      <Opacity>4.1</Opacity>
      <StrokeWidth>5.1</StrokeWidth>
      <WellFieldMapId>8</WellFieldMapId>
    </WellFieldMapAreaDto>
  </WellFieldMapAreasDto>
</MapOfWieldDto>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'JQueryMvcFormUrlEncodedFormatter' to write type 'MapOfWieldDto'.

Response Information

Resource Description

Created well field map

IHttpActionResult

None.

Response Formats

application/json, text/json, application/xml, text/xml

Sample:

Sample not available.