PUT api/{stagePlural}/sections/{idOfSection}/file-specs/{idOfFileSpec}

Put file spec to section: can be changed only name of the file

Request Information

URI Parameters

NameDescriptionTypeAdditional information
stagePlural

Stage in plural mode: wells, well-regions...

string

Required

idOfSection

Id of section

globally unique identifier

Required

idOfFileSpec

Id of file spec

globally unique identifier

Required

Body Parameters

File spec to change

FileSpecDto
NameDescriptionTypeAdditional information
Id

File id

globally unique identifier

None.

Name

File name

string

None.

Extension

File extension (with dot): .pdf .txt ...

string

None.

ContentType

Content type, 'text/plain', 'application/pdf'...

string

None.

Length

File size, in bytes

integer

None.

ContainerName

Container (folder) name: used company id as container name

globally unique identifier

None.

CreatedUnixTime

Created data, in seconds from epoch

integer

None.

FileUrl

File url: to download or view

string

None.

ImgWidth

Image width, in pixels

integer

None.

ImgHeight

Image height, in pixels

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "Id": "cbbb9f9a-67d7-4e46-81a3-0e9e2d3fb8bf",
  "Name": "sample string 2",
  "Extension": "sample string 3",
  "ContentType": "sample string 4",
  "Length": 5,
  "ContainerName": "1e1bf4ed-3bf4-479c-90b1-1c39831c5399",
  "CreatedUnixTime": 7,
  "FileUrl": "sample string 8",
  "ImgWidth": 1,
  "ImgHeight": 1
}

application/xml, text/xml

Sample:
<FileSpecDto xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Reyvart.WellFileManager.Web.Models">
  <ContainerName>1e1bf4ed-3bf4-479c-90b1-1c39831c5399</ContainerName>
  <ContentType>sample string 4</ContentType>
  <CreatedUnixTime>7</CreatedUnixTime>
  <Extension>sample string 3</Extension>
  <FileUrl>sample string 8</FileUrl>
  <Id>cbbb9f9a-67d7-4e46-81a3-0e9e2d3fb8bf</Id>
  <ImgHeight>1</ImgHeight>
  <ImgWidth>1</ImgWidth>
  <Length>5</Length>
  <Name>sample string 2</Name>
</FileSpecDto>

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

Response Information

Resource Description

Changed file spec

IHttpActionResult

None.

Response Formats

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

Sample:

Sample not available.