Zum Hauptinhalt springen
PATCH
/
cms
/
v3
/
hubdb
/
tables
/
{tableIdOrName}
/
draft
Update an existing table
curl --request PATCH \
  --url https://api.hubapi.com/cms/v3/hubdb/tables/{tableIdOrName}/draft \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "dynamicMetaTags": {},
  "allowPublicApiAccess": true,
  "useForPages": true,
  "columns": [
    {
      "foreignTableId": 123,
      "maxNumberOfCharacters": 123,
      "name": "<string>",
      "options": [
        {
          "createdByUserId": 123,
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedBy": {
            "firstName": "<string>",
            "lastName": "<string>",
            "id": "<string>",
            "email": "<string>"
          },
          "createdBy": {
            "firstName": "<string>",
            "lastName": "<string>",
            "id": "<string>",
            "email": "<string>"
          },
          "name": "",
          "id": "",
          "label": "",
          "updatedByUserId": 123,
          "type": "",
          "order": 123,
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      ],
      "id": 123,
      "label": "<string>",
      "maxNumberOfOptions": 123,
      "type": "NULL",
      "foreignColumnId": 123
    }
  ],
  "name": "<string>",
  "enableChildTablePages": true,
  "label": "<string>",
  "allowChildTables": true
}'
{
  "dynamicMetaTags": {},
  "updatedBy": {
    "firstName": "<string>",
    "lastName": "<string>",
    "id": "<string>",
    "email": "<string>"
  },
  "allowPublicApiAccess": true,
  "useForPages": true,
  "publishedAt": "2023-11-07T05:31:56Z",
  "columns": [
    {
      "createdByUserId": 123,
      "foreignTableId": 123,
      "updatedBy": {
        "firstName": "<string>",
        "lastName": "<string>",
        "id": "<string>",
        "email": "<string>"
      },
      "description": "<string>",
      "label": "<string>",
      "updatedByUserId": 123,
      "type": "NULL",
      "optionCount": 123,
      "foreignIds": [
        {
          "name": "<string>",
          "id": "<string>",
          "type": "<string>"
        }
      ],
      "createdAt": "2023-11-07T05:31:56Z",
      "deleted": true,
      "createdBy": {
        "firstName": "<string>",
        "lastName": "<string>",
        "id": "<string>",
        "email": "<string>"
      },
      "name": "<string>",
      "options": [
        {
          "createdByUserId": 123,
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedBy": {
            "firstName": "<string>",
            "lastName": "<string>",
            "id": "<string>",
            "email": "<string>"
          },
          "createdBy": {
            "firstName": "<string>",
            "lastName": "<string>",
            "id": "<string>",
            "email": "<string>"
          },
          "name": "",
          "id": "",
          "label": "",
          "updatedByUserId": 123,
          "type": "",
          "order": 123,
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      ],
      "width": 123,
      "id": "<string>",
      "foreignIdsById": {},
      "foreignColumnId": 123,
      "foreignIdsByName": {},
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "label": "<string>",
  "published": true,
  "columnCount": 123,
  "allowChildTables": true,
  "createdAt": "2023-11-07T05:31:56Z",
  "deletedAt": "2023-11-07T05:31:56Z",
  "deleted": true,
  "createdBy": {
    "firstName": "<string>",
    "lastName": "<string>",
    "id": "<string>",
    "email": "<string>"
  },
  "name": "<string>",
  "enableChildTablePages": true,
  "id": "<string>",
  "rowCount": 123,
  "isOrderedManually": true,
  "updatedAt": "2023-11-07T05:31:56Z"
}
Unterstützte Produkte
Erfordert eines der folgenden Produkte oder höher.
Marketing HubMarketing HubKostenlos
Sales HubSales HubKostenlos
Service HubService HubKostenlos
Content HubContent HubKostenlos

Erforderliche Bereiche

Diese API erfordert einen der folgenden Bereiche:
  • hubdb

Authorizations

Authorization
string
header
required

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

Path Parameters

tableIdOrName
string
required

The ID or name of the table to update.

Query Parameters

archived
boolean

Specifies whether to return archived tables. Defaults to false.

includeForeignIds
boolean

Set this to true to populate foreign ID values in the result.

isGetLocalizedSchema
boolean

Body

application/json
name
string
required

Name of the table

label
string
required

Label of the table

dynamicMetaTags
object

Specifies the key value pairs of the metadata fields with the associated column IDs.

allowPublicApiAccess
boolean

Specifies whether the table can be read by public without authorization

useForPages
boolean

Specifies whether the table can be used for creation of dynamic pages

columns
object[]

List of columns in the table

enableChildTablePages
boolean

Specifies creation of multi-level dynamic pages using child tables

allowChildTables
boolean

Specifies whether child tables can be created

Response

successful operation

label
string
required

Label of the table

deletedAt
string<date-time>
required
name
string
required

Name of the table

dynamicMetaTags
object

Specifies the key value pairs of the metadata fields with the associated column IDs.

updatedBy
object
allowPublicApiAccess
boolean

Specifies whether the table can be read by public without authorization

useForPages
boolean

Specifies whether the table can be used for creation of dynamic pages

publishedAt
string<date-time>

Timestamp at which the table is published recently

columns
object[]

List of columns in the table

published
boolean
columnCount
integer

Number of columns including deleted

allowChildTables
boolean

Specifies whether child tables can be created

createdAt
string<date-time>

Timestamp at which the table is created

deleted
boolean
createdBy
object
enableChildTablePages
boolean

Specifies creation of multi-level dynamic pages using child tables

id
string

Id of the table

rowCount
integer

Number of rows in the table

isOrderedManually
boolean
updatedAt
string<date-time>

Timestamp at which the table is updated recently

I