Skip to content

Latest commit

 

History

History
329 lines (222 loc) · 10 KB

File metadata and controls

329 lines (222 loc) · 10 KB

opal_security.EventStreamsApi

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

Method HTTP request Description
create_event_stream POST /event-streams Create event stream
delete_event_stream DELETE /event-streams/{event_stream_id} Delete event stream
get_event_streams GET /event-streams Get event streams
update_event_stream PUT /event-streams/{event_stream_id} Update event stream

create_event_stream

EventStream create_event_stream(create_event_stream_info)

Create event stream

Creates a new event streaming connection.

Example

  • Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.create_event_stream_info import CreateEventStreamInfo
from opal_security.models.event_stream import EventStream
from opal_security.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal

configuration = opal.Configuration(
    host = "https://api.opal.dev/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = opal_security.EventStreamsApi(api_client)
    create_event_stream_info = opal_security.CreateEventStreamInfo() # CreateEventStreamInfo | 

    try:
        # Create event stream
        api_response = api_instance.create_event_stream(create_event_stream_info)
        print("The response of EventStreamsApi->create_event_stream:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EventStreamsApi->create_event_stream: %s\n" % e)

Parameters

Name Type Description Notes
create_event_stream_info CreateEventStreamInfo

Return type

EventStream

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The event stream just created. Credentials are returned in clear text only on creation. -

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

delete_event_stream

delete_event_stream(event_stream_id)

Delete event stream

Deletes an event streaming connection.

Example

  • Bearer Authentication (BearerAuth):
import opal_security
from opal_security.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal

configuration = opal.Configuration(
    host = "https://api.opal.dev/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = opal_security.EventStreamsApi(api_client)
    event_stream_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the event stream.

    try:
        # Delete event stream
        api_instance.delete_event_stream(event_stream_id)
    except Exception as e:
        print("Exception when calling EventStreamsApi->delete_event_stream: %s\n" % e)

Parameters

Name Type Description Notes
event_stream_id UUID The ID of the event stream.

Return type

void (empty response body)

Authorization

BearerAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

HTTP response details

Status code Description Response headers
200 The event stream was successfully deleted. -

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

get_event_streams

EventStreamList get_event_streams()

Get event streams

Returns a list of configured event streaming connections for your organization.

Example

  • Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.event_stream_list import EventStreamList
from opal_security.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal

configuration = opal.Configuration(
    host = "https://api.opal.dev/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = opal_security.EventStreamsApi(api_client)

    try:
        # Get event streams
        api_response = api_instance.get_event_streams()
        print("The response of EventStreamsApi->get_event_streams:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EventStreamsApi->get_event_streams: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

EventStreamList

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 A list of event streams for your organization. -

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

update_event_stream

EventStream update_event_stream(event_stream_id, update_event_stream_info)

Update event stream

Updates an existing event streaming connection.

Example

  • Bearer Authentication (BearerAuth):
import opal_security
from opal_security.models.event_stream import EventStream
from opal_security.models.update_event_stream_info import UpdateEventStreamInfo
from opal_security.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.opal.dev/v1
# See configuration.py for a list of all supported configuration parameters.
import opal_security as opal

configuration = opal.Configuration(
    host = "https://api.opal.dev/v1"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization: BearerAuth
configuration = opal.Configuration(
    access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with opal_security.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = opal_security.EventStreamsApi(api_client)
    event_stream_id = UUID('4baf8423-db0a-4037-a4cf-f79c60cb67a5') # UUID | The ID of the event stream.
    update_event_stream_info = opal_security.UpdateEventStreamInfo() # UpdateEventStreamInfo | 

    try:
        # Update event stream
        api_response = api_instance.update_event_stream(event_stream_id, update_event_stream_info)
        print("The response of EventStreamsApi->update_event_stream:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling EventStreamsApi->update_event_stream: %s\n" % e)

Parameters

Name Type Description Notes
event_stream_id UUID The ID of the event stream.
update_event_stream_info UpdateEventStreamInfo

Return type

EventStream

Authorization

BearerAuth

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 The updated event stream. -

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