Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 2.23 KB

RequestsApi.md

File metadata and controls

79 lines (49 loc) · 2.23 KB

\RequestsApi

All URIs are relative to https://api.opal.dev/v1

Method HTTP request Description
GetRequests Get /requests

GetRequests

RequestList GetRequests(ctx).Cursor(cursor).PageSize(pageSize).ShowPendingOnly(showPendingOnly).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/opalsecurity/opal-go"
)

func main() {
    cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional)
    pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional)
    showPendingOnly := true // bool | Boolean toggle for if it should only show pending requests. (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.RequestsApi.GetRequests(context.Background()).Cursor(cursor).PageSize(pageSize).ShowPendingOnly(showPendingOnly).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`: RequestList
    fmt.Fprintf(os.Stdout, "Response from `RequestsApi.GetRequests`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
cursor string The pagination cursor value.
pageSize int32 Number of results to return per page. Default is 200.
showPendingOnly bool Boolean toggle for if it should only show pending requests.

Return type

RequestList

Authorization

BearerAuth

HTTP request headers

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

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