All URIs are relative to https://dashboard.quantcdn.io
| Method | HTTP request | Description |
|---|---|---|
| HeadersCreate | Post /api/v2/organizations/{organization}/projects/{project}/custom-headers | Create or update custom headers |
| HeadersDelete | Delete /api/v2/organizations/{organization}/projects/{project}/custom-headers | Delete custom headers |
| HeadersList | Get /api/v2/organizations/{organization}/projects/{project}/custom-headers | List custom headers for a project |
map[string]string HeadersCreate(ctx, organization, project).V2CustomHeaderRequest(v2CustomHeaderRequest).Execute()
Create or update custom headers
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
v2CustomHeaderRequest := *openapiclient.NewV2CustomHeaderRequest(map[string]string{"key": "Inner_example"}) // V2CustomHeaderRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HeadersAPI.HeadersCreate(context.Background(), organization, project).V2CustomHeaderRequest(v2CustomHeaderRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HeadersAPI.HeadersCreate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `HeadersCreate`: map[string]string
fmt.Fprintf(os.Stdout, "Response from `HeadersAPI.HeadersCreate`: %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 apiHeadersCreateRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
v2CustomHeaderRequest | V2CustomHeaderRequest | |
map[string]string
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HeadersDelete(ctx, organization, project).V2CustomHeaderRequest(v2CustomHeaderRequest).Execute()
Delete custom headers
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
v2CustomHeaderRequest := *openapiclient.NewV2CustomHeaderRequest(map[string]string{"key": "Inner_example"}) // V2CustomHeaderRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.HeadersAPI.HeadersDelete(context.Background(), organization, project).V2CustomHeaderRequest(v2CustomHeaderRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HeadersAPI.HeadersDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}| 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 apiHeadersDeleteRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
v2CustomHeaderRequest | V2CustomHeaderRequest | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
map[string]string HeadersList(ctx, organization, project).Execute()
List custom headers for a project
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
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HeadersAPI.HeadersList(context.Background(), organization, project).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HeadersAPI.HeadersList``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `HeadersList`: map[string]string
fmt.Fprintf(os.Stdout, "Response from `HeadersAPI.HeadersList`: %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 apiHeadersListRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
map[string]string
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]