Zum Hauptinhalt springen
PATCH
/
files
/
v3
/
files
/
{fileId}
ファイルのプロパティーを更新
curl --request PATCH \
  --url https://api.hubapi.com/files/v3/files/{fileId} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "access": "PUBLIC_INDEXABLE",
  "parentFolderId": "<string>",
  "name": "<string>",
  "parentFolderPath": "<string>",
  "clearExpires": true,
  "isUsableInContent": true,
  "expiresAt": "2023-11-07T05:31:56Z"
}'
{
  "extension": "<string>",
  "access": "PUBLIC_INDEXABLE",
  "parentFolderId": "<string>",
  "sourceGroup": "<string>",
  "fileMd5": "<string>",
  "encoding": "<string>",
  "type": "<string>",
  "isUsableInContent": true,
  "url": "<string>",
  "expiresAt": 123,
  "createdAt": "2023-11-07T05:31:56Z",
  "archivedAt": "2023-11-07T05:31:56Z",
  "path": "<string>",
  "archived": true,
  "size": 123,
  "name": "<string>",
  "width": 123,
  "id": "<string>",
  "defaultHostingUrl": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z",
  "height": 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

application/json

Object for updating files.

access
enum<string>

NONE:重複の検証は実行されません。REJECT:重複が見つかった場合はアップロードが拒否されます。RETURN_EXISTING:重複ファイルが見つかった場合、新しいファイルはアップロードされず、見つかった重複が返されます。

Available options:
PUBLIC_INDEXABLE,
PUBLIC_NOT_INDEXABLE,
HIDDEN_INDEXABLE,
HIDDEN_NOT_INDEXABLE,
HIDDEN_PRIVATE,
PRIVATE,
HIDDEN_SENSITIVE,
SENSITIVE
parentFolderId
string

ファイルの移動先となるFolderId。folderIdパラメーターとfolderPathパラメーターを同時に設定することはできません。

name
string

ファイルの新しい名前。

parentFolderPath
string

ファイルの移動先となるフォルダーパス。folderIdパラメーターとfolderPathパラメーターを同時に設定することはできません。

clearExpires
boolean

Indicates whether the expiration date of the file should be cleared.

isUsableInContent
boolean

新しいコンテンツでこのファイルを使用する必要があるかどうかを示します。

expiresAt
string<date-time>

Specifies the date and time when the file will expire.

Response

successful operation

File

access
enum<string>
required

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

Available options:
PUBLIC_INDEXABLE,
PUBLIC_NOT_INDEXABLE,
HIDDEN_INDEXABLE,
HIDDEN_NOT_INDEXABLE,
HIDDEN_PRIVATE,
PRIVATE,
HIDDEN_SENSITIVE,
SENSITIVE
createdAt
string<date-time>
required

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

archived
boolean
required

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

id
string
required

ファイルID。

updatedAt
string<date-time>
required

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

extension
string

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

parentFolderId
string

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

sourceGroup
string

The group from which the file originated.

fileMd5
string

ファイルのMD5ハッシュ。

encoding
string

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

type
string

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

isUsableInContent
boolean

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

url
string

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

expiresAt
integer

The timestamp indicating when the file will expire.

archivedAt
string<date-time>

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

path
string

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

size
integer

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

name
string

ファイルの名前。

width
integer

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

defaultHostingUrl
string

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

height
integer

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

I