POST API/AttachFile/CreateFile

Creates an attached file.

Request Information

URI Parameters

None.

Body Parameters

CreateFileViewModel
NameDescriptionTypeAdditional information
FileName

File name

string

Required

Key

If you set it, you will need this key to get the file

string

None.

ContentType

Content-Type

string

Required

FileLength

File length

integer

Required

IsDrm

DRM-protected

boolean

Required

DrmType

DRM type

string

None.

DrmKey

DRM key

string

None.

MetaList

Meta list

Collection of MetaViewModel

None.

Request Formats

application/json

Sample:
{
  "FileName": "sample string 1",
  "Key": "sample string 2",
  "ContentType": "sample string 3",
  "FileLength": 4,
  "IsDrm": true,
  "DrmType": "sample string 6",
  "DrmKey": "sample string 7",
  "MetaList": [
    {
      "MetaKey": "sample string 1",
      "MetaValue": "sample string 2"
    },
    {
      "MetaKey": "sample string 1",
      "MetaValue": "sample string 2"
    }
  ]
}

text/json

Sample:
{
  "FileName": "sample string 1",
  "Key": "sample string 2",
  "ContentType": "sample string 3",
  "FileLength": 4,
  "IsDrm": true,
  "DrmType": "sample string 6",
  "DrmKey": "sample string 7",
  "MetaList": [
    {
      "MetaKey": "sample string 1",
      "MetaValue": "sample string 2"
    },
    {
      "MetaKey": "sample string 1",
      "MetaValue": "sample string 2"
    }
  ]
}

application/xml

Sample:
<CreateFileViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/JP.DataHub.ApiWeb.Models.AttachFile">
  <ContentType>sample string 3</ContentType>
  <DrmKey>sample string 7</DrmKey>
  <DrmType>sample string 6</DrmType>
  <FileLength>4</FileLength>
  <FileName>sample string 1</FileName>
  <IsDrm>true</IsDrm>
  <Key>sample string 2</Key>
  <MetaList>
    <MetaViewModel>
      <MetaKey>sample string 1</MetaKey>
      <MetaValue>sample string 2</MetaValue>
    </MetaViewModel>
    <MetaViewModel>
      <MetaKey>sample string 1</MetaKey>
      <MetaValue>sample string 2</MetaValue>
    </MetaViewModel>
  </MetaList>
</CreateFileViewModel>

text/xml

Sample:
<CreateFileViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/JP.DataHub.ApiWeb.Models.AttachFile">
  <ContentType>sample string 3</ContentType>
  <DrmKey>sample string 7</DrmKey>
  <DrmType>sample string 6</DrmType>
  <FileLength>4</FileLength>
  <FileName>sample string 1</FileName>
  <IsDrm>true</IsDrm>
  <Key>sample string 2</Key>
  <MetaList>
    <MetaViewModel>
      <MetaKey>sample string 1</MetaKey>
      <MetaValue>sample string 2</MetaValue>
    </MetaViewModel>
    <MetaViewModel>
      <MetaKey>sample string 1</MetaKey>
      <MetaValue>sample string 2</MetaValue>
    </MetaViewModel>
  </MetaList>
</CreateFileViewModel>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

File ID

CreateFileResultViewModel
NameDescriptionTypeAdditional information
FileId

File ID

string

None.

Response Formats

application/json

Sample:
{
  "FileId": "sample string 1"
}

text/json

Sample:
{
  "FileId": "sample string 1"
}

application/xml

Sample:
<CreateFileResultViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/JP.DataHub.ApiWeb.Models.AttachFile">
  <FileId>sample string 1</FileId>
</CreateFileResultViewModel>

text/xml

Sample:
<CreateFileResultViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/JP.DataHub.ApiWeb.Models.AttachFile">
  <FileId>sample string 1</FileId>
</CreateFileResultViewModel>