All URIs are relative to https://api.hubapi.com
Method | HTTP request | Description |
---|---|---|
BatchCreate | Post /crm/v3/timeline/events/batch/create | Creates multiple events |
Create | Post /crm/v3/timeline/events | Create a single event |
GetByID | Get /crm/v3/timeline/events/{eventTemplateId}/{eventId} | Gets the event |
GetDetailByID | Get /crm/v3/timeline/events/{eventTemplateId}/{eventId}/detail | Gets the detailTemplate as rendered |
GetRenderByID | Get /crm/v3/timeline/events/{eventTemplateId}/{eventId}/render | Renders the header or detail as HTML |
BatchResponseTimelineEventResponse BatchCreate(ctx).BatchInputTimelineEvent(batchInputTimelineEvent).Execute()
Creates multiple events
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
batchInputTimelineEvent := *openapiclient.NewBatchInputTimelineEvent([]openapiclient.TimelineEvent{*openapiclient.NewTimelineEvent("EventTemplateId_example", map[string]string{"key": "Inner_example"})}) // BatchInputTimelineEvent | The timeline event definition.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EventsApi.BatchCreate(context.Background()).BatchInputTimelineEvent(batchInputTimelineEvent).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.BatchCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `BatchCreate`: BatchResponseTimelineEventResponse
fmt.Fprintf(os.Stdout, "Response from `EventsApi.BatchCreate`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiBatchCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
batchInputTimelineEvent | BatchInputTimelineEvent | The timeline event definition. |
BatchResponseTimelineEventResponse
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: application/json
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TimelineEventResponse Create(ctx).TimelineEvent(timelineEvent).Execute()
Create a single event
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
timelineEvent := *openapiclient.NewTimelineEvent("EventTemplateId_example", map[string]string{"key": "Inner_example"}) // TimelineEvent | The timeline event definition.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EventsApi.Create(context.Background()).TimelineEvent(timelineEvent).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.Create``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Create`: TimelineEventResponse
fmt.Fprintf(os.Stdout, "Response from `EventsApi.Create`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
timelineEvent | TimelineEvent | The timeline event definition. |
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: application/json
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TimelineEventResponse GetByID(ctx, eventTemplateId, eventId).Execute()
Gets the event
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
eventTemplateId := "eventTemplateId_example" // string | The event template ID.
eventId := "eventId_example" // string | The event ID.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EventsApi.GetByID(context.Background(), eventTemplateId, eventId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetByID``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetByID`: TimelineEventResponse
fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetByID`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
eventTemplateId | string | The event template ID. | |
eventId | string | The event ID. |
Other parameters are passed through a pointer to a apiGetByIDRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: Not defined
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EventDetail GetDetailByID(ctx, eventTemplateId, eventId).Execute()
Gets the detailTemplate as rendered
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
eventTemplateId := "eventTemplateId_example" // string | The event template ID.
eventId := "eventId_example" // string | The event ID.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EventsApi.GetDetailByID(context.Background(), eventTemplateId, eventId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetDetailByID``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetDetailByID`: EventDetail
fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetDetailByID`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
eventTemplateId | string | The event template ID. | |
eventId | string | The event ID. |
Other parameters are passed through a pointer to a apiGetDetailByIDRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: Not defined
- Accept: application/json, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string GetRenderByID(ctx, eventTemplateId, eventId).Detail(detail).Execute()
Renders the header or detail as HTML
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
eventTemplateId := "eventTemplateId_example" // string | The event template ID.
eventId := "eventId_example" // string | The event ID.
detail := true // bool | Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.EventsApi.GetRenderByID(context.Background(), eventTemplateId, eventId).Detail(detail).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `EventsApi.GetRenderByID``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRenderByID`: string
fmt.Fprintf(os.Stdout, "Response from `EventsApi.GetRenderByID`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
eventTemplateId | string | The event template ID. | |
eventId | string | The event ID. |
Other parameters are passed through a pointer to a apiGetRenderByIDRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
detail | bool | Set to 'true', we want to render the `detailTemplate` instead of the `headerTemplate`. |
string
oauth2, oauth2_legacy, private_apps, private_apps_legacy
- Content-Type: Not defined
- Accept: text/html, /
[Back to top] [Back to API list] [Back to Model list] [Back to README]