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 file='@example-file' \
--form 'options=<string>'{
"access": "HIDDEN_INDEXABLE",
"archived": true,
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z",
"defaultHostingUrl": "<string>",
"encoding": "<string>",
"expiresAt": 123,
"extension": "<string>",
"fileMd5": "<string>",
"height": 123,
"isUsableInContent": true,
"name": "<string>",
"parentFolderId": "<string>",
"path": "<string>",
"size": 123,
"sourceGroup": "CONTENT",
"type": "<string>",
"url": "<string>",
"width": 123
}既存のファイルデータを新しいファイルデータに置き換えます。新しいファイルをアップロードして全ての参照を更新することなく画像コンテンツを変更するために使用できます。
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 file='@example-file' \
--form 'options=<string>'{
"access": "HIDDEN_INDEXABLE",
"archived": true,
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"archivedAt": "2023-11-07T05:31:56Z",
"defaultHostingUrl": "<string>",
"encoding": "<string>",
"expiresAt": 123,
"extension": "<string>",
"fileMd5": "<string>",
"height": 123,
"isUsableInContent": true,
"name": "<string>",
"parentFolderId": "<string>",
"path": "<string>",
"size": 123,
"sourceGroup": "CONTENT",
"type": "<string>",
"url": "<string>",
"width": 123
}サポートされる製品
必須スコープ
The access token received from the authorization server in the OAuth 2.0 flow.
希望するファイルのID。
\d+Character set of given file data.
File data that will replace existing file in the file manager.
JSON string representing FileReplaceOptions. Includes options to set the access and expiresAt properties, which will automatically update when the file is replaced.
successful operation
File
PUBLIC_INDEXABLE:ファイルはURLを知っていれば誰でもアクセスできます。検索エンジンはファイルをインデックスできます。PUBLIC_NOT_INDEXABLE:ファイルはURLを知っていれば誰でもアクセスできます。検索エンジンはファイルをインデックス「できません」。PRIVATE:ファイルは公開アクセスできません。コンテンツを表示するには、署名付きURLが必要です。検索エンジンはファイルをインデックス「できません」。
HIDDEN_INDEXABLE, HIDDEN_NOT_INDEXABLE, HIDDEN_PRIVATE, HIDDEN_SENSITIVE, PRIVATE, PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, SENSITIVE フォルダーが削除されたかどうかを示します。
フォルダー作成のタイムスタンプ。
ファイルID。
フォルダーに対する最新の更新のタイムスタンプ。
フォルダー削除のタイムスタンプ。
ファイルのデフォルトのホスティングURL。ファイルを提供するためにHubSpotが指定したURLのいずれかが使用されます。
ファイルのエンコーディング。
リクエストされたファイルの拡張子。
ファイルのMD5ハッシュ。
画像や動画ファイル用。ファイルの高さ。
新しいコンテンツでこのファイルを使用する必要があるかどうかを示します。
新しい名前。指定すると、フォルダーの名前とfullPathが変更されます。このフォルダーの全ての子は変更に合わせて更新されます。
新しい親folderId。変更すると、フォルダーとその全ての子が指定したフォルダーに移動されます。parentFolderIdとparentFolderPathを同時に指定することはできません。
ファイルマネージャーにおけるフォルダーのパス。
リクエストされたファイルのサイズ(バイト)。
CONTENT, CONVERSATIONS, FORMS, UI_EXTENSIONS, UNKNOWN ファイルの種類。IMG、DOCUMENT、AUDIO、MOVIE、またはOTHERのいずれかになります。
新しいファイルのダウンロード元のURL。
画像や動画ファイル用。ファイルの幅。