curl --request PATCH \
--url https://api.hubapi.com/cms/v3/hubdb/tables/{tableIdOrName}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowChildTables": true,
"allowPublicApiAccess": true,
"columns": [
{
"id": 123,
"label": "<string>",
"name": "<string>",
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123
}
],
"type": "BOOLEAN",
"foreignColumnId": 123,
"foreignTableId": 123,
"maxNumberOfCharacters": 123,
"maxNumberOfOptions": 123
}
],
"dynamicMetaTags": {},
"enableChildTablePages": true,
"label": "<string>",
"name": "<string>",
"useForPages": true
}
'{
"allowChildTables": true,
"allowPublicApiAccess": true,
"columnCount": 123,
"columns": [
{
"deleted": true,
"description": "<string>",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"type": "BOOLEAN",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"foreignColumnId": 123,
"foreignIds": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"foreignIdsById": {},
"foreignIdsByName": {},
"foreignTableId": 123,
"optionCount": 123,
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123,
"width": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"deleted": true,
"deletedAt": "2023-11-07T05:31:56Z",
"dynamicMetaTags": {},
"enableChildTablePages": true,
"id": "<string>",
"label": "<string>",
"name": "<string>",
"published": true,
"publishedAt": "2023-11-07T05:31:56Z",
"rowCount": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"useForPages": true,
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"isOrderedManually": true,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
}
}Atualize uma tabela HubDB existente. Você pode usar este ponto de extremidade para adicionar ou remover colunas da tabela, bem como restaurar uma tabela arquivada. As tabelas atualizadas usando o ponto de extremidade modificarão apenas a versão de rascunho da tabela. Use o ponto de extremidade “/publish” para aplicar todas as alterações à versão publicada. Para restaurar uma tabela, inclua o parâmetro de consulta “archived=true” e “archived: false” no corpo do json. Observação: você precisa incluir todas as colunas na entrada ao adicionar/remover/atualizar uma coluna. Se você não incluir uma coluna já existente na solicitação, ela será excluída.
curl --request PATCH \
--url https://api.hubapi.com/cms/v3/hubdb/tables/{tableIdOrName}/draft \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"allowChildTables": true,
"allowPublicApiAccess": true,
"columns": [
{
"id": 123,
"label": "<string>",
"name": "<string>",
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123
}
],
"type": "BOOLEAN",
"foreignColumnId": 123,
"foreignTableId": 123,
"maxNumberOfCharacters": 123,
"maxNumberOfOptions": 123
}
],
"dynamicMetaTags": {},
"enableChildTablePages": true,
"label": "<string>",
"name": "<string>",
"useForPages": true
}
'{
"allowChildTables": true,
"allowPublicApiAccess": true,
"columnCount": 123,
"columns": [
{
"deleted": true,
"description": "<string>",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"type": "BOOLEAN",
"createdAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"foreignColumnId": 123,
"foreignIds": [
{
"id": "<string>",
"name": "<string>",
"type": "<string>"
}
],
"foreignIdsById": {},
"foreignIdsByName": {},
"foreignTableId": 123,
"optionCount": 123,
"options": [
{
"createdAt": "2023-11-07T05:31:56Z",
"id": "<string>",
"label": "<string>",
"name": "<string>",
"order": 123,
"type": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"createdByUserId": 123,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123
}
],
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"updatedByUserId": 123,
"width": 123
}
],
"createdAt": "2023-11-07T05:31:56Z",
"deleted": true,
"deletedAt": "2023-11-07T05:31:56Z",
"dynamicMetaTags": {},
"enableChildTablePages": true,
"id": "<string>",
"label": "<string>",
"name": "<string>",
"published": true,
"publishedAt": "2023-11-07T05:31:56Z",
"rowCount": 123,
"updatedAt": "2023-11-07T05:31:56Z",
"useForPages": true,
"createdBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
},
"isOrderedManually": true,
"updatedBy": {
"email": "<string>",
"firstName": "<string>",
"id": "<string>",
"lastName": "<string>"
}
}Produtos suportados
Escopos Necessários
The access token received from the authorization server in the OAuth 2.0 flow.
O ID ou nome da tabela HubDB.
Se apenas os resultados que foram arquivados devem ser retornados.
Defina como "true" para preencher os valores de ID externo no resultado.
Indica se deve recuperar o esquema localizado para a tabela.
Especifica se as tabelas secundárias podem ser criadas
Especifica se a tabela pode ser lida pelo público sem autorização
Lista de colunas na tabela
Mostrar atributos filhos
Especifica os pares de valores-chave dos campos de metadados com os IDs de coluna associados.
Mostrar atributos filhos
Especifica a criação de páginas dinâmicas de vários níveis usando tabelas secundárias
Rótulo da tabela
Nome da tabela
Especifica se a tabela pode ser usada para criação de páginas dinâmicas
successful operation
Especifica se as tabelas secundárias podem ser criadas
Especifica se a tabela pode ser lida pelo público sem autorização
Número de colunas, incluindo as excluídas
Lista de colunas na tabela
Mostrar atributos filhos
A data e hora em que a tabela foi criada
Especifica se a tabela está marcada como excluída.
A data e a hora que indica quando a tabela foi excluída.
Especifica os pares de valores-chave dos campos de metadados com os IDs de coluna associados.
Mostrar atributos filhos
Especifica a criação de páginas dinâmicas de vários níveis usando tabelas secundárias
ID da tabela
Rótulo da tabela
Nome da tabela
Indica se a tabela está atualmente publicada.
A data e hora em que a tabela foi publicada recentemente
Número de linhas na tabela
A data e hora em que a tabela foi atualizada recentemente
Especifica se a tabela pode ser usada para criação de páginas dinâmicas
Mostrar atributos filhos
Indica se as linhas da tabela estão ordenadas manualmente.
Mostrar atributos filhos