Zum Hauptinhalt springen
PUT
/
files
/
v3
/
files
/
{fileId}
ファイルを置換
curl --request PUT \
  --url https://api.hubapi.com/files/v3/files/{fileId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'charsetHunch=<string>' \
  --form 'options=<string>' \
  --form file=@example-file
{
  "access": "HIDDEN_INDEXABLE",
  "archived": true,
  "archivedAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "defaultHostingUrl": "<string>",
  "encoding": "<string>",
  "expiresAt": 123,
  "extension": "<string>",
  "fileMd5": "<string>",
  "height": 123,
  "id": "<string>",
  "isUsableInContent": true,
  "name": "<string>",
  "parentFolderId": "<string>",
  "path": "<string>",
  "size": 123,
  "sourceGroup": "<string>",
  "type": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z",
  "url": "<string>",
  "width": 123
}
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -無料ツール
Sales HubSales Hub -無料ツール
Service HubService Hub -無料ツール
Content HubContent Hub -Starter
この API には、次のいずれかのスコープが必要です。
files

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Path Parameters

fileId
string
required

希望するファイルのID。

Body

multipart/form-data
charsetHunch
string

Character set of given file data.

file
file

File data that will replace existing file in the file manager.

options
string

JSON string representing FileReplaceOptions. Includes options to set the access and expiresAt properties, which will automatically update when the file is replaced.

Response

successful operation

File

access
enum<string>
required

ファイルアクセス権。PUBLIC_INDEXABLE、PUBLIC_NOT_INDEXABLE、PRIVATEのいずれかになります。

Verfügbare Optionen:
HIDDEN_INDEXABLE,
HIDDEN_NOT_INDEXABLE,
HIDDEN_PRIVATE,
HIDDEN_SENSITIVE,
PRIVATE,
PUBLIC_INDEXABLE,
PUBLIC_NOT_INDEXABLE,
SENSITIVE
archived
boolean
required

ファイルが削除されたかどうか。

createdAt
string<date-time>
required

ファイルオブジェクトの作成日時。

id
string
required

ファイルID。

updatedAt
string<date-time>
required

ファイルに対する最新の更新のタイムスタンプ。

archivedAt
string<date-time>

ファイルオブジェクトの削除日時。

defaultHostingUrl
string

ファイルのデフォルトのホスティングURL。ファイルを提供するためにHubSpotが指定したURLのいずれかが使用されます。

encoding
string

ファイルのエンコーディング。

expiresAt
integer
extension
string

ファイルの拡張子。例:.jpg、.png、.gif、.pdfなど。

fileMd5
string

ファイルのMD5ハッシュ。

height
integer

画像や動画ファイルのコンテンツの高さ。

isUsableInContent
boolean

以前の「archied」。ウェブページなどの新しいコンテンツを作成する際にこのファイルを使用する必要があるかどうかを示します。

name
string

ファイルの名前。

parentFolderId
string

ファイルがあるフォルダーのID。

path
string

ファイルマネージャーにおけるファイルのパス。

size
integer

ファイルのサイズ(バイト)。

sourceGroup
string
type
string

ファイルの種類。IMG、DOCUMENT、AUDIO、MOVIE、またはOTHERのいずれかになります。

url
string

指定されたファイルのURL。このURLはアカウントのドメイン設定に応じて変わる可能性があります。選択したファイル ホスティング ドメインが使用されます。

width
integer

画像や動画ファイルのコンテンツの幅。