Constructors

Methods

  • Archive (soft delete) an existing HubDB table. This archives both the published and draft versions. Archive a table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to archive.

    • Optional_options: Configuration

    Returns Promise<void>

  • Archive (soft delete) an existing HubDB table. This archives both the published and draft versions. Archive a table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to archive.

    • Optional_options: Configuration

    Returns Promise<HttpInfo<void>>

  • Exports the draft version of a table to CSV / EXCEL format. Export a draft table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to export.

    • Optionalformat: string

      The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`.

    • Optional_options: Configuration

    Returns Promise<HttpFile>

  • Exports the draft version of a table to CSV / EXCEL format. Export a draft table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to export.

    • Optionalformat: string

      The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`.

    • Optional_options: Configuration

    Returns Promise<HttpInfo<HttpFile>>

  • Exports the published version of a table in a specified format. Export a published version of a table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to export.

    • Optionalformat: string

      The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`.

    • Optional_options: Configuration

    Returns Promise<HttpFile>

  • Exports the published version of a table in a specified format. Export a published version of a table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to export.

    • Optionalformat: string

      The file format to export. Possible values include `CSV`, `XLSX`, and `XLS`.

    • Optional_options: Configuration

    Returns Promise<HttpInfo<HttpFile>>

  • Returns the details for each draft table defined in the specified account, including column definitions. Return all draft tables

    Parameters

    • Optionalsort: string[]

      Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.

    • Optionalafter: string

      The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.

    • Optionallimit: number

      The maximum number of results to return. Default is 1000.

    • OptionalcreatedAt: Date

      Only return tables created at exactly the specified time.

    • OptionalcreatedAfter: Date

      Only return tables created after the specified time.

    • OptionalcreatedBefore: Date

      Only return tables created before the specified time.

    • OptionalupdatedAt: Date

      Only return tables last updated at exactly the specified time.

    • OptionalupdatedAfter: Date

      Only return tables last updated after the specified time.

    • OptionalupdatedBefore: Date

      Only return tables last updated before the specified time.

    • OptionalcontentType: string
    • Optionalarchived: boolean

      Specifies whether to return archived tables. Defaults to `false`.

    • Optional_options: Configuration

    Returns Promise<CollectionResponseWithTotalHubDbTableV3ForwardPaging>

  • Returns the details for each draft table defined in the specified account, including column definitions. Return all draft tables

    Parameters

    • Optionalsort: string[]

      Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.

    • Optionalafter: string

      The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.

    • Optionallimit: number

      The maximum number of results to return. Default is 1000.

    • OptionalcreatedAt: Date

      Only return tables created at exactly the specified time.

    • OptionalcreatedAfter: Date

      Only return tables created after the specified time.

    • OptionalcreatedBefore: Date

      Only return tables created before the specified time.

    • OptionalupdatedAt: Date

      Only return tables last updated at exactly the specified time.

    • OptionalupdatedAfter: Date

      Only return tables last updated after the specified time.

    • OptionalupdatedBefore: Date

      Only return tables last updated before the specified time.

    • OptionalcontentType: string
    • Optionalarchived: boolean

      Specifies whether to return archived tables. Defaults to `false`.

    • Optional_options: Configuration

    Returns Promise<HttpInfo<CollectionResponseWithTotalHubDbTableV3ForwardPaging>>

  • Returns the details for the published version of each table defined in an account, including column definitions. Get all published tables

    Parameters

    • Optionalsort: string[]

      Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.

    • Optionalafter: string

      The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.

    • Optionallimit: number

      The maximum number of results to return. Default is 1000.

    • OptionalcreatedAt: Date

      Only return tables created at exactly the specified time.

    • OptionalcreatedAfter: Date

      Only return tables created after the specified time.

    • OptionalcreatedBefore: Date

      Only return tables created before the specified time.

    • OptionalupdatedAt: Date

      Only return tables last updated at exactly the specified time.

    • OptionalupdatedAfter: Date

      Only return tables last updated after the specified time.

    • OptionalupdatedBefore: Date

      Only return tables last updated before the specified time.

    • OptionalcontentType: string
    • Optionalarchived: boolean

      Specifies whether to return archived tables. Defaults to `false`.

    • Optional_options: Configuration

    Returns Promise<CollectionResponseWithTotalHubDbTableV3ForwardPaging>

  • Returns the details for the published version of each table defined in an account, including column definitions. Get all published tables

    Parameters

    • Optionalsort: string[]

      Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default.

    • Optionalafter: string

      The cursor token value to get the next set of results. You can get this from the `paging.next.after` JSON property of a paged response containing more results.

    • Optionallimit: number

      The maximum number of results to return. Default is 1000.

    • OptionalcreatedAt: Date

      Only return tables created at exactly the specified time.

    • OptionalcreatedAfter: Date

      Only return tables created after the specified time.

    • OptionalcreatedBefore: Date

      Only return tables created before the specified time.

    • OptionalupdatedAt: Date

      Only return tables last updated at exactly the specified time.

    • OptionalupdatedAfter: Date

      Only return tables last updated after the specified time.

    • OptionalupdatedBefore: Date

      Only return tables last updated before the specified time.

    • OptionalcontentType: string
    • Optionalarchived: boolean

      Specifies whether to return archived tables. Defaults to `false`.

    • Optional_options: Configuration

    Returns Promise<HttpInfo<CollectionResponseWithTotalHubDbTableV3ForwardPaging>>

  • Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. Get details for a draft table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to return.

    • OptionalisGetLocalizedSchema: boolean
    • Optionalarchived: boolean

      Set this to `true` to return an archived table. Defaults to `false`.

    • OptionalincludeForeignIds: boolean

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

    • Optional_options: Configuration

    Returns Promise<HubDbTableV3>

  • Get the details for the draft version of a specific HubDB table. This will include the definitions for the columns in the table and the number of rows in the table. Get details for a draft table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to return.

    • OptionalisGetLocalizedSchema: boolean
    • Optionalarchived: boolean

      Set this to `true` to return an archived table. Defaults to `false`.

    • OptionalincludeForeignIds: boolean

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

    • Optional_options: Configuration

    Returns Promise<HttpInfo<HubDbTableV3>>

  • Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. Note: This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you'll need to include the HubSpot account ID in a portalId query parameter. Get details of a published table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to return.

    • OptionalisGetLocalizedSchema: boolean
    • Optionalarchived: boolean

      Set this to `true` to return details for an archived table. Defaults to `false`.

    • OptionalincludeForeignIds: boolean

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

    • Optional_options: Configuration

    Returns Promise<HubDbTableV3>

  • Returns the details for the published version of the specified table. This will include the definitions for the columns in the table and the number of rows in the table. Note: This endpoint can be accessed without any authentication if the table is set to be allowed for public access. To do so, you'll need to include the HubSpot account ID in a portalId query parameter. Get details of a published table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to return.

    • OptionalisGetLocalizedSchema: boolean
    • Optionalarchived: boolean

      Set this to `true` to return details for an archived table. Defaults to `false`.

    • OptionalincludeForeignIds: boolean

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

    • Optional_options: Configuration

    Returns Promise<HttpInfo<HubDbTableV3>>

  • Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the /publish endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as config. The second part will be the CSV file you want to import and you can specify this with the name as file. Refer the overview section to check the details and format of the JSON-formatted options for the import. Import data into draft table

    Parameters

    • tableIdOrName: string

      The ID of the destination table where data will be imported.

    • Optionalconfig: string
    • Optionalfile: HttpFile
    • Optional_options: Configuration

    Returns Promise<ImportResult>

  • Import the contents of a CSV file into an existing HubDB table. The data will always be imported into the draft version of the table. Use the /publish endpoint to push these changes to the published version. This endpoint takes a multi-part POST request. The first part will be a set of JSON-formatted options for the import and you can specify this with the name as config. The second part will be the CSV file you want to import and you can specify this with the name as file. Refer the overview section to check the details and format of the JSON-formatted options for the import. Import data into draft table

    Parameters

    • tableIdOrName: string

      The ID of the destination table where data will be imported.

    • Optionalconfig: string
    • Optionalfile: HttpFile
    • Optional_options: Configuration

    Returns Promise<HttpInfo<ImportResult>>

  • Publishes the table by copying the data and table schema changes from draft version to the published version, meaning any website pages using data from the table will be updated. Publish a table from draft

    Parameters

    • tableIdOrName: string

      The ID or name of the table to publish.

    • OptionalincludeForeignIds: boolean

      Set this to `true` to populate foreign ID values in the response.

    • Optional_options: Configuration

    Returns Promise<HubDbTableV3>

  • Publishes the table by copying the data and table schema changes from draft version to the published version, meaning any website pages using data from the table will be updated. Publish a table from draft

    Parameters

    • tableIdOrName: string

      The ID or name of the table to publish.

    • OptionalincludeForeignIds: boolean

      Set this to `true` to populate foreign ID values in the response.

    • Optional_options: Configuration

    Returns Promise<HttpInfo<HubDbTableV3>>

  • Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. Reset a draft table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to reset.

    • OptionalincludeForeignIds: boolean

      Set this to `true` to populate foreign ID values in the response.

    • Optional_options: Configuration

    Returns Promise<HubDbTableV3>

  • Replaces the data in the draft version of the table with values from the published version. Any unpublished changes in the draft will be lost after this call is made. Reset a draft table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to reset.

    • OptionalincludeForeignIds: boolean

      Set this to `true` to populate foreign ID values in the response.

    • Optional_options: Configuration

    Returns Promise<HttpInfo<HubDbTableV3>>

  • Unpublishes the table, meaning any website pages using data from the table will not render any data. Unpublish a table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to publish.

    • OptionalincludeForeignIds: boolean

      Set this to `true` to populate foreign ID values in the response.

    • Optional_options: Configuration

    Returns Promise<HubDbTableV3>

  • Unpublishes the table, meaning any website pages using data from the table will not render any data. Unpublish a table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to publish.

    • OptionalincludeForeignIds: boolean

      Set this to `true` to populate foreign ID values in the response.

    • Optional_options: Configuration

    Returns Promise<HttpInfo<HubDbTableV3>>

  • Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the /publish endpoint to push all the changes to the published version. To restore a table, include the query parameter archived=true and \"archived\": false in the json body. Note: You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. Update an existing table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to update.

    • hubDbTableV3Request: HubDbTableV3Request
    • OptionalisGetLocalizedSchema: boolean
    • Optionalarchived: boolean

      Specifies whether to return archived tables. Defaults to `false`.

    • OptionalincludeForeignIds: boolean

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

    • Optional_options: Configuration

    Returns Promise<HubDbTableV3>

  • Update an existing HubDB table. You can use this endpoint to add or remove columns to the table as well as restore an archived table. Tables updated using the endpoint will only modify the draft verion of the table. Use the /publish endpoint to push all the changes to the published version. To restore a table, include the query parameter archived=true and \"archived\": false in the json body. Note: You need to include all the columns in the input when you are adding/removing/updating a column. If you do not include an already existing column in the request, it will be deleted. Update an existing table

    Parameters

    • tableIdOrName: string

      The ID or name of the table to update.

    • hubDbTableV3Request: HubDbTableV3Request
    • OptionalisGetLocalizedSchema: boolean
    • Optionalarchived: boolean

      Specifies whether to return archived tables. Defaults to `false`.

    • OptionalincludeForeignIds: boolean

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

    • Optional_options: Configuration

    Returns Promise<HttpInfo<HubDbTableV3>>