hubspot.files
Module hubspot.files
API
Definitions
vishwaj/hubspot.files
hubspot.files Connector
Overview
HubSpot is a leading CRM platform that provides marketing, sales, customer service, and content management tools to help businesses attract, engage, and delight customers at scale.
The ballerinax/hubspot.files package offers APIs to connect and interact with HubSpot Files API endpoints, specifically based on HubSpot Files API v3.
Setup guide
To use the HubSpot Files connector, you must have access to the HubSpot API through a HubSpot developer account and obtain a private app access token. If you do not have a HubSpot account, you can sign up for one here.
Step 1: Create a HubSpot Account
-
Navigate to the HubSpot website and sign up for an account or log in if you already have one.
-
Ensure you have a suitable subscription plan. Access to the Files API and its full capabilities (such as managing file storage and retrieving signed URLs) is available on Starter, Professional, and Enterprise plans. Some advanced file management features may be restricted on the free tier.
Step 2: Generate a Private App Access Token
-
Log in to your HubSpot account.
-
In the top-right corner, click the Settings icon (gear icon) to open your account settings.
-
In the left sidebar, navigate to Integrations > Private Apps.
-
Click Create a private app.
-
On the Basic Info tab, provide a name and description for your app.
-
Navigate to the Scopes tab and select the required scopes for file management. Search for and enable the relevant
filesscopes (e.g.,filesandfiles.ui_hidden.read) based on the operations you intend to perform. -
Click Create app and confirm by clicking Continue creating in the dialog that appears.
-
After the app is created, your access token will be displayed on the app details page. Copy this token to use as your API credential.
Tip: You must copy and store this key somewhere safe. It won't be visible again in your account settings for security reasons.
Quickstart
To use the hubspot.files connector in your Ballerina application, update the .bal file as follows:
Step 1: Import the module
import ballerina/oauth2; import ballerinax/hubspot.files as hfiles;
Step 2: Instantiate a new connector
- Create a
Config.tomlfile and configure the obtained credentials:
clientId = "<Your_Client_Id>" clientSecret = "<Your_Client_Secret>" refreshToken = "<Your_Refresh_Token>"
- Create a
hfiles:ConnectionConfigand initialize the client:
configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; final hfiles:Client hfilesClient = check new({ auth: { clientId, clientSecret, refreshToken } });
Step 3: Invoke the connector operation
Now, utilize the available connector operations.
Create a new folder
public function main() returns error? { hfiles:FolderInput newFolder = { name: "My Assets Folder", parentFolderId: "123456789" }; hfiles:Folder response = check hfilesClient->createFolder(newFolder); }
Step 4: Run the Ballerina application
bal run
Examples
The hubspot.files connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
Clients
hubspot.files: Client
Upload and manage files.
Constructor
Gets invoked to initialize the connector.
init (ConnectionConfig config, string serviceUrl)- config ConnectionConfig - The configurations to be used when initializing the
connector
- serviceUrl string "https://api.hubapi.com/files/v3" - URL of the target service
uploadFile
Upload file
Parameters
- payload V3FilesBody -
importFileFromUrl
function importFileFromUrl(ImportFromUrlInput payload, map<string|string[]> headers) returns ImportFromUrlTaskLocator|errorImport file from URL
Parameters
- payload ImportFromUrlInput -
Return Type
- ImportFromUrlTaskLocator|error - accepted
getImportStatus
function getImportStatus(string taskId, map<string|string[]> headers) returns FileActionResponse|errorCheck import status
Parameters
- taskId string - Import by URL task ID
Return Type
- FileActionResponse|error - successful operation
searchFiles
function searchFiles(map<string|string[]> headers, *SearchFilesQueries queries) returns CollectionResponseFile|errorSearch files
Parameters
- queries *SearchFilesQueries - Queries to be sent with the request
Return Type
- CollectionResponseFile|error - successful operation
getFileByPath
function getFileByPath(string path, map<string|string[]> headers, *GetFileByPathQueries queries) returns FileStat|errorRetrieve file by path
Parameters
- path string - The full path of the file to retrieve metadata for. Must be non-empty
- queries *GetFileByPathQueries - Queries to be sent with the request
getFileById
function getFileById(string fileId, map<string|string[]> headers, *GetFileByIdQueries queries) returns File|errorRetrieve file by ID
Parameters
- fileId string - ID of the desired file
- queries *GetFileByIdQueries - Queries to be sent with the request
replaceFile
function replaceFile(string fileId, FilesfileIdBody payload, map<string|string[]> headers) returns File|errorReplace file
deleteFile
Delete file by ID
Parameters
- fileId string - FileId to delete
Return Type
- error? - No content
updateFileProperties
function updateFileProperties(string fileId, FileUpdateInput payload, map<string|string[]> headers) returns File|errorUpdate file properties
downloadFile
Download a file by ID
Parameters
- fileId string - The numeric ID of the file to download. Must consist of digits only
gdprDeleteFile
GDPR-delete file
Parameters
- fileId string - ID of file to GDPR delete
Return Type
- error? - No content
getFileSignedUrl
function getFileSignedUrl(string fileId, map<string|string[]> headers, *GetFileSignedUrlQueries queries) returns SignedUrl|errorGet signed URL to access private file
Parameters
- fileId string - ID of file
- queries *GetFileSignedUrlQueries - Queries to be sent with the request
createFolder
Create folder
Parameters
- payload FolderInput - Folder creation options
searchFolders
function searchFolders(map<string|string[]> headers, *SearchFoldersQueries queries) returns CollectionResponseFolder|errorSearch folders
Parameters
- queries *SearchFoldersQueries - Queries to be sent with the request
Return Type
- CollectionResponseFolder|error - successful operation
updateFolderPropertiesAsync
function updateFolderPropertiesAsync(FolderUpdateInputWithId payload, map<string|string[]> headers) returns FolderUpdateTaskLocator|errorUpdate folder properties
Parameters
- payload FolderUpdateInputWithId -
Return Type
- FolderUpdateTaskLocator|error - accepted
checkFolderUpdateStatus
function checkFolderUpdateStatus(string taskId, map<string|string[]> headers) returns FolderActionResponse|errorCheck folder update status
Parameters
- taskId string - TaskId of folder update
Return Type
- FolderActionResponse|error - successful operation
getFolderById
function getFolderById(string folderId, map<string|string[]> headers, *GetFolderByIdQueries queries) returns Folder|errorRetrieve folder by ID
Parameters
- folderId string - ID of desired folder
- queries *GetFolderByIdQueries - Queries to be sent with the request
deleteFolderById
Delete folder by ID
Parameters
- folderId string - ID of folder to delete
Return Type
- error? - No content
updateFolderById
function updateFolderById(string folderId, FolderUpdateInput payload, map<string|string[]> headers) returns Folder|errorUpdate folder properties by folder ID
getFolderByPath
function getFolderByPath(string folderPath, map<string|string[]> headers, *GetFolderByPathQueries queries) returns Folder|errorRetrieve folder by path
Parameters
- folderPath string - Path of desired folder
- queries *GetFolderByPathQueries - Queries to be sent with the request
deleteFolderByPath
Delete folder by path
Parameters
- folderPath string - Path of folder to delete
Return Type
- error? - No content
Records
hubspot.files: ApiKeysConfig
Provides API key configurations needed when communicating with a remote HTTP endpoint.
Fields
- hapikey string -
- privateApp string -
- privateAppLegacy string -
hubspot.files: CollectionResponseFile
Collections of files
Fields
- paging? Paging - Pagination metadata containing links to the next and previous pages
- results File[] - Array of file objects returned in the collection response
hubspot.files: CollectionResponseFolder
A paginated collection of folder objects from the file manager
Fields
- paging? Paging - Pagination metadata containing links to the next and previous pages
- results Folder[] - Array of folder objects returned in the collection response
hubspot.files: ConnectionConfig
Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint.
Fields
- auth BearerTokenConfig|OAuth2RefreshTokenGrantConfig|ApiKeysConfig - Provides Auth configurations needed when communicating with a remote HTTP endpoint.
- httpVersion HttpVersion(default http:HTTP_2_0) - The HTTP version understood by the client
- http1Settings ClientHttp1Settings(default {}) - Configurations related to HTTP/1.x protocol
- http2Settings ClientHttp2Settings(default {}) - Configurations related to HTTP/2 protocol
- timeout decimal(default 30) - The maximum time to wait (in seconds) for a response before closing the connection
- forwarded string(default "disable") - The choice of setting
forwarded/x-forwardedheader
- followRedirects? FollowRedirects - Configurations associated with Redirection
- poolConfig? PoolConfiguration - Configurations associated with request pooling
- cache CacheConfig(default {}) - HTTP caching related configurations
- compression Compression(default http:COMPRESSION_AUTO) - Specifies the way of handling compression (
accept-encoding) header
- circuitBreaker? CircuitBreakerConfig - Configurations associated with the behaviour of the Circuit Breaker
- retryConfig? RetryConfig - Configurations associated with retrying
- cookieConfig? CookieConfig - Configurations associated with cookies
- responseLimits ResponseLimitConfigs(default {}) - Configurations associated with inbound response size limits
- secureSocket? ClientSecureSocket - SSL/TLS-related options
- proxy? ProxyConfig - Proxy server related options
- socketConfig ClientSocketConfig(default {}) - Provides settings related to client socket configuration
- validation boolean(default true) - Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default
- laxDataBinding boolean(default true) - Enables relaxed data binding on the client side. When enabled,
nilvalues are treated as optional, and absent fields are handled asnilabletypes. Enabled by default.
hubspot.files: ErrorDetail
Detailed information about a specific error, including field context and code
Fields
- subCategory? string - A specific category that contains more specific detail about the error
- code? string - The status code associated with the error detail
- 'in? string - The name of the field or parameter in which the error was found
- context? record { string[]... } - Context about the error condition
- message string - A human readable message describing the error along with remediation steps where appropriate
hubspot.files: File
File
Fields
- extension? string - Extension of the file. ex: .jpg, .png, .gif, .pdf, etc
- access "HIDDEN_INDEXABLE"|"HIDDEN_NOT_INDEXABLE"|"HIDDEN_PRIVATE"|"HIDDEN_SENSITIVE"|"PRIVATE"|"PUBLIC_INDEXABLE"|"PUBLIC_NOT_INDEXABLE"|"SENSITIVE" - File access. Can be PUBLIC_INDEXABLE, PUBLIC_NOT_INDEXABLE, PRIVATE
- parentFolderId? string - ID of the folder the file is in
- sourceGroup? "CONTENT"|"CONVERSATIONS"|"FORMS"|"UI_EXTENSIONS"|"UNKNOWN" - The product area or feature group that originated the file
- fileMd5? string - The MD5 hash of the file
- encoding? string - Encoding of the file
- 'type? string - Type of the file. Can be IMG, DOCUMENT, AUDIO, MOVIE, or OTHER
- isUsableInContent? boolean - Previously "archied". Indicates if the file should be used when creating new content like web pages
- expiresAt? int - Unix timestamp (ms) indicating when the file expires
- url? string - URL of the given file. This URL can change depending on the domain settings of the account. Will use the select file hosting domain
- archived boolean - If the file is deleted
- archivedAt? string - Deletion time of the file object
- createdAt string - Creation time of the file object
- path? string - Path of the file in the file manager
- size? int - Size of the file in bytes
- name? string - Name of the file
- width? Signed32 - For image and video files, the width of the content
- id string - File ID
- defaultHostingUrl? string - Default hosting URL of the file. This will use one of HubSpot's provided URLs to serve the file
- height? Signed32 - For image and video files, the height of the content
- updatedAt string - Timestamp of the latest update to the file
hubspot.files: FileActionResponse
Represents the status and result of an asynchronous file operation task
Fields
- result? File - File
- completedAt string - Time of completion of task
- numErrors? Signed32 - Number of errors resulting from the task
- requestedAt? string - Timestamp of when the task was requested
- startedAt string - Timestamp of when the task was started
- links? record { string... } - Link to check the status of the requested task
- errors? StandardError[] - Descriptive error messages
- taskId string - ID of the requested task
- status "CANCELED"|"COMPLETE"|"PENDING"|"PROCESSING" - Current status of the task
hubspot.files: FilesfileIdBody
Request body schema for replacing an existing file's data and update options
Fields
- file? record { fileContent byte[], fileName string } - File data that will replace existing file in the file manager
- options? string - JSON string representing FileReplaceOptions. Includes options to set the access and expiresAt properties, which will automatically update when the file is replaced
- charsetHunch? string - Character set of given file data
hubspot.files: FileStat
Contains metadata for a file or folder retrieved from the file manager
Fields
- file? File - File
- folder? Folder - Represents a folder in the file manager, including its path and metadata
hubspot.files: FileUpdateInput
Object for updating files
Fields
- access? "HIDDEN_INDEXABLE"|"HIDDEN_NOT_INDEXABLE"|"HIDDEN_PRIVATE"|"HIDDEN_SENSITIVE"|"PRIVATE"|"PUBLIC_INDEXABLE"|"PUBLIC_NOT_INDEXABLE"|"SENSITIVE" - NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead
- parentFolderId? string - FolderId where the file should be moved to. folderId and folderPath parameters cannot be set at the same time
- name? string - New name for the file
- parentFolderPath? string - Folder path where the file should be moved to. folderId and folderPath parameters cannot be set at the same time
- clearExpires? boolean - If true, removes the expiration date from the file
- isUsableInContent? boolean - Mark whether the file should be used in new content or not
- expiresAt? string - The date and time at which the file should expire
hubspot.files: Folder
Represents a folder in the file manager, including its path and metadata
Fields
- archived boolean - Marks whether the folder is deleted or not
- archivedAt? string - Timestamp of folder deletion
- createdAt string - Timestamp of folder creation
- path? string - Path of the folder in the file manager
- parentFolderId? string - ID of the parent folder
- name? string - Name of the folder
- id string - ID of the folder
- updatedAt string - Timestamp of the latest update to the folder
hubspot.files: FolderActionResponse
Represents the status and result of an asynchronous folder operation task
Fields
- result? Folder - Represents a folder in the file manager, including its path and metadata
- completedAt string - When the requested changes have been completed
- numErrors? Signed32 - Number of errors resulting from the requested changes
- requestedAt? string - Timestamp representing when the task was requested
- startedAt string - Timestamp representing when the task was started at
- links? record { string... } - Link to check the status of the task
- errors? StandardError[] - Detailed errors resulting from the task
- taskId string - ID of the task
- status "CANCELED"|"COMPLETE"|"PENDING"|"PROCESSING" - Current status of the task
hubspot.files: FolderInput
Object for creating a folder
Fields
- parentFolderId? string - FolderId of the parent of the created folder. If not specified, the folder will be created at the root level. parentFolderId and parentFolderPath cannot be set at the same time
- parentPath? string - Path of the parent of the created folder. If not specified the folder will be created at the root level. parentFolderPath and parentFolderId cannot be set at the same time
- name string - Desired name for the folder
hubspot.files: FolderUpdateInput
Object for updating folders
Fields
- parentFolderId? int - New parent folderId. If changed, the folder and all it's children will be moved into the specified folder. parentFolderId and parentFolderPath cannot be specified at the same time
- name? string - New name. If specified the folder's name and fullPath will change. All children of the folder will be updated accordingly
hubspot.files: FolderUpdateInputWithId
Input schema for updating a folder's name, parent, or location by its unique ID
Fields
- parentFolderId? int - New parent folderId. If changed, the folder and all it's children will be moved into the specified folder. parentFolderId and parentFolderPath cannot be specified at the same time
- name? string - New name. If specified the folder's name and fullPath will change. All children of the folder will be updated accordingly
- id string - The unique identifier of the folder to be updated
hubspot.files: FolderUpdateTaskLocator
Information on the task that has been started, and where to check it's status
Fields
- links record { string... } - Links for where to check information related to the task. The
statuslink gives the URL for where to check the status of the task
- id string - ID of the task
hubspot.files: GetFileByIdQueries
Represents the Queries record for the operation: getFileById
Fields
- properties? string[] - List of additional file properties to include in the response
hubspot.files: GetFileByPathQueries
Represents the Queries record for the operation: getFileByPath
Fields
- properties? string[] - List of additional file properties to include in the response
hubspot.files: GetFileSignedUrlQueries
Represents the Queries record for the operation: getFileSignedUrl
Fields
- size? "icon"|"medium"|"preview"|"thumb" - For image files. This will resize the image to the desired size before sharing. Does not affect the original file, just the file served by this signed URL
- upscale? boolean - If size is provided, this will upscale the image to fit the size dimensions
- expirationSeconds? int - How long in seconds the link will provide access to the file
hubspot.files: GetFolderByIdQueries
Represents the Queries record for the operation: getFolderById
Fields
- properties? string[] - Properties to set on returned folder
hubspot.files: GetFolderByPathQueries
Represents the Queries record for the operation: getFolderByPath
Fields
- properties? string[] - Properties to set on returned folder
hubspot.files: ImportFromUrlInput
Input schema for importing a file into the file manager from an external URL
Fields
- folderPath? string - One of folderPath or folderId is required. Destination folder path for the uploaded file. If the folder path does not exist, there will be an attempt to create the folder path
- access "HIDDEN_INDEXABLE"|"HIDDEN_NOT_INDEXABLE"|"HIDDEN_PRIVATE"|"HIDDEN_SENSITIVE"|"PRIVATE"|"PUBLIC_INDEXABLE"|"PUBLIC_NOT_INDEXABLE"|"SENSITIVE" - PUBLIC_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can index the file. PUBLIC_NOT_INDEXABLE: File is publicly accessible by anyone who has the URL. Search engines can't index the file. PRIVATE: File is NOT publicly accessible. Requires a signed URL to see content. Search engines can't index the file
- duplicateValidationScope? "ENTIRE_PORTAL"|"EXACT_FOLDER" - ENTIRE_PORTAL: Look for a duplicate file in the entire account. EXACT_FOLDER: Look for a duplicate file in the provided folder
- name? string - Name to give the resulting file in the file manager
- duplicateValidationStrategy? "NONE"|"REJECT"|"RETURN_EXISTING" - NONE: Do not run any duplicate validation. REJECT: Reject the upload if a duplicate is found. RETURN_EXISTING: If a duplicate file is found, do not upload a new file and return the found duplicate instead
- overwrite? boolean - If true, will overwrite existing file if one with the same name and extension exists in the given folder. The overwritten file will be deleted and the uploaded file will take its place with a new ID. If unset or set as false, the new file's name will be updated to prevent colliding with existing file if one exists with the same path, name, and extension
- ttl? string - Time to live. If specified the file will be deleted after the given time frame. If left unset, the file will exist indefinitely
- expiresAt? string - Specifies the date and time when the file will expire
- folderId? string - One of folderId or folderPath is required. Destination folderId for the uploaded file
- url string - URL to download the new file from
hubspot.files: ImportFromUrlTaskLocator
Information on the task that has been started, and where to check it's status
Fields
- links record { string... } - Links for where to check information related to the task. The
statuslink gives the URL for where to check the status of the task
- id string - ID of the task
hubspot.files: NextPage
Specifies the paging information needed to retrieve the next set of results in a paginated API response
Fields
- link? string - A URL that can be used to retrieve the next page results
- after string - A paging cursor token for retrieving subsequent pages
hubspot.files: OAuth2RefreshTokenGrantConfig
OAuth2 Refresh Token Grant Configs
Fields
- Fields Included from *OAuth2RefreshTokenGrantConfig
- refreshUrl string(default "https://api.hubapi.com/oauth/v1/token") - Refresh URL
hubspot.files: Paging
Pagination metadata containing links to the next and previous pages
Fields
- next? NextPage - Specifies the paging information needed to retrieve the next set of results in a paginated API response
- prev? PreviousPage - specifies the paging information needed to retrieve the previous set of results in a paginated API response
hubspot.files: PreviousPage
specifies the paging information needed to retrieve the previous set of results in a paginated API response
Fields
- before string - A paging cursor token for retrieving previous pages
- link? string - A URL that can be used to retrieve the previous pages' results
hubspot.files: SearchFilesQueries
Represents the Queries record for the operation: searchFiles
Fields
- extension? string - Search files by given extension
- updatedAtGte? string - Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range
- before? string - Search files updated before this timestamp. Time must be epoch time in milliseconds
- parentFolderIds? int[] - Filter search results to files contained in these parent folder IDs
- updatedAtLte? string - Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range
- expiresAtLte? string - Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range
- idGte? int - Search files by greater than or equal to ID. Can be used with idLte to create a range
- 'type? string - Search files by file type
- isUsableInContent? boolean - If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content
- expiresAtGte? string - Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range
- createdAt? string - Search files by exact time of creation. Time must be epoch time in milliseconds
- path? string - Search files by path
- 'limit? Signed32 - Number of items to return. Default limit is 10, maximum limit is 100
- after? string - Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit
- createdAtLte? string - Search files by less than or equal to time of creation. Can be used with createdAtGte to create a range
- height? Signed32 - Search files by height of image or video
- updatedAt? string - Search files by exact time of latest updated. Time must be epoch time in milliseconds
- createdAtGte? string - Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range
- sizeLte? int - Search files by less than or equal to file size. Can be used with sizeGte to create a range
- widthGte? Signed32 - Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range
- widthLte? Signed32 - Search files by less than or equal to width of image or video. Can be used with widthGte to create a range
- sizeGte? int - Search files by greater than or equal to file size. Can be used with sizeLte to create a range
- allowsAnonymousAccess? boolean - Search files by access. If 'true' will show only public files; if 'false' will show only private files
- fileMd5? string - Search files by specific md5 hash
- sort? string[] - Sort files by a given field
- encoding? string - Search files by specified encoding
- expiresAt? string - Search files by exact expires time. Time must be epoch time in milliseconds
- url? string - Search for given URL
- heightLte? Signed32 - Search files by less than or equal to height of image or video. Can be used with heightGte to create a range
- idLte? int - Search files by less than or equal to ID. Can be used with idGte to create a range
- size? int - Search files by exact file size in bytes
- heightGte? Signed32 - Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range
- name? string - Search for files containing the given name
- width? Signed32 - Search files by width of image or video
- ids? int[] - Filter search results to files matching these specific file IDs
- properties? string[] - Desired file properties in the return object
hubspot.files: SearchFoldersQueries
Represents the Queries record for the operation: searchFolders
Fields
- createdAtGte? string - Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range
- updatedAtGte? string - Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range
- before? string - Search folders updated before this timestamp. Time must be epoch time in milliseconds
- parentFolderIds? int[] - Filter search results to folders contained within these parent folder IDs
- updatedAtLte? string - Search folders by less than or equal to time of latest update. Can be used with updatedAtGte to create a range
- idGte? int - Search folders by greater than or equal to ID. Can be used with idLte to create a range
- sort? string[] - Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending
- createdAt? string - Search folders by exact time of creation. Time must be epoch time in milliseconds
- path? string - Search folders by path
- idLte? int - Search folders by less than or equal to ID. Can be used with idGte to create a range
- 'limit? Signed32 - Number of items to return. Default limit is 10, maximum limit is 100
- name? string - Search for folders containing the specified name
- ids? int[] - Search folders by multiple IDs. Comma-separated list of folder IDs
- after? string - Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit
- createdAtLte? string - Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range
- properties? string[] - Properties that should be included in the returned folders
- updatedAt? string - Search folders by exact time of latest updated. Time must be epoch time in milliseconds
hubspot.files: SignedUrl
Signed Url object with optional ancillary metadata of requested file
Fields
- extension string - Extension of the requested file
- size int - Size in bytes of the requested file
- name string - Name of the requested file
- width? Signed32 - For image and video files. The width of the file
- 'type string - Type of the file. Can be IMG, DOCUMENT, AUDIO, MOVIE, or OTHER
- expiresAt string - Timestamp of when the URL will no longer grant access to the file
- url string - Signed URL with access to the specified file. Anyone with this URL will be able to access the file until it expires
- height? Signed32 - For image and video files. The height of the file
hubspot.files: StandardError
Represents a standard error response in the HubSpot API, providing detailed information about an error that occurred during an API request
Fields
- subCategory? record {} - A more specific error category within each main category
- context record { string[]... } - Additional context-specific information related to the error
- links record { string... } - URLs linking to documentation or resources associated with the error
- id? string - A unique ID for the error instance
- category string - The main category of the error
- message string - A human-readable string describing the error and possible remediation steps
- errors ErrorDetail[] - The detailed error objects
- status string - The HTTP status code associated with the error
hubspot.files: V3FilesBody
Request body schema for uploading a file to the file manager
Fields
- folderPath? string - Either 'folderPath' or 'folderId' is required. This field represents the destination folder path for the uploaded file. If a path doesn't exist, the system will try to create one
- fileName? string - Desired name for the uploaded file
- file? record { fileContent byte[], fileName string } - File to be uploaded
- options? string - JSON string representing FileUploadOptions
- folderId? string - Either 'folderId' or 'folderPath' is required. folderId is the ID of the folder the file will be uploaded to
- charsetHunch? string - Character set of the uploaded file
Import
import vishwaj/hubspot.files;Other versions
0.1.1
0.1.0Metadata
Released date: 22 days ago
Version: 0.1.1
License: Apache-2.0
Compatibility
Platform: any
Ballerina version: 2201.13.4
GraalVM compatible: Yes
Pull count
Total: 2
Current verison: 1
Weekly downloads
Contributors