hubspot.files
Module hubspot.files
API
Definitions
vishwaj/hubspot.files
hubspot.files Connector
Overview
HubSpot is a leading CRM platform that provides tools for marketing, sales, customer service, and content management, helping businesses grow by centralizing their customer data and workflows.
The ballerinax/hubspot.files package offers APIs to connect and interact with the 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 private app creation is available on all HubSpot plans, including the free tier; however, certain advanced file management features and higher API rate limits are restricted to users on Starter, Professional, or Enterprise plans.
Step 2: Generate a Private App Access Token
-
Log in to your HubSpot account.
-
In the main navigation, click the Settings icon (gear icon) in the top right corner of the page.
-
In the left sidebar menu, scroll down and navigate to Integrations > Private Apps.
-
Click Create a private app in the top right corner.
-
On the Basic Info tab, provide a name and description for your private app.
-
Navigate to the Scopes tab and select the required scopes for the Files connector. Search for and enable the relevant scopes such as
filesandfiles.ui_hidden.readto allow read and write access to the HubSpot Files tool. -
Click Create app in the top right corner, then confirm by clicking Continue creating in the dialog that appears.
-
After the app is created, your access token will be displayed. Click Copy to copy the token to your clipboard.
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 hubspotfiles;
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
hubspotfiles:ConnectionConfigand initialize the client:
configurable string clientId = ?; configurable string clientSecret = ?; configurable string refreshToken = ?; final hubspotfiles:Client hubspotFilesClient = 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? { hubspotfiles:FolderInput newFolder = { name: "Marketing Assets", parentPath: "/campaigns" }; hubspotfiles:Folder response = check hubspotFilesClient->postFilesV3FoldersCreate(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
postFilesV3FilesUpload
function postFilesV3FilesUpload(V3FilesBody payload, map<string|string[]> headers) returns File|errorUpload file
Parameters
- payload V3FilesBody -
postFilesV3FilesImportFromUrlAsyncImportFromUrl
function postFilesV3FilesImportFromUrlAsyncImportFromUrl(ImportFromUrlInput payload, map<string|string[]> headers) returns ImportFromUrlTaskLocator|errorImport file from URL
Parameters
- payload ImportFromUrlInput -
Return Type
- ImportFromUrlTaskLocator|error - accepted
getFilesV3FilesImportFromUrlAsyncTasksTaskIdStatusCheckImport
function getFilesV3FilesImportFromUrlAsyncTasksTaskIdStatusCheckImport(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
getFilesV3FilesSearchDoSearch
function getFilesV3FilesSearchDoSearch(map<string|string[]> headers, *GetFilesV3FilesSearchDoSearchQueries queries) returns CollectionResponseFile|errorSearch files
Parameters
- queries *GetFilesV3FilesSearchDoSearchQueries - Queries to be sent with the request
Return Type
- CollectionResponseFile|error - successful operation
getFilesV3FilesStatPathGetMetadata
function getFilesV3FilesStatPathGetMetadata(string path, map<string|string[]> headers, *GetFilesV3FilesStatPathGetMetadataQueries queries) returns FileStat|errorRetrieve file by path
Parameters
- path string - The full path of the file for which to retrieve metadata. Required
- queries *GetFilesV3FilesStatPathGetMetadataQueries - Queries to be sent with the request
getFilesV3FilesFileIdGetById
function getFilesV3FilesFileIdGetById(string fileId, map<string|string[]> headers, *GetFilesV3FilesFileIdGetByIdQueries queries) returns File|errorRetrieve file by ID
Parameters
- fileId string - ID of the desired file
- queries *GetFilesV3FilesFileIdGetByIdQueries - Queries to be sent with the request
putFilesV3FilesFileIdReplace
function putFilesV3FilesFileIdReplace(string fileId, FilesfileIdBody payload, map<string|string[]> headers) returns File|errorReplace file
deleteFilesV3FilesFileIdArchive
function deleteFilesV3FilesFileIdArchive(string fileId, map<string|string[]> headers) returns error?Delete file by ID
Parameters
- fileId string - FileId to delete
Return Type
- error? - No content
patchFilesV3FilesFileIdUpdateProperties
function patchFilesV3FilesFileIdUpdateProperties(string fileId, FileUpdateInput payload, map<string|string[]> headers) returns File|errorUpdate file properties
getFilesV3FilesFileIdDownloadFilesV3FilesFileIdDownload
function getFilesV3FilesFileIdDownloadFilesV3FilesFileIdDownload(string fileId, map<string|string[]> headers) returns Response|errorDownload a file by ID
Parameters
- fileId string - The unique numeric ID of the file to download. Required
deleteFilesV3FilesFileIdGdprDeleteDelete
function deleteFilesV3FilesFileIdGdprDeleteDelete(string fileId, map<string|string[]> headers) returns error?GDPR-delete file
Parameters
- fileId string - ID of file to GDPR delete
Return Type
- error? - No content
getFilesV3FilesFileIdSignedUrlGetSignedUrl
function getFilesV3FilesFileIdSignedUrlGetSignedUrl(string fileId, map<string|string[]> headers, *GetFilesV3FilesFileIdSignedUrlGetSignedUrlQueries queries) returns SignedUrl|errorGet signed URL to access private file
Parameters
- fileId string - ID of file
- queries *GetFilesV3FilesFileIdSignedUrlGetSignedUrlQueries - Queries to be sent with the request
postFilesV3FoldersCreate
function postFilesV3FoldersCreate(FolderInput payload, map<string|string[]> headers) returns Folder|errorCreate folder
Parameters
- payload FolderInput - Folder creation options
getFilesV3FoldersSearchDoSearch
function getFilesV3FoldersSearchDoSearch(map<string|string[]> headers, *GetFilesV3FoldersSearchDoSearchQueries queries) returns CollectionResponseFolder|errorSearch folders
Parameters
- queries *GetFilesV3FoldersSearchDoSearchQueries - Queries to be sent with the request
Return Type
- CollectionResponseFolder|error - successful operation
postFilesV3FoldersUpdateAsyncUpdatePropertiesRecursively
function postFilesV3FoldersUpdateAsyncUpdatePropertiesRecursively(FolderUpdateInputWithId payload, map<string|string[]> headers) returns FolderUpdateTaskLocator|errorUpdate folder properties
Parameters
- payload FolderUpdateInputWithId -
Return Type
- FolderUpdateTaskLocator|error - accepted
getFilesV3FoldersUpdateAsyncTasksTaskIdStatusCheckUpdateStatus
function getFilesV3FoldersUpdateAsyncTasksTaskIdStatusCheckUpdateStatus(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
getFilesV3FoldersFolderIdGetById
function getFilesV3FoldersFolderIdGetById(string folderId, map<string|string[]> headers, *GetFilesV3FoldersFolderIdGetByIdQueries queries) returns Folder|errorRetrieve folder by ID
Parameters
- folderId string - ID of desired folder
- queries *GetFilesV3FoldersFolderIdGetByIdQueries - Queries to be sent with the request
deleteFilesV3FoldersFolderIdArchive
function deleteFilesV3FoldersFolderIdArchive(string folderId, map<string|string[]> headers) returns error?Delete folder by ID
Parameters
- folderId string - ID of folder to delete
Return Type
- error? - No content
patchFilesV3FoldersFolderIdUpdateProperties
function patchFilesV3FoldersFolderIdUpdateProperties(string folderId, FolderUpdateInput payload, map<string|string[]> headers) returns Folder|errorUpdate folder properties by folder ID
getFilesV3FoldersFolderPathGetByPath
function getFilesV3FoldersFolderPathGetByPath(string folderPath, map<string|string[]> headers, *GetFilesV3FoldersFolderPathGetByPathQueries queries) returns Folder|errorRetrieve folder by path
Parameters
- folderPath string - Path of desired folder
- queries *GetFilesV3FoldersFolderPathGetByPathQueries - Queries to be sent with the request
deleteFilesV3FoldersFolderPathArchiveByPath
function deleteFilesV3FoldersFolderPathArchiveByPath(string folderPath, map<string|string[]> headers) returns error?Delete folder by path
Parameters
- folderPath string - Path of folder to delete
Return Type
- error? - No content
Records
hubspot.files: AnydataDefault
Fields
- Fields Included from *DefaultStatusCodeResponse
- body anydata -
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
Paginated collection response containing an array of folder objects
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 message and context
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 for replacing an existing file. Includes the new file data, optional replacement options such as access and expiration settings, and the file character set
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 by path or ID
Fields
- file? File - File
- folder? Folder - Represents a file manager folder with its metadata and hierarchy details
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 expires
hubspot.files: Folder
Represents a file manager folder with its metadata and hierarchy details
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 file manager folder with its metadata and hierarchy details
- 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 an existing folder, identified by its unique ID. Supports renaming the folder or moving it to a new parent location
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: FolderUpdateTaskLocatorAccepted
Fields
- Fields Included from *Accepted
- body FolderUpdateTaskLocator -
hubspot.files: GetFilesV3FilesFileIdGetByIdQueries
Represents the Queries record for the operation: getFilesV3FilesFileIdGetById
Fields
- properties? string[] - Comma-separated list of file properties to include in the response
hubspot.files: GetFilesV3FilesFileIdSignedUrlGetSignedUrlQueries
Represents the Queries record for the operation: getFilesV3FilesFileIdSignedUrlGetSignedUrl
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: GetFilesV3FilesSearchDoSearchQueries
Represents the Queries record for the operation: getFilesV3FilesSearchDoSearch
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 located within 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: GetFilesV3FilesStatPathGetMetadataQueries
Represents the Queries record for the operation: getFilesV3FilesStatPathGetMetadata
Fields
- properties? string[] - Comma-separated list of file properties to include in the response
hubspot.files: GetFilesV3FoldersFolderIdGetByIdQueries
Represents the Queries record for the operation: getFilesV3FoldersFolderIdGetById
Fields
- properties? string[] - Properties to set on returned folder
hubspot.files: GetFilesV3FoldersFolderPathGetByPathQueries
Represents the Queries record for the operation: getFilesV3FoldersFolderPathGetByPath
Fields
- properties? string[] - Properties to set on returned folder
hubspot.files: GetFilesV3FoldersSearchDoSearchQueries
Represents the Queries record for the operation: getFilesV3FoldersSearchDoSearch
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 located 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: ImportFromUrlInput
Input for importing a file from an external URL into the file manager
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: ImportFromUrlTaskLocatorAccepted
Fields
- Fields Included from *Accepted
- body ImportFromUrlTaskLocator -
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: 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 for uploading a file, including destination folder and options
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.0
Metadata
Released date: 26 days ago
Version: 0.1.0
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