All URIs are relative to https://napi.arvancloud.ir/cdn/4.0
Method | HTTP request | Description |
---|---|---|
TroubleshootsIndex | Get /domains/{domain}/troubleshoots | Show list of troubleshoots for given domain |
TroubleshootsLatest | Get /domains/{domain}/troubleshoots/latest | Show the latest troubleshoot for given domain |
TroubleshootsStore | Post /domains/{domain}/troubleshoots | Create new troubleshoot |
TroubleshootsIndex200Response TroubleshootsIndex(ctx, domain).PerPage(perPage).Page(page).Execute()
Show list of troubleshoots for given domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
func main() {
domain := "example.com" // string | Domain name
perPage := int32(56) // int32 | Set how many items returned per page (optional)
page := int32(56) // int32 | Set the desired page number (optional) (default to 1)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TroubleshootApi.TroubleshootsIndex(context.Background(), domain).PerPage(perPage).Page(page).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TroubleshootApi.TroubleshootsIndex``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TroubleshootsIndex`: TroubleshootsIndex200Response
fmt.Fprintf(os.Stdout, "Response from `TroubleshootApi.TroubleshootsIndex`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domain | string | Domain name |
Other parameters are passed through a pointer to a apiTroubleshootsIndexRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
perPage | int32 | Set how many items returned per page | page | int32 | Set the desired page number | [default to 1]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TroubleshootsStore201Response TroubleshootsLatest(ctx, domain).Execute()
Show the latest troubleshoot for given domain
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
func main() {
domain := "example.com" // string | Domain name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TroubleshootApi.TroubleshootsLatest(context.Background(), domain).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TroubleshootApi.TroubleshootsLatest``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TroubleshootsLatest`: TroubleshootsStore201Response
fmt.Fprintf(os.Stdout, "Response from `TroubleshootApi.TroubleshootsLatest`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domain | string | Domain name |
Other parameters are passed through a pointer to a apiTroubleshootsLatestRequest 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]
TroubleshootsStore201Response TroubleshootsStore(ctx, domain).Execute()
Create new troubleshoot
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/arvancloud/cdn-go"
)
func main() {
domain := "example.com" // string | Domain name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TroubleshootApi.TroubleshootsStore(context.Background(), domain).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TroubleshootApi.TroubleshootsStore``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TroubleshootsStore`: TroubleshootsStore201Response
fmt.Fprintf(os.Stdout, "Response from `TroubleshootApi.TroubleshootsStore`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
domain | string | Domain name |
Other parameters are passed through a pointer to a apiTroubleshootsStoreRequest 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]