Skip to content

Latest commit

 

History

History
586 lines (368 loc) · 16.9 KB

SubscriptionApi.md

File metadata and controls

586 lines (368 loc) · 16.9 KB

\SubscriptionApi

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

Method HTTP request Description
ListRoleSubscriptions Get /api/v1/roles/{roleTypeOrRoleId}/subscriptions List all Subscriptions of a Custom Role
ListRoleSubscriptionsByNotificationType Get /api/v1/roles/{roleTypeOrRoleId}/subscriptions/{notificationType} List all Subscriptions of a Custom Role with a specific notification type
ListUserSubscriptions Get /api/v1/users/{userId}/subscriptions List all Subscriptions
ListUserSubscriptionsByNotificationType Get /api/v1/users/{userId}/subscriptions/{notificationType} List all Subscriptions by type
SubscribeRoleSubscriptionByNotificationType Post /api/v1/roles/{roleTypeOrRoleId}/subscriptions/{notificationType}/subscribe Subscribe a Custom Role to a specific notification type
SubscribeUserSubscriptionByNotificationType Post /api/v1/users/{userId}/subscriptions/{notificationType}/subscribe Subscribe to a specific notification type
UnsubscribeRoleSubscriptionByNotificationType Post /api/v1/roles/{roleTypeOrRoleId}/subscriptions/{notificationType}/unsubscribe Unsubscribe a Custom Role from a specific notification type
UnsubscribeUserSubscriptionByNotificationType Post /api/v1/users/{userId}/subscriptions/{notificationType}/unsubscribe Unsubscribe from a specific notification type

ListRoleSubscriptions

[]Subscription ListRoleSubscriptions(ctx, roleTypeOrRoleId).Execute()

List all Subscriptions of a Custom Role

Example

package main

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

func main() {
    roleTypeOrRoleId := "roleTypeOrRoleId_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
roleTypeOrRoleId string

Other Parameters

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

Name Type Description Notes

Return type

[]Subscription

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]

ListRoleSubscriptionsByNotificationType

Subscription ListRoleSubscriptionsByNotificationType(ctx, roleTypeOrRoleId, notificationType).Execute()

List all Subscriptions of a Custom Role with a specific notification type

Example

package main

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

func main() {
    roleTypeOrRoleId := "roleTypeOrRoleId_example" // string | 
    notificationType := "notificationType_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
roleTypeOrRoleId string
notificationType string

Other Parameters

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

Name Type Description Notes

Return type

Subscription

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]

ListUserSubscriptions

[]Subscription ListUserSubscriptions(ctx, userId).Execute()

List all Subscriptions

Example

package main

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

func main() {
    userId := "userId_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userId string

Other Parameters

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

Name Type Description Notes

Return type

[]Subscription

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]

ListUserSubscriptionsByNotificationType

Subscription ListUserSubscriptionsByNotificationType(ctx, userId, notificationType).Execute()

List all Subscriptions by type

Example

package main

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

func main() {
    userId := "userId_example" // string | 
    notificationType := "notificationType_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
userId string
notificationType string

Other Parameters

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

Name Type Description Notes

Return type

Subscription

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]

SubscribeRoleSubscriptionByNotificationType

SubscribeRoleSubscriptionByNotificationType(ctx, roleTypeOrRoleId, notificationType).Execute()

Subscribe a Custom Role to a specific notification type

Example

package main

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

func main() {
    roleTypeOrRoleId := "roleTypeOrRoleId_example" // string | 
    notificationType := "notificationType_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SubscriptionApi.SubscribeRoleSubscriptionByNotificationType(context.Background(), roleTypeOrRoleId, notificationType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.SubscribeRoleSubscriptionByNotificationType``: %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.
roleTypeOrRoleId string
notificationType string

Other Parameters

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

SubscribeUserSubscriptionByNotificationType

SubscribeUserSubscriptionByNotificationType(ctx, userId, notificationType).Execute()

Subscribe to a specific notification type

Example

package main

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

func main() {
    userId := "userId_example" // string | 
    notificationType := "notificationType_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SubscriptionApi.SubscribeUserSubscriptionByNotificationType(context.Background(), userId, notificationType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.SubscribeUserSubscriptionByNotificationType``: %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.
userId string
notificationType string

Other Parameters

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

UnsubscribeRoleSubscriptionByNotificationType

UnsubscribeRoleSubscriptionByNotificationType(ctx, roleTypeOrRoleId, notificationType).Execute()

Unsubscribe a Custom Role from a specific notification type

Example

package main

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

func main() {
    roleTypeOrRoleId := "roleTypeOrRoleId_example" // string | 
    notificationType := "notificationType_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SubscriptionApi.UnsubscribeRoleSubscriptionByNotificationType(context.Background(), roleTypeOrRoleId, notificationType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.UnsubscribeRoleSubscriptionByNotificationType``: %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.
roleTypeOrRoleId string
notificationType string

Other Parameters

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

UnsubscribeUserSubscriptionByNotificationType

UnsubscribeUserSubscriptionByNotificationType(ctx, userId, notificationType).Execute()

Unsubscribe from a specific notification type

Example

package main

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

func main() {
    userId := "userId_example" // string | 
    notificationType := "notificationType_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SubscriptionApi.UnsubscribeUserSubscriptionByNotificationType(context.Background(), userId, notificationType).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SubscriptionApi.UnsubscribeUserSubscriptionByNotificationType``: %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.
userId string
notificationType string

Other Parameters

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