Zum Hauptinhalt springen
PATCH
/
files
/
v3
/
files
/
{fileId}
Atualizar propriedades do arquivo
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
}
Produtos suportados
Requer um dos seguintes produtos ou superior.
Marketing HubMarketing HubGrátis
Sales HubSales HubGrátis
Service HubService HubGrátis
Content HubContent HubStarter

Escopos Necessários

Esta API requer um dos seguintes escopos:
  • 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 do arquivo a atualizar

Body

application/json

Object for updating files.

access
enum<string>

NONE: não executar nenhuma validação duplicada. REJECT: rejeitar o upload se for encontrado um objeto duplicado. RETURN_EXISTING: se for encontrado um arquivo duplicado, não fazer upload de um novo arquivo e retornar o arquivo duplicado encontrado.

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

O folderId do local para onde o arquivo deve ser movido. Os parâmetros folderId e folderPath não podem ser definidos ao mesmo tempo.

name
string

O novo nome do arquivo.

parentFolderPath
string

O caminho da pasta do local para onde o arquivo deve ser movido. Os parâmetros folderId e folderPath não podem ser definidos ao mesmo tempo.

clearExpires
boolean

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

isUsableInContent
boolean

Marque se o arquivo deve ser usado no conteúdo novo.

expiresAt
string<date-time>

Specifies the date and time when the file will expire.

Response

successful operation

File

access
enum<string>
required

Acesso ao arquivo. Pode ser 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

Hora de criação do objeto de arquivo.

archived
boolean
required

Se o arquivo foi excluído.

id
string
required

O ID do arquivo.

updatedAt
string<date-time>
required

A data e hora da última atualização do arquivo.

extension
string

A extensão do arquivo. Por exemplo: .jpg, .png, .gif, .pdf etc.

parentFolderId
string

O ID da pasta em que o arquivo se encontra.

sourceGroup
string

The group from which the file originated.

fileMd5
string

O hash MD5 do arquivo.

encoding
string

A codificação do arquivo.

type
string

O tipo do arquivo. Pode ser IMG, DOCUMENT, AUDIO, MOVIE ou OTHER.

isUsableInContent
boolean

Anteriormente, era "archived". Indica se o arquivo deve ser usado ao criar conteúdo novo, como páginas da web.

url
string

O URL do arquivo fornecido. Esse URL pode mudar dependendo das configurações de domínio da conta. Usará o domínio de hospedagem de arquivo selecionado.

expiresAt
integer

The timestamp indicating when the file will expire.

archivedAt
string<date-time>

Hora de exclusão do objeto de arquivo.

path
string

O caminho do arquivo no gerenciador de arquivos.

size
integer

O tamanho do arquivo em bytes.

name
string

O nome do arquivo.

width
integer

Para arquivos de imagem e vídeo, a largura do conteúdo.

defaultHostingUrl
string

O URL de hospedagem padrão do arquivo. Usará um dos URLs fornecidos pela HubSpot para atender o arquivo.

height
integer

Para arquivos de imagem e vídeo, a altura do conteúdo.

I