# README
Go API client for openapi
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
Overview
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 1.1.1
- Package version: 1.0.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Installation
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import sw "./openapi"
To use a proxy, set the environment variable HTTP_PROXY
:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")
Configuration of Server URL
Default configuration comes with Servers
field that contains server objects as defined in the OpenAPI specification.
Select Server Configuration
For using other server than the one defined on index 0 set context value sw.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), sw.ContextServerIndex, 1)
Templated Server URL
Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), sw.ContextServerVariables, map[string]string{
"basePath": "v2",
})
Note, enum values are always validated and all unused variables are silently ignored.
URLs Configuration per Operation
Each operation can use different server URL defined using OperationServers
map in the Configuration
.
An operation is uniquely identifield by "{classname}Service.{nickname}"
string.
Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices
and sw.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), sw.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), sw.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})
Documentation for API Endpoints
All URIs are relative to https://api.webhook.openweb3.io
Class | Method | HTTP request | Description |
---|---|---|---|
ApplicationApi | GetAppUsageStatsApiV1AppStatsUsageGet | Get /api/v1/app/stats/usage | Get App Usage Stats |
ApplicationApi | V1ApplicationCreate | Post /api/v1/app | Create Application |
ApplicationApi | V1ApplicationDelete | Delete /api/v1/app/{app_id} | Delete Application |
ApplicationApi | V1ApplicationGet | Get /api/v1/app/{app_id} | Get Application |
ApplicationApi | V1ApplicationGetStats | Get /api/v1/app/{app_id}/stats | Get App Stats |
ApplicationApi | V1ApplicationList | Get /api/v1/app | List Applications |
ApplicationApi | V1ApplicationPatch | Patch /api/v1/app/{app_id} | Patch Application |
ApplicationApi | V1ApplicationUpdate | Put /api/v1/app/{app_id} | Update Application |
AuthenticationApi | V1AuthenticationAppPortalAccess | Post /api/v1/auth/app-portal-access/{app_id} | Get Consumer App Portal Access |
AuthenticationApi | V1AuthenticationDashboardAccess | Post /api/v1/auth/dashboard-access/{app_id} | Dashboard Access |
AuthenticationApi | V1AuthenticationExchangeOneTimeToken | Post /api/v1/auth/one-time-token | Exchange One Time Token |
AuthenticationApi | V1AuthenticationExpireAll | Post /api/v1/auth/app/{app_id}/expire-all | Expire All |
AuthenticationApi | V1AuthenticationLogout | Post /api/v1/auth/logout | Logout |
BackgroundTasksApi | GetBackgroundTask | Get /api/v1/background-task/{task_id} | Get Background Task |
BackgroundTasksApi | ListBackgroundTasks | Get /api/v1/background-task | List Background Tasks |
BroadcastApi | CreateBroadcastMessage | Post /api/v1/msg/broadcast | Create Broadcast Message |
EndpointApi | V1EndpointCreate | Post /api/v1/app/{app_id}/endpoint | Create Endpoint |
EndpointApi | V1EndpointDelete | Delete /api/v1/app/{app_id}/endpoint/{endpoint_id} | Delete Endpoint |
EndpointApi | V1EndpointDeleteMtlsConfig | Delete /api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls | Delete Endpoint Mtls Config |
EndpointApi | V1EndpointDeleteOauthConfig | Delete /api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth | Delete Endpoint Oauth Config |
EndpointApi | V1EndpointGet | Get /api/v1/app/{app_id}/endpoint/{endpoint_id} | Get Endpoint |
EndpointApi | V1EndpointGetHeaders | Get /api/v1/app/{app_id}/endpoint/{endpoint_id}/headers | Get Endpoint Headers |
EndpointApi | V1EndpointGetSecret | Get /api/v1/app/{app_id}/endpoint/{endpoint_id}/secret | Get Endpoint Secret |
EndpointApi | V1EndpointGetStats | Get /api/v1/app/{app_id}/endpoint/{endpoint_id}/stats | Endpoint Stats |
EndpointApi | V1EndpointList | Get /api/v1/app/{app_id}/endpoint | List Endpoints |
EndpointApi | V1EndpointPatch | Patch /api/v1/app/{app_id}/endpoint/{endpoint_id} | Patch Endpoint |
EndpointApi | V1EndpointPatchHeaders | Patch /api/v1/app/{app_id}/endpoint/{endpoint_id}/headers | Patch Endpoint Headers |
EndpointApi | V1EndpointRecover | Post /api/v1/app/{app_id}/endpoint/{endpoint_id}/recover | Recover Failed Webhooks |
EndpointApi | V1EndpointReplay | Post /api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing | Replay Missing Webhooks |
EndpointApi | V1EndpointRotateSecret | Post /api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate | Rotate Endpoint Secret |
EndpointApi | V1EndpointSendExample | Post /api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example | Send Event Type Example Message |
EndpointApi | V1EndpointTransformationGet | Get /api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation | Get Endpoint Transformation |
EndpointApi | V1EndpointTransformationPartialUpdate | Patch /api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation | Set Endpoint Transformation |
EndpointApi | V1EndpointTransformationSimulate | Post /api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation/simulate | Simulate |
EndpointApi | V1EndpointUpdate | Put /api/v1/app/{app_id}/endpoint/{endpoint_id} | Update Endpoint |
EndpointApi | V1EndpointUpdateHeaders | Put /api/v1/app/{app_id}/endpoint/{endpoint_id}/headers | Update Endpoint Headers |
EndpointApi | V1EndpointUpdateMtlsConfig | Put /api/v1/app/{app_id}/endpoint/{endpoint_id}/mtls | Update Endpoint Mtls Config |
EndpointApi | V1EndpointUpdateOauthConfig | Put /api/v1/app/{app_id}/endpoint/{endpoint_id}/oauth | Update Endpoint Oauth Config |
EnvironmentApi | V1EnvironmentExport | Post /api/v1/environment/export | Export Environment Configuration |
EnvironmentApi | V1EnvironmentExportGet | Get /api/v1/environment/export | Export Environment Configuration |
EnvironmentApi | V1EnvironmentImport | Post /api/v1/environment/import | Import Environment Configuration |
EnvironmentSettingsApi | V1EnvironmentGetSettings | Get /api/v1/environment/settings | Get Org Settings |
EventTypeApi | V1EventTypeCreate | Post /api/v1/event-type | Create Event Type |
EventTypeApi | V1EventTypeDelete | Delete /api/v1/event-type/{event_type_name} | Delete Event Type |
EventTypeApi | V1EventTypeExportOpenapi | Post /api/v1/event-type/export/openapi | Event Type Export From Openapi |
EventTypeApi | V1EventTypeGenerateExample | Post /api/v1/event-type/schema/generate-example | Generate Schema Example |
EventTypeApi | V1EventTypeGet | Get /api/v1/event-type/{event_type_name} | Get Event Type |
EventTypeApi | V1EventTypeGetRetrySchedule | Get /api/v1/event-type/{event_type_name}/retry-schedule | Get Retry Schedule |
EventTypeApi | V1EventTypeImportOpenapi | Post /api/v1/event-type/import/openapi | Event Type Import From Openapi |
EventTypeApi | V1EventTypeList | Get /api/v1/event-type | List Event Types |
EventTypeApi | V1EventTypePatch | Patch /api/v1/event-type/{event_type_name} | Patch Event Type |
EventTypeApi | V1EventTypeUpdate | Put /api/v1/event-type/{event_type_name} | Update Event Type |
EventTypeApi | V1EventTypeUpdateRetrySchedule | Put /api/v1/event-type/{event_type_name}/retry-schedule | Update Retry Schedule |
EventsApi | V1Events | Get /api/v1/events | Events |
HealthApi | V1HealthGet | Get /api/v1/health | Health |
InboundApi | V1InboundMsg | Post /api/v1/app/{app_id}/inbound/msg/{inbound_token} | Handle Inbound |
InboundApi | V1InboundRotateUrl | Post /api/v1/app/{app_id}/inbound/rotate-url | Rotate Url |
IntegrationApi | V1IntegrationCreate | Post /api/v1/app/{app_id}/integration | Create Integration |
IntegrationApi | V1IntegrationDelete | Delete /api/v1/app/{app_id}/integration/{integ_id} | Delete Integration |
IntegrationApi | V1IntegrationGet | Get /api/v1/app/{app_id}/integration/{integ_id} | Get Integration |
IntegrationApi | V1IntegrationGetKey | Get /api/v1/app/{app_id}/integration/{integ_id}/key | Get Integration Key |
IntegrationApi | V1IntegrationList | Get /api/v1/app/{app_id}/integration | List Integrations |
IntegrationApi | V1IntegrationRotateKey | Post /api/v1/app/{app_id}/integration/{integ_id}/key/rotate | Rotate Integration Key |
IntegrationApi | V1IntegrationUpdate | Put /api/v1/app/{app_id}/integration/{integ_id} | Update Integration |
MessageApi | CreateMessageAttemptForEndpoint | Post /api/v1/app/{app_id}/endpoint/{endpoint_id}/msg/test-attempt | Create Message Attempt For Endpoint |
MessageApi | V1MessageCreate | Post /api/v1/app/{app_id}/msg | Create Message |
MessageApi | V1MessageExpungeContent | Delete /api/v1/app/{app_id}/msg/{msg_id}/content | Delete message payload |
MessageApi | V1MessageGet | Get /api/v1/app/{app_id}/msg/{msg_id} | Get Message |
MessageApi | V1MessageGetRawPayload | Get /api/v1/app/{app_id}/msg/{msg_id}/raw | Get Raw Message Payload |
MessageApi | V1MessageList | Get /api/v1/app/{app_id}/msg | List Messages |
MessageApi | V1MessageStream | Get /api/v1/app/{app_id}/events | Stream Events |
MessageAttemptApi | V1MessageAttemptExpungeContent | Delete /api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content | Delete attempt response body |
MessageAttemptApi | V1MessageAttemptGet | Get /api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id} | Get Attempt |
MessageAttemptApi | V1MessageAttemptGetHeaders | Get /api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/headers | Get Attempt Headers |
MessageAttemptApi | V1MessageAttemptListAttemptedDestinations | Get /api/v1/app/{app_id}/msg/{msg_id}/endpoint | List Attempted Destinations |
MessageAttemptApi | V1MessageAttemptListAttemptedMessages | Get /api/v1/app/{app_id}/endpoint/{endpoint_id}/msg | List Attempted Messages |
MessageAttemptApi | V1MessageAttemptListByEndpoint | Get /api/v1/app/{app_id}/attempt/endpoint/{endpoint_id} | List Attempts By Endpoint |
MessageAttemptApi | V1MessageAttemptListByEndpointDeprecated | Get /api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/attempt | List Attempts For Endpoint |
MessageAttemptApi | V1MessageAttemptListByMsg | Get /api/v1/app/{app_id}/attempt/msg/{msg_id} | List Attempts By Msg |
MessageAttemptApi | V1MessageAttemptListByMsgDeprecated | Get /api/v1/app/{app_id}/msg/{msg_id}/attempt | List Attempts |
MessageAttemptApi | V1MessageAttemptResend | Post /api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend | Resend Webhook |
StatisticsApi | V1StatisticsAggregateAppStats | Post /api/v1/stats/usage/app | Aggregate App Stats |
StatisticsApi | V1StatisticsAggregateEventTypes | Put /api/v1/stats/usage/event-types | Aggregate Event Types |
StatisticsApi | V1StatsAppAttempts | Get /api/v1/stats/app/{app_id}/attempt | Get App Attempt Stats |
StatisticsApi | V1StatsEndpointAttempts | Get /api/v1/stats/app/{app_id}/ep/{endpoint_id}/attempt | Get Ep Stats |
TransformationTemplateApi | V1EndpointUpdateHubspotOauthConfig | Put /api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation-template/oauth/hubspot | Update Hubspot Oauth Config |
TransformationTemplateApi | V1TransformationTemplateCreate | Post /api/v1/transformation-template | Create Transformation Template |
TransformationTemplateApi | V1TransformationTemplateDelete | Delete /api/v1/transformation-template/{transformation_template_id} | Delete Transformation Template |
TransformationTemplateApi | V1TransformationTemplateGenerate | Post /api/v1/transformation-template/generate | Generate |
TransformationTemplateApi | V1TransformationTemplateGet | Get /api/v1/transformation-template/{transformation_template_id} | Get Transformation Template |
TransformationTemplateApi | V1TransformationTemplateList | Get /api/v1/transformation-template | List Transformation Templates |
TransformationTemplateApi | V1TransformationTemplateOauthDiscord | Post /api/v1/transformation-template/oauth/discord | Authorize Discord |
TransformationTemplateApi | V1TransformationTemplateOauthHubspot | Post /api/v1/transformation-template/oauth/hubspot | Authorize Hubspot |
TransformationTemplateApi | V1TransformationTemplateOauthSlack | Post /api/v1/transformation-template/oauth/slack | Authorize Slack |
TransformationTemplateApi | V1TransformationTemplatePatch | Patch /api/v1/transformation-template/{transformation_template_id} | Patch Transformation Template |
TransformationTemplateApi | V1TransformationTemplateSimulate | Post /api/v1/transformation-template/simulate | Simulate |
TransformationTemplateApi | V1TransformationTemplateUpdate | Put /api/v1/transformation-template/{transformation_template_id} | Update Transformation Template |
Documentation For Models
- AggregateEventTypesOut
- AppPortalAccessIn
- AppPortalAccessOut
- AppUsageStatsIn
- AppUsageStatsOut
- ApplicationIn
- ApplicationOut
- ApplicationPatch
- ApplicationStats
- ApplicationTokenExpireIn
- AttemptStatisticsData
- AttemptStatisticsResponse
- BackgroundTaskOut
- BackgroundTaskStatus
- BackgroundTaskType
- BorderRadiusConfig
- BorderRadiusEnum
- ClientSecretJwtParamsIn
- CompletionChoice
- CompletionMessage
- CustomColorPalette
- CustomThemeOverride
- DashboardAccessOut
- Duration
- EndpointCreatedEvent
- EndpointCreatedEventData
- EndpointDeletedEvent
- EndpointDeletedEventData
- EndpointDisabledEvent
- EndpointDisabledEventData
- EndpointHeadersIn
- EndpointHeadersOut
- EndpointHeadersPatchIn
- EndpointIn
- EndpointMessageOut
- EndpointMtlsConfigIn
- EndpointOauthConfigIn
- EndpointOut
- EndpointPatch
- EndpointSecretOut
- EndpointSecretRotateIn
- EndpointStats
- EndpointTransformationIn
- EndpointTransformationOut
- EndpointTransformationSimulateIn
- EndpointTransformationSimulateOut
- EndpointUpdate
- EndpointUpdatedEvent
- EndpointUpdatedEventData
- EnvironmentIn
- EnvironmentOut
- EnvironmentSettingsOut
- EventExampleIn
- EventTypeExampleOut
- EventTypeFromOpenApi
- EventTypeImportOpenApiIn
- EventTypeImportOpenApiOut
- EventTypeImportOpenApiOutData
- EventTypeIn
- EventTypeOut
- EventTypePatch
- EventTypeSchemaIn
- EventTypeUpdate
- ExportEventTypeOut
- FontSizeConfig
- GenerateIn
- GenerateOut
- HTTPValidationError
- HttpErrorOut
- HubspotOauthConfigIn
- InboundPathParams
- IncomingWebhookPayloadOut
- IntegrationIn
- IntegrationKeyOut
- IntegrationOut
- IntegrationUpdate
- ListResponseApplicationOut
- ListResponseApplicationStats
- ListResponseBackgroundTaskOut
- ListResponseEndpointMessageOut
- ListResponseEndpointOut
- ListResponseEventTypeOut
- ListResponseIntegrationOut
- ListResponseMessageAttemptEndpointOut
- ListResponseMessageAttemptOut
- ListResponseMessageEndpointOut
- ListResponseMessageOut
- ListResponseTemplateOut
- MessageAttemptEndpointOut
- MessageAttemptExhaustedEvent
- MessageAttemptExhaustedEventData
- MessageAttemptFailedData
- MessageAttemptFailingEvent
- MessageAttemptFailingEventData
- MessageAttemptHeadersOut
- MessageAttemptOut
- MessageAttemptRecoveredEvent
- MessageAttemptRecoveredEventData
- MessageAttemptTriggerType
- MessageBroadcastIn
- MessageBroadcastOut
- MessageEndpointOut
- MessageIn
- MessageOut
- MessageRawPayloadOut
- MessageStatus
- MessageStreamOut
- OAuthPayloadIn
- OAuthPayloadOut
- Oauth2AuthMethodIn
- Oauth2GrantTypeIn
- OauthJwsSigningAlgorithm
- OneTimeTokenIn
- OneTimeTokenOut
- Ordering
- RecoverIn
- RecoverOut
- ReplayIn
- ReplayOut
- RetryScheduleInOut
- RotatedUrlOut
- SettingsIn
- SettingsOut
- StatisticsPeriod
- StatusCodeClass
- TemplateIn
- TemplateOut
- TemplatePatch
- TemplateUpdate
- TransformationHttpMethod
- TransformationSimulateIn
- TransformationSimulateOut
- TransformationTemplateKind
- ValidationError
Documentation For Authorization
HTTPBearer
- Type: HTTP Bearer token authentication
Example
auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARERTOKENSTRING")
r, err := client.Service.Operation(auth, args)
Documentation for Utility Methods
Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime