Skip to content

Latest commit

 

History

History
273 lines (171 loc) · 6.86 KB

InfrastructureApi.md

File metadata and controls

273 lines (171 loc) · 6.86 KB

\InfrastructureApi

All URIs are relative to https://gateway.stackpath.com

Method HTTP request Description
GetCDNIPs Get /cdn/v1/ips Get IP addresses
GetClosestPops Get /cdn/v1/pops/closest Get POP performance
GetPops Get /cdn/v1/pops Get points of presence
ScanOrigin Post /cdn/v1/origins/scan Scan an origin

GetCDNIPs

CdnGetCDNIPsResponse GetCDNIPs(ctx).Filter(filter).ResponseType(responseType).Execute()

Get IP addresses

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    filter := "filter_example" // string | Whether to search for IPv4, IPv6, or all IP addresses (optional) (default to "ALL")
    responseType := "responseType_example" // string | The format to return the result in (optional) (default to "JSON")

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.InfrastructureApi.GetCDNIPs(context.Background(), ).Filter(filter).ResponseType(responseType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `InfrastructureApi.GetCDNIPs``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetCDNIPs`: CdnGetCDNIPsResponse
    fmt.Fprintf(os.Stdout, "Response from `InfrastructureApi.GetCDNIPs`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
filter string Whether to search for IPv4, IPv6, or all IP addresses [default to "ALL"]
responseType string The format to return the result in [default to "JSON"]

Return type

CdnGetCDNIPsResponse

Authorization

oauth2

HTTP request headers

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

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

GetClosestPops

CdnGetClosestPopsResponse GetClosestPops(ctx).Url(url).Execute()

Get POP performance

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    url := "url_example" // string | The URL to scan. (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.InfrastructureApi.GetClosestPops(context.Background(), ).Url(url).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `InfrastructureApi.GetClosestPops``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetClosestPops`: CdnGetClosestPopsResponse
    fmt.Fprintf(os.Stdout, "Response from `InfrastructureApi.GetClosestPops`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
url string The URL to scan.

Return type

CdnGetClosestPopsResponse

Authorization

oauth2

HTTP request headers

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

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

GetPops

CdnGetPopsResponse GetPops(ctx).Execute()

Get points of presence

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.InfrastructureApi.GetPops(context.Background(), ).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `InfrastructureApi.GetPops``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetPops`: CdnGetPopsResponse
    fmt.Fprintf(os.Stdout, "Response from `InfrastructureApi.GetPops`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

CdnGetPopsResponse

Authorization

oauth2

HTTP request headers

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

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

ScanOrigin

CdnScanOriginResponse ScanOrigin(ctx).CdnScanOriginRequest(cdnScanOriginRequest).Execute()

Scan an origin

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    cdnScanOriginRequest := openapiclient.cdnScanOriginRequest{Domain: "Domain_example"} // CdnScanOriginRequest | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.InfrastructureApi.ScanOrigin(context.Background(), cdnScanOriginRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `InfrastructureApi.ScanOrigin``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ScanOrigin`: CdnScanOriginResponse
    fmt.Fprintf(os.Stdout, "Response from `InfrastructureApi.ScanOrigin`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
cdnScanOriginRequest CdnScanOriginRequest

Return type

CdnScanOriginResponse

Authorization

oauth2

HTTP request headers

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

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