All URIs are relative to https://up.go-adserver.com
| Method | HTTP request | Description |
|---|---|---|
| ApiV1EventsGet | Get /api/v1/events | Read the account's event feed. |
| ApiV1WebhooksGet | Get /api/v1/webhooks | List webhooks. |
| ApiV1WebhooksIdDelete | Delete /api/v1/webhooks/{id} | Remove a webhook. |
| ApiV1WebhooksIdDeliveriesDeliveryRedeliverPost | Post /api/v1/webhooks/{id}/deliveries/{delivery}/redeliver | Send a delivery again. |
| ApiV1WebhooksIdDeliveriesGet | Get /api/v1/webhooks/{id}/deliveries | List a webhook's deliveries. |
| ApiV1WebhooksIdGet | Get /api/v1/webhooks/{id} | Get one webhook. |
| ApiV1WebhooksIdPatch | Patch /api/v1/webhooks/{id} | Edit, pause or resume a webhook. |
| ApiV1WebhooksIdRotateSecretPost | Post /api/v1/webhooks/{id}/rotate-secret | Issue a new signing secret. |
| ApiV1WebhooksIdTestPost | Post /api/v1/webhooks/{id}/test | Send a test ping. |
| ApiV1WebhooksPost | Post /api/v1/webhooks | Create a webhook. |
ApiV1EventsGet200Response ApiV1EventsGet(ctx).Since(since).Types(types).Limit(limit).Execute()
Read the account's event feed.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
since := "since_example" // string | Cursor from `next_cursor`, `now`, or omit for the whole 7 days. (optional)
types := "types_example" // string | Comma-separated event types to keep, e.g. `campaign.paused,ad.rejected`. (optional)
limit := int32(56) // int32 | (optional) (default to 100)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1EventsGet(context.Background()).Since(since).Types(types).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1EventsGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1EventsGet`: ApiV1EventsGet200Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1EventsGet`: %v\n", resp)
}Other parameters are passed through a pointer to a apiApiV1EventsGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| since | string | Cursor from `next_cursor`, `now`, or omit for the whole 7 days. | |
| types | string | Comma-separated event types to keep, e.g. `campaign.paused,ad.rejected`. | |
| limit | int32 | [default to 100] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksGet200Response ApiV1WebhooksGet(ctx).Execute()
List webhooks.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksGet(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksGet`: ApiV1WebhooksGet200Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksGet`: %v\n", resp)
}This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiApiV1WebhooksGetRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksIdDelete200Response ApiV1WebhooksIdDelete(ctx, id).Execute()
Remove a webhook.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksIdDelete(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksIdDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksIdDelete`: ApiV1WebhooksIdDelete200Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksIdDelete`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiApiV1WebhooksIdDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
ApiV1WebhooksIdDelete200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksIdDelete200Response ApiV1WebhooksIdDeliveriesDeliveryRedeliverPost(ctx, id, delivery).Execute()
Send a delivery again.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
id := int32(56) // int32 |
delivery := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksIdDeliveriesDeliveryRedeliverPost(context.Background(), id, delivery).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksIdDeliveriesDeliveryRedeliverPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksIdDeliveriesDeliveryRedeliverPost`: ApiV1WebhooksIdDelete200Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksIdDeliveriesDeliveryRedeliverPost`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 | ||
| delivery | int32 |
Other parameters are passed through a pointer to a apiApiV1WebhooksIdDeliveriesDeliveryRedeliverPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
ApiV1WebhooksIdDelete200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksIdDeliveriesGet200Response ApiV1WebhooksIdDeliveriesGet(ctx, id).Status(status).Limit(limit).Execute()
List a webhook's deliveries.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
id := int32(56) // int32 |
status := "status_example" // string | (optional)
limit := int32(56) // int32 | (optional) (default to 50)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksIdDeliveriesGet(context.Background(), id).Status(status).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksIdDeliveriesGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksIdDeliveriesGet`: ApiV1WebhooksIdDeliveriesGet200Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksIdDeliveriesGet`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiApiV1WebhooksIdDeliveriesGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
status | string | | limit | int32 | | [default to 50]
ApiV1WebhooksIdDeliveriesGet200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksPost201Response ApiV1WebhooksIdGet(ctx, id).Execute()
Get one webhook.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksIdGet(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksIdGet``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksIdGet`: ApiV1WebhooksPost201Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksIdGet`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiApiV1WebhooksIdGetRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksPost201Response ApiV1WebhooksIdPatch(ctx, id).ApiV1WebhooksIdPatchRequest(apiV1WebhooksIdPatchRequest).Execute()
Edit, pause or resume a webhook.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
id := int32(56) // int32 |
apiV1WebhooksIdPatchRequest := *openapiclient.NewApiV1WebhooksIdPatchRequest() // ApiV1WebhooksIdPatchRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksIdPatch(context.Background(), id).ApiV1WebhooksIdPatchRequest(apiV1WebhooksIdPatchRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksIdPatch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksIdPatch`: ApiV1WebhooksPost201Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksIdPatch`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiApiV1WebhooksIdPatchRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
apiV1WebhooksIdPatchRequest | ApiV1WebhooksIdPatchRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksPost201Response ApiV1WebhooksIdRotateSecretPost(ctx, id).ApiV1WebhooksIdRotateSecretPostRequest(apiV1WebhooksIdRotateSecretPostRequest).Execute()
Issue a new signing secret.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
id := int32(56) // int32 |
apiV1WebhooksIdRotateSecretPostRequest := *openapiclient.NewApiV1WebhooksIdRotateSecretPostRequest() // ApiV1WebhooksIdRotateSecretPostRequest | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksIdRotateSecretPost(context.Background(), id).ApiV1WebhooksIdRotateSecretPostRequest(apiV1WebhooksIdRotateSecretPostRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksIdRotateSecretPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksIdRotateSecretPost`: ApiV1WebhooksPost201Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksIdRotateSecretPost`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiApiV1WebhooksIdRotateSecretPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
apiV1WebhooksIdRotateSecretPostRequest | ApiV1WebhooksIdRotateSecretPostRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksIdTestPost200Response ApiV1WebhooksIdTestPost(ctx, id).Execute()
Send a test ping.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
id := int32(56) // int32 |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksIdTestPost(context.Background(), id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksIdTestPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksIdTestPost`: ApiV1WebhooksIdTestPost200Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksIdTestPost`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | int32 |
Other parameters are passed through a pointer to a apiApiV1WebhooksIdTestPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
ApiV1WebhooksIdTestPost200Response
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApiV1WebhooksPost201Response ApiV1WebhooksPost(ctx).ApiV1WebhooksPostRequest(apiV1WebhooksPostRequest).Execute()
Create a webhook.
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/goadserver/goadserver-go"
)
func main() {
apiV1WebhooksPostRequest := *openapiclient.NewApiV1WebhooksPostRequest("https://agent.example.com/hooks/adserver", []string{"Events_example"}) // ApiV1WebhooksPostRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.WebhooksEventsAPI.ApiV1WebhooksPost(context.Background()).ApiV1WebhooksPostRequest(apiV1WebhooksPostRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `WebhooksEventsAPI.ApiV1WebhooksPost``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ApiV1WebhooksPost`: ApiV1WebhooksPost201Response
fmt.Fprintf(os.Stdout, "Response from `WebhooksEventsAPI.ApiV1WebhooksPost`: %v\n", resp)
}Other parameters are passed through a pointer to a apiApiV1WebhooksPostRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| apiV1WebhooksPostRequest | ApiV1WebhooksPostRequest |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]