Skip to content

Latest commit

 

History

History
350 lines (220 loc) · 9.53 KB

RiskProviderAPI.md

File metadata and controls

350 lines (220 loc) · 9.53 KB

\RiskProviderAPI

All URIs are relative to https://subdomain.okta.com

Method HTTP request Description
CreateRiskProvider Post /api/v1/risk/providers Create a Risk Provider
DeleteRiskProvider Delete /api/v1/risk/providers/{riskProviderId} Delete a Risk Provider
GetRiskProvider Get /api/v1/risk/providers/{riskProviderId} Retrieve a Risk Provider
ListRiskProviders Get /api/v1/risk/providers List all Risk Providers
ReplaceRiskProvider Put /api/v1/risk/providers/{riskProviderId} Replace a Risk Provider

CreateRiskProvider

RiskProvider CreateRiskProvider(ctx).Instance(instance).Execute()

Create a Risk Provider

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    instance := *openapiclient.NewRiskProvider(openapiclient.RiskProviderAction("enforce_and_log"), "00cjkjjkkgjkdkjdkkljjsd", "00rp12r4skkjkjgsn", "Risk-Partner-X", *openapiclient.NewLinksSelf()) // RiskProvider | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
instance RiskProvider

Return type

RiskProvider

Authorization

apiToken, 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]

DeleteRiskProvider

DeleteRiskProvider(ctx, riskProviderId).Execute()

Delete a Risk Provider

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    riskProviderId := "00rp12r4skkjkjgsn" // string | `id` of the Risk Provider object

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.RiskProviderAPI.DeleteRiskProvider(context.Background(), riskProviderId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `RiskProviderAPI.DeleteRiskProvider``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
riskProviderId string `id` of the Risk Provider object

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiToken, 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]

GetRiskProvider

RiskProvider GetRiskProvider(ctx, riskProviderId).Execute()

Retrieve a Risk Provider

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    riskProviderId := "00rp12r4skkjkjgsn" // string | `id` of the Risk Provider object

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
riskProviderId string `id` of the Risk Provider object

Other Parameters

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

Name Type Description Notes

Return type

RiskProvider

Authorization

apiToken, 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]

ListRiskProviders

[]RiskProvider ListRiskProviders(ctx).Execute()

List all Risk Providers

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]RiskProvider

Authorization

apiToken, 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]

ReplaceRiskProvider

RiskProvider ReplaceRiskProvider(ctx, riskProviderId).Instance(instance).Execute()

Replace a Risk Provider

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    riskProviderId := "00rp12r4skkjkjgsn" // string | `id` of the Risk Provider object
    instance := *openapiclient.NewRiskProvider(openapiclient.RiskProviderAction("enforce_and_log"), "00cjkjjkkgjkdkjdkkljjsd", "00rp12r4skkjkjgsn", "Risk-Partner-X", *openapiclient.NewLinksSelf()) // RiskProvider | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
riskProviderId string `id` of the Risk Provider object

Other Parameters

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

Name Type Description Notes

instance | RiskProvider | |

Return type

RiskProvider

Authorization

apiToken, 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]