Skip to content

Latest commit

 

History

History
216 lines (133 loc) · 5.21 KB

UarsApi.md

File metadata and controls

216 lines (133 loc) · 5.21 KB

\UarsApi

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

Method HTTP request Description
CreateUar Post /uar
GetUARs Get /uars
GetUar Get /uar/{uar_id}

CreateUar

UAR CreateUar(ctx).CreateUARInfo(createUARInfo).Execute()

Example

package main

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

func main() {
    createUARInfo := *openapiclient.NewCreateUARInfo("Monthly UAR (July)", openapiclient.UARReviewerAssignmentPolicyEnum("MANUALLY"), false, time.Now(), "America/Los_Angeles", false) // CreateUARInfo | The settings of the UAR.

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

Path Parameters

Other Parameters

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

Name Type Description Notes
createUARInfo CreateUARInfo The settings of the UAR.

Return type

UAR

Authorization

BearerAuth

HTTP request headers

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

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

GetUARs

PaginatedUARsList GetUARs(ctx).Cursor(cursor).PageSize(pageSize).Execute()

Example

package main

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

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)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.UarsApi.GetUARs(context.Background()).Cursor(cursor).PageSize(pageSize).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `UarsApi.GetUARs``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetUARs`: PaginatedUARsList
    fmt.Fprintf(os.Stdout, "Response from `UarsApi.GetUARs`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetUARsRequest 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.

Return type

PaginatedUARsList

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]

GetUar

UAR GetUar(ctx, uarId).Execute()

Example

package main

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

func main() {
    uarId := "4baf8423-db0a-4037-a4cf-f79c60cb67a5" // string | The ID of the UAR.

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
uarId string The ID of the UAR.

Other Parameters

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

Name Type Description Notes

Return type

UAR

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]