Skip to content

Latest commit

 

History

History
410 lines (316 loc) · 12.3 KB

PushProviderApi.md

File metadata and controls

410 lines (316 loc) · 12.3 KB

Okta.Sdk.Api.PushProviderApi

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

Method HTTP request Description
CreatePushProvider POST /api/v1/push-providers Create a Push Provider
DeletePushProvider DELETE /api/v1/push-providers/{pushProviderId} Delete a Push Provider
GetPushProvider GET /api/v1/push-providers/{pushProviderId} Retrieve a Push Provider
ListPushProviders GET /api/v1/push-providers List all Push Providers
ReplacePushProvider PUT /api/v1/push-providers/{pushProviderId} Replace a Push Provider

CreatePushProvider

PushProvider CreatePushProvider (PushProvider pushProvider)

Create a Push Provider

Creates a new push provider. Each Push Provider must have a unique name.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class CreatePushProviderExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var pushProvider = new PushProvider(); // PushProvider | 

            try
            {
                // Create a Push Provider
                PushProvider result = apiInstance.CreatePushProvider(pushProvider);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.CreatePushProvider: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
pushProvider PushProvider

Return type

PushProvider

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden -
429 Too Many Requests -

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

DeletePushProvider

void DeletePushProvider (string pushProviderId)

Delete a Push Provider

Deletes a push provider by pushProviderId. If the push provider is currently being used in the org by a custom authenticator, the delete will not be allowed.

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class DeletePushProviderExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var pushProviderId = "pushProviderId_example";  // string | Id of the push provider

            try
            {
                // Delete a Push Provider
                apiInstance.DeletePushProvider(pushProviderId);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.DeletePushProvider: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
pushProviderId string Id of the push provider

Return type

void (empty response body)

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 No Content -
403 Forbidden -
404 Not Found -
409 Conflict -
429 Too Many Requests -

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

GetPushProvider

PushProvider GetPushProvider (string pushProviderId)

Retrieve a Push Provider

Retrieves a push provider by pushProviderId

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class GetPushProviderExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var pushProviderId = "pushProviderId_example";  // string | Id of the push provider

            try
            {
                // Retrieve a Push Provider
                PushProvider result = apiInstance.GetPushProvider(pushProviderId);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.GetPushProvider: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
pushProviderId string Id of the push provider

Return type

PushProvider

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
403 Forbidden -
404 Not Found -
429 Too Many Requests -

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

ListPushProviders

List<PushProvider> ListPushProviders (ProviderType? type = null)

List all Push Providers

Lists all push providers

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class ListPushProvidersExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var type = (ProviderType) "APNS";  // ProviderType? | Filters push providers by `providerType` (optional) 

            try
            {
                // List all Push Providers
                List<PushProvider> result = apiInstance.ListPushProviders(type).ToListAsync();
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.ListPushProviders: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
type ProviderType? Filters push providers by `providerType` [optional]

Return type

List<PushProvider>

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
403 Forbidden -
429 Too Many Requests -

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

ReplacePushProvider

PushProvider ReplacePushProvider (string pushProviderId, PushProvider pushProvider)

Replace a Push Provider

Replaces a push provider by pushProviderId

Example

using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;

namespace Example
{
    public class ReplacePushProviderExample
    {
        public static void Main()
        {
            Configuration config = new Configuration();
            config.OktaDomain = "https://subdomain.okta.com";
            // Configure API key authorization: apiToken
            config.Token ="YOUR_API_KEY";
            // Configure OAuth2 access token for authorization: oauth2
            config.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new PushProviderApi(config);
            var pushProviderId = "pushProviderId_example";  // string | Id of the push provider
            var pushProvider = new PushProvider(); // PushProvider | 

            try
            {
                // Replace a Push Provider
                PushProvider result = apiInstance.ReplacePushProvider(pushProviderId, pushProvider);
                Debug.WriteLine(result);
            }
            catch (ApiException  e)
            {
                Debug.Print("Exception when calling PushProviderApi.ReplacePushProvider: " + e.Message );
                Debug.Print("Status Code: "+ e.ErrorCode);
                Debug.Print(e.StackTrace);
            }
        }
    }
}

Parameters

Name Type Description Notes
pushProviderId string Id of the push provider
pushProvider PushProvider

Return type

PushProvider

Authorization

apiToken, oauth2

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden -
404 Not Found -
429 Too Many Requests -

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