openapi: 3.1.0 info: title: HubSpot Analytics Events Access Tokens File Metadata API description: "The HubSpot Analytics Events API allows you to retrieve event completion data \nfrom your HubSpot account. Use this API to query event instances associated with \nCRM objects, filter by event types, and analyze user behavior and engagement patterns.\n\n## Key Features\n- Retrieve event instances for CRM objects\n- Filter events by type, date range, and object\n- Paginate through large result sets\n- Query available event types\n" version: 3.0.0 contact: name: HubSpot Developer Support url: https://developers.hubspot.com license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: https://api.hubapi.com description: HubSpot Production API Server tags: - name: File Metadata description: Operations for retrieving file and folder metadata paths: /cms/v3/source-code/{environment}/metadata/{path}: get: tags: - File Metadata summary: Hubspot Retrieve File or Folder Metadata description: 'Retrieves metadata for a file or folder at the specified path in the specified environment. For folders, includes a list of child files and subfolders. ' operationId: getSourceCodeMetadata x-microcks-operation: dispatcher: SCRIPT dispatcherRules: 'def result = "AssetFileMetadataSuccessExample" return result ' parameters: - $ref: '#/components/parameters/EnvironmentPath' example: example-value - $ref: '#/components/parameters/FilePathPath' example: example-value - $ref: '#/components/parameters/PropertiesQuery' example: example-value responses: '200': description: Successfully retrieved metadata content: application/json: schema: $ref: '#/components/schemas/AssetFileMetadata' examples: AssetFileMetadataSuccessExample: $ref: '#/components/examples/AssetFileMetadataSuccessExample' FolderMetadataSuccessExample: $ref: '#/components/examples/FolderMetadataSuccessExample' default: $ref: '#/components/responses/ErrorResponse' security: - privateApps: - content - oauth2: - content x-hubspot-rate-limit-exemptions: - ten-secondly components: parameters: FilePathPath: name: path in: path required: true description: The file system path to the file or folder schema: type: string pattern: .+ example: templates/blog/post.html PropertiesQuery: name: properties in: query required: false description: Specific properties to include in the response schema: type: string example: name,folder EnvironmentPath: name: environment in: path required: true description: The target environment for the operation (draft or published) schema: type: string enum: - draft - published example: draft schemas: ErrorDetail: type: object description: Detailed error information required: - message properties: message: type: string description: Error message example: Required property 'path' is missing code: type: string description: Error code example: MISSING_REQUIRED_PROPERTY subCategory: type: string description: Error subcategory example: standard in: type: string description: Location of the error example: body context: type: object description: Additional context additionalProperties: type: array items: type: string example: missingScopes: - scope1 - scope2 Error: type: object description: Standard error response required: - category - correlationId - message properties: category: type: string description: Error category example: VALIDATION_ERROR correlationId: type: string format: uuid description: Unique identifier for error tracking example: aeb5f871-7f07-4993-9211-075dc63e7cbf message: type: string description: Human-readable error message example: Invalid input (details will vary based on the error) subCategory: type: string description: Specific error subcategory example: standard context: type: object description: Additional error context additionalProperties: type: array items: type: string example: missingScopes: - scope1 - scope2 invalidPropertyName: - propertyValue links: type: object description: Links to relevant documentation additionalProperties: type: string example: knowledge-base: https://www.hubspot.com/products/service/knowledge-base errors: type: array description: Detailed error information items: $ref: '#/components/schemas/ErrorDetail' example: - message: Required property 'path' is missing code: MISSING_REQUIRED_PROPERTY subCategory: standard in: body context: missingScopes: - scope1 - scope2 AssetFileMetadata: type: object description: Metadata for a file or folder in the CMS Developer File System required: - id - name - folder - createdAt - updatedAt properties: id: type: string description: The full path of the file in the CMS Developer File System example: templates/blog/post.html name: type: string description: The name of the file or folder example: post.html folder: type: boolean description: Whether this path represents a folder (true) or file (false) example: false children: type: array description: List of child files and folders (only present for folders) items: type: string example: - header.html - footer.html - sidebar.html hash: type: string description: Content hash for change detection example: a1b2c3d4e5f6 createdAt: type: integer format: int64 description: Unix timestamp when the file was created example: 1705312200000 updatedAt: type: integer format: int64 description: Unix timestamp when the file was last updated example: 1705398600000 archivedAt: type: integer format: int64 description: Unix timestamp when the file was archived (if applicable) example: 0 responses: ErrorResponse: description: An error occurred content: application/json: schema: $ref: '#/components/schemas/Error' examples: ValidationErrorExample: $ref: '#/components/examples/ValidationErrorResponseExample' NotFoundErrorExample: $ref: '#/components/examples/NotFoundErrorExample' examples: NotFoundErrorExample: summary: Not found error response description: Example error response when file is not found value: category: OBJECT_NOT_FOUND correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf message: 'File not found at path: templates/missing.html' links: knowledge-base: https://www.hubspot.com/products/service/knowledge-base AssetFileMetadataSuccessExample: summary: Successful file metadata response description: Example metadata for a template file value: id: templates/blog/post.html name: post.html folder: false hash: a1b2c3d4e5f6 createdAt: 1705312200000 updatedAt: 1705398600000 ValidationErrorResponseExample: summary: Validation error response description: Example error response for invalid input value: category: VALIDATION_ERROR correlationId: aeb5f871-7f07-4993-9211-075dc63e7cbf message: Invalid input (details will vary based on the error) context: missingScopes: - scope1 - scope2 links: knowledge-base: https://www.hubspot.com/products/service/knowledge-base FolderMetadataSuccessExample: summary: Successful folder metadata response description: Example metadata for a folder with children value: id: templates/blog name: blog folder: true children: - post.html - listing.html - author.html createdAt: 1705312200000 updatedAt: 1705398600000 securitySchemes: OAuth2: type: oauth2 flows: authorizationCode: authorizationUrl: https://app.hubspot.com/oauth/authorize tokenUrl: https://api.hubapi.com/oauth/v1/token scopes: analytics.read: Read analytics data