All URIs are relative to https://api.opal.dev/v1
Method | HTTP request | Description |
---|---|---|
CreateOnCallSchedule | Post /on-call-schedules | |
GetOnCallSchedule | Get /on-call-schedules/{on_call_schedule_id} | |
GetOnCallSchedules | Get /on-call-schedules |
OnCallSchedule CreateOnCallSchedule(ctx).CreateOnCallScheduleInfo(createOnCallScheduleInfo).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
createOnCallScheduleInfo := *openapiclient.NewCreateOnCallScheduleInfo(openapiclient.OnCallScheduleProviderEnum("OPSGENIE"), "PNZNINN") // CreateOnCallScheduleInfo | The `OnCallSchedule` object to be created.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OnCallSchedulesApi.CreateOnCallSchedule(context.Background()).CreateOnCallScheduleInfo(createOnCallScheduleInfo).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OnCallSchedulesApi.CreateOnCallSchedule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateOnCallSchedule`: OnCallSchedule
fmt.Fprintf(os.Stdout, "Response from `OnCallSchedulesApi.CreateOnCallSchedule`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateOnCallScheduleRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
createOnCallScheduleInfo | CreateOnCallScheduleInfo | The `OnCallSchedule` object to be created. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OnCallSchedule GetOnCallSchedule(ctx, onCallScheduleId).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
onCallScheduleId := "9546209c-42c2-4801-96d7-9ec42df0f59c" // string | The ID of the on_call_schedule.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OnCallSchedulesApi.GetOnCallSchedule(context.Background(), onCallScheduleId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OnCallSchedulesApi.GetOnCallSchedule``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOnCallSchedule`: OnCallSchedule
fmt.Fprintf(os.Stdout, "Response from `OnCallSchedulesApi.GetOnCallSchedule`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
onCallScheduleId | string | The ID of the on_call_schedule. |
Other parameters are passed through a pointer to a apiGetOnCallScheduleRequest 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]
OnCallScheduleList GetOnCallSchedules(ctx).Execute()
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/opalsecurity/opal-go"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OnCallSchedulesApi.GetOnCallSchedules(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OnCallSchedulesApi.GetOnCallSchedules``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetOnCallSchedules`: OnCallScheduleList
fmt.Fprintf(os.Stdout, "Response from `OnCallSchedulesApi.GetOnCallSchedules`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetOnCallSchedulesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]