All URIs are relative to https://dashboard.quantcdn.io
| Method | HTTP request | Description |
|---|---|---|
| PurgeCreate | Post /api/v2/organizations/{organization}/projects/{project}/purge | Purge cache via URL or cache keys |
string PurgeCreate(ctx, organization, project).PurgeCreateRequest(purgeCreateRequest).Execute()
Purge cache via URL or cache keys
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/quantcdn/quant-admin-go"
)
func main() {
organization := "test-org" // string | Organization identifier
project := "test-project" // string | Project identifier
purgeCreateRequest := *openapiclient.NewPurgeCreateRequest([]string{"CacheKeys_example"}, "Scope_example") // PurgeCreateRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PurgeAPI.PurgeCreate(context.Background(), organization, project).PurgeCreateRequest(purgeCreateRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PurgeAPI.PurgeCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PurgeCreate`: string
fmt.Fprintf(os.Stdout, "Response from `PurgeAPI.PurgeCreate`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| organization | string | Organization identifier | |
| project | string | Project identifier |
Other parameters are passed through a pointer to a apiPurgeCreateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
purgeCreateRequest | PurgeCreateRequest | |
string
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]