POST API/AttachFile/CreateFile

添付ファイルの情報を作成する

Request Information

URI Parameters

None.

Body Parameters

CreateFileViewModel
NameDescriptionTypeAdditional information
FileName

ファイル名

string

Required

Key

設定を行えばファイルを取得する際にこのキーが必要になる

string

None.

ContentType

Content-Type

string

Required

FileLength

ファイルサイズ

integer

Required

IsDrm

DRMの有無

boolean

Required

DrmType

Drmのタイプ

string

None.

DrmKey

Drmのキー

string

None.

MetaList

メタのリスト

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

ファイル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>