Skip to content

Latest commit

 

History

History
244 lines (161 loc) · 7.7 KB

File metadata and controls

244 lines (161 loc) · 7.7 KB

\RequestsApi

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

Method HTTP request Description
GetRequest Get /waf/v1/stacks/{stack_id}/sites/{site_id}/requests/{request_id} Get a request
GetRequestDetails Get /waf/v1/stacks/{stack_id}/sites/{site_id}/requests/{request_id}/details Get a request's details
GetRequests Get /waf/v1/stacks/{stack_id}/sites/{site_id}/requests Get all requests

GetRequest

WafGetRequestResponse GetRequest(ctx, stackId, siteId, requestId).Execute()

Get a request

Example

package main

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

func main() {
    stackId := "stackId_example" // string | A stack ID or slug
    siteId := "siteId_example" // string | A site ID
    requestId := "requestId_example" // string | A WAF request ID

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
stackId string A stack ID or slug
siteId string A site ID
requestId string A WAF request ID

Other Parameters

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

Name Type Description Notes

Return type

WafGetRequestResponse

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]

GetRequestDetails

WafGetRequestDetailsResponse GetRequestDetails(ctx, stackId, siteId, requestId).Execute()

Get a request's details

Example

package main

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

func main() {
    stackId := "stackId_example" // string | A stack ID or slug
    siteId := "siteId_example" // string | A site ID
    requestId := "requestId_example" // string | A WAF request ID

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
stackId string A stack ID or slug
siteId string A site ID
requestId string A WAF request ID

Other Parameters

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

Name Type Description Notes

Return type

WafGetRequestDetailsResponse

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]

GetRequests

WafGetRequestsResponse GetRequests(ctx, stackId, siteId).PageRequestFirst(pageRequestFirst).PageRequestAfter(pageRequestAfter).PageRequestFilter(pageRequestFilter).PageRequestSortBy(pageRequestSortBy).StartDate(startDate).EndDate(endDate).Execute()

Get all requests

Example

package main

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

func main() {
    stackId := "stackId_example" // string | A stack ID or slug
    siteId := "siteId_example" // string | A site ID
    pageRequestFirst := "pageRequestFirst_example" // string | The number of items desired. (optional)
    pageRequestAfter := "pageRequestAfter_example" // string | The cursor value after which data will be returned. (optional)
    pageRequestFilter := "pageRequestFilter_example" // string | SQL-style constraint filters. (optional)
    pageRequestSortBy := "pageRequestSortBy_example" // string | Sort the response by the given field. (optional)
    startDate := Get-Date // time.Time | A lower bound date to search requests for. (optional)
    endDate := Get-Date // time.Time | An upper bound date to search requests for. (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.RequestsApi.GetRequests(context.Background(), stackId, siteId).PageRequestFirst(pageRequestFirst).PageRequestAfter(pageRequestAfter).PageRequestFilter(pageRequestFilter).PageRequestSortBy(pageRequestSortBy).StartDate(startDate).EndDate(endDate).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RequestsApi.GetRequests``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetRequests`: WafGetRequestsResponse
    fmt.Fprintf(os.Stdout, "Response from `RequestsApi.GetRequests`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
stackId string A stack ID or slug
siteId string A site ID

Other Parameters

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

Name Type Description Notes

pageRequestFirst | string | The number of items desired. | pageRequestAfter | string | The cursor value after which data will be returned. | pageRequestFilter | string | SQL-style constraint filters. | pageRequestSortBy | string | Sort the response by the given field. | startDate | time.Time | A lower bound date to search requests for. | endDate | time.Time | An upper bound date to search requests for. |

Return type

WafGetRequestsResponse

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]