All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
ActivateTrustedOrigin | Post /api/v1/trustedOrigins/{trustedOriginId}/lifecycle/activate | Activate a Trusted Origin |
CreateTrustedOrigin | Post /api/v1/trustedOrigins | Create a Trusted Origin |
DeactivateTrustedOrigin | Post /api/v1/trustedOrigins/{trustedOriginId}/lifecycle/deactivate | Deactivate a Trusted Origin |
DeleteTrustedOrigin | Delete /api/v1/trustedOrigins/{trustedOriginId} | Delete a Trusted Origin |
GetTrustedOrigin | Get /api/v1/trustedOrigins/{trustedOriginId} | Retrieve a Trusted Origin |
ListTrustedOrigins | Get /api/v1/trustedOrigins | List all Trusted Origins |
ReplaceTrustedOrigin | Put /api/v1/trustedOrigins/{trustedOriginId} | Replace a Trusted Origin |
TrustedOrigin ActivateTrustedOrigin(ctx, trustedOriginId).Execute()
Activate a Trusted Origin
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
trustedOriginId := "7j2PkU1nyNIDe26ZNufR" // string | `id` of the Trusted Origin
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TrustedOriginAPI.ActivateTrustedOrigin(context.Background(), trustedOriginId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrustedOriginAPI.ActivateTrustedOrigin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ActivateTrustedOrigin`: TrustedOrigin
fmt.Fprintf(os.Stdout, "Response from `TrustedOriginAPI.ActivateTrustedOrigin`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
trustedOriginId | string | `id` of the Trusted Origin |
Other parameters are passed through a pointer to a apiActivateTrustedOriginRequest 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]
TrustedOrigin CreateTrustedOrigin(ctx).TrustedOrigin(trustedOrigin).Execute()
Create a Trusted Origin
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
trustedOrigin := *openapiclient.NewTrustedOrigin() // TrustedOrigin |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TrustedOriginAPI.CreateTrustedOrigin(context.Background()).TrustedOrigin(trustedOrigin).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrustedOriginAPI.CreateTrustedOrigin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateTrustedOrigin`: TrustedOrigin
fmt.Fprintf(os.Stdout, "Response from `TrustedOriginAPI.CreateTrustedOrigin`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateTrustedOriginRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
trustedOrigin | TrustedOrigin |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TrustedOrigin DeactivateTrustedOrigin(ctx, trustedOriginId).Execute()
Deactivate a Trusted Origin
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
trustedOriginId := "7j2PkU1nyNIDe26ZNufR" // string | `id` of the Trusted Origin
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TrustedOriginAPI.DeactivateTrustedOrigin(context.Background(), trustedOriginId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrustedOriginAPI.DeactivateTrustedOrigin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeactivateTrustedOrigin`: TrustedOrigin
fmt.Fprintf(os.Stdout, "Response from `TrustedOriginAPI.DeactivateTrustedOrigin`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
trustedOriginId | string | `id` of the Trusted Origin |
Other parameters are passed through a pointer to a apiDeactivateTrustedOriginRequest 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]
DeleteTrustedOrigin(ctx, trustedOriginId).Execute()
Delete a Trusted Origin
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
trustedOriginId := "7j2PkU1nyNIDe26ZNufR" // string | `id` of the Trusted Origin
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.TrustedOriginAPI.DeleteTrustedOrigin(context.Background(), trustedOriginId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrustedOriginAPI.DeleteTrustedOrigin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
trustedOriginId | string | `id` of the Trusted Origin |
Other parameters are passed through a pointer to a apiDeleteTrustedOriginRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TrustedOrigin GetTrustedOrigin(ctx, trustedOriginId).Execute()
Retrieve a Trusted Origin
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
trustedOriginId := "7j2PkU1nyNIDe26ZNufR" // string | `id` of the Trusted Origin
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TrustedOriginAPI.GetTrustedOrigin(context.Background(), trustedOriginId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrustedOriginAPI.GetTrustedOrigin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTrustedOrigin`: TrustedOrigin
fmt.Fprintf(os.Stdout, "Response from `TrustedOriginAPI.GetTrustedOrigin`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
trustedOriginId | string | `id` of the Trusted Origin |
Other parameters are passed through a pointer to a apiGetTrustedOriginRequest 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]
[]TrustedOrigin ListTrustedOrigins(ctx).Q(q).Filter(filter).After(after).Limit(limit).Execute()
List all Trusted Origins
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
q := "q_example" // string | (optional)
filter := "filter_example" // string | (optional)
after := "after_example" // string | (optional)
limit := int32(56) // int32 | (optional) (default to -1)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TrustedOriginAPI.ListTrustedOrigins(context.Background()).Q(q).Filter(filter).After(after).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrustedOriginAPI.ListTrustedOrigins``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListTrustedOrigins`: []TrustedOrigin
fmt.Fprintf(os.Stdout, "Response from `TrustedOriginAPI.ListTrustedOrigins`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListTrustedOriginsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
q | string | ||
filter | string | ||
after | string | ||
limit | int32 | [default to -1] |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TrustedOrigin ReplaceTrustedOrigin(ctx, trustedOriginId).TrustedOrigin(trustedOrigin).Execute()
Replace a Trusted Origin
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/okta/okta-sdk-golang"
)
func main() {
trustedOriginId := "7j2PkU1nyNIDe26ZNufR" // string | `id` of the Trusted Origin
trustedOrigin := *openapiclient.NewTrustedOrigin() // TrustedOrigin |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.TrustedOriginAPI.ReplaceTrustedOrigin(context.Background(), trustedOriginId).TrustedOrigin(trustedOrigin).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TrustedOriginAPI.ReplaceTrustedOrigin``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReplaceTrustedOrigin`: TrustedOrigin
fmt.Fprintf(os.Stdout, "Response from `TrustedOriginAPI.ReplaceTrustedOrigin`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
trustedOriginId | string | `id` of the Trusted Origin |
Other parameters are passed through a pointer to a apiReplaceTrustedOriginRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
trustedOrigin | TrustedOrigin | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]