Skip to content

Latest commit

 

History

History
82 lines (53 loc) · 2.33 KB

File metadata and controls

82 lines (53 loc) · 2.33 KB

\PurgeAPI

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

PurgeCreate

string PurgeCreate(ctx, organization, project).PurgeCreateRequest(purgeCreateRequest).Execute()

Purge cache via URL or cache keys

Example

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)
}

Path Parameters

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

Other parameters are passed through a pointer to a apiPurgeCreateRequest struct via the builder pattern

Name Type Description Notes

purgeCreateRequest | PurgeCreateRequest | |

Return type

string

Authorization

BearerAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]