libica.openapi.v3.ProjectNotificationSubscriptionsApi¶
All URIs are relative to /ica/rest
Method | HTTP request | Description |
---|---|---|
create_notification_subscription | POST /api/projects/{projectId}/notificationSubscriptions | Create a notification subscription |
delete_notification_subscription | DELETE /api/projects/{projectId}/notificationSubscriptions/{subscriptionId} | Delete a notification subscription |
get_notification_subscription | GET /api/projects/{projectId}/notificationSubscriptions/{subscriptionId} | Retrieve a notification subscription |
get_notification_subscriptions | GET /api/projects/{projectId}/notificationSubscriptions | Retrieve notification subscriptions |
update_notification_subscription | PUT /api/projects/{projectId}/notificationSubscriptions/{subscriptionId} | Update a notification subscription |
create_notification_subscription¶
NotificationSubscription create_notification_subscription(project_id, create_notification_subscription)
Create a notification subscription
Example¶
- Bearer (JWT) Authentication (JwtAuth):
- Api Key Authentication (ApiKeyAuth):
import libica.openapi.v3
from libica.openapi.v3.models.create_notification_subscription import CreateNotificationSubscription
from libica.openapi.v3.models.notification_subscription import NotificationSubscription
from libica.openapi.v3.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /ica/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = libica.openapi.v3.Configuration(
host = "/ica/rest"
)
# 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 (JWT): JwtAuth
configuration = libica.openapi.v3.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with libica.openapi.v3.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = libica.openapi.v3.ProjectNotificationSubscriptionsApi(api_client)
project_id = 'project_id_example' # str | The ID of the project
create_notification_subscription = libica.openapi.v3.CreateNotificationSubscription() # CreateNotificationSubscription | The new subscription
try:
# Create a notification subscription
api_response = api_instance.create_notification_subscription(project_id, create_notification_subscription)
print("The response of ProjectNotificationSubscriptionsApi->create_notification_subscription:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectNotificationSubscriptionsApi->create_notification_subscription: %s\n" % e)
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of the project | |
create_notification_subscription | CreateNotificationSubscription | The new subscription |
Return type¶
Authorization¶
HTTP request headers¶
- Content-Type: application/vnd.illumina.v3+json, application/json
- Accept: application/problem+json, application/vnd.illumina.v3+json
HTTP response details¶
Status code | Description | Response headers |
---|---|---|
200 | The notification subscription is successfully created. | * ETag - The current version of the resource. Can be passed to the corresponding PUT endpoint to enable conflict exposure (409 response). |
0 | A problem occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_notification_subscription¶
delete_notification_subscription(project_id, subscription_id)
Delete a notification subscription
Example¶
- Bearer (JWT) Authentication (JwtAuth):
- Api Key Authentication (ApiKeyAuth):
import libica.openapi.v3
from libica.openapi.v3.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /ica/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = libica.openapi.v3.Configuration(
host = "/ica/rest"
)
# 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 (JWT): JwtAuth
configuration = libica.openapi.v3.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with libica.openapi.v3.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = libica.openapi.v3.ProjectNotificationSubscriptionsApi(api_client)
project_id = 'project_id_example' # str | The ID of the project
subscription_id = 'subscription_id_example' # str | The ID of the notification subscription to delete
try:
# Delete a notification subscription
api_instance.delete_notification_subscription(project_id, subscription_id)
except Exception as e:
print("Exception when calling ProjectNotificationSubscriptionsApi->delete_notification_subscription: %s\n" % e)
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of the project | |
subscription_id | str | The ID of the notification subscription to delete |
Return type¶
void (empty response body)
Authorization¶
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/problem+json
HTTP response details¶
Status code | Description | Response headers |
---|---|---|
204 | The notification subscription is successfully deleted | - |
0 | A problem occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_notification_subscription¶
NotificationSubscription get_notification_subscription(project_id, subscription_id)
Retrieve a notification subscription
Example¶
- Bearer (JWT) Authentication (JwtAuth):
- Api Key Authentication (ApiKeyAuth):
import libica.openapi.v3
from libica.openapi.v3.models.notification_subscription import NotificationSubscription
from libica.openapi.v3.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /ica/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = libica.openapi.v3.Configuration(
host = "/ica/rest"
)
# 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 (JWT): JwtAuth
configuration = libica.openapi.v3.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with libica.openapi.v3.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = libica.openapi.v3.ProjectNotificationSubscriptionsApi(api_client)
project_id = 'project_id_example' # str | The ID of the project
subscription_id = 'subscription_id_example' # str | The ID of the notification subscription
try:
# Retrieve a notification subscription
api_response = api_instance.get_notification_subscription(project_id, subscription_id)
print("The response of ProjectNotificationSubscriptionsApi->get_notification_subscription:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectNotificationSubscriptionsApi->get_notification_subscription: %s\n" % e)
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of the project | |
subscription_id | str | The ID of the notification subscription |
Return type¶
Authorization¶
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/problem+json, application/vnd.illumina.v3+json
HTTP response details¶
Status code | Description | Response headers |
---|---|---|
200 | The notification subscription is successfully retrieved. | * ETag - The current version of the resource. Can be passed to the corresponding PUT endpoint to enable conflict exposure (409 response). |
0 | A problem occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
get_notification_subscriptions¶
NotificationSubscriptionList get_notification_subscriptions(project_id)
Retrieve notification subscriptions
Example¶
- Bearer (JWT) Authentication (JwtAuth):
- Api Key Authentication (ApiKeyAuth):
import libica.openapi.v3
from libica.openapi.v3.models.notification_subscription_list import NotificationSubscriptionList
from libica.openapi.v3.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /ica/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = libica.openapi.v3.Configuration(
host = "/ica/rest"
)
# 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 (JWT): JwtAuth
configuration = libica.openapi.v3.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with libica.openapi.v3.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = libica.openapi.v3.ProjectNotificationSubscriptionsApi(api_client)
project_id = 'project_id_example' # str | The ID of the project
try:
# Retrieve notification subscriptions
api_response = api_instance.get_notification_subscriptions(project_id)
print("The response of ProjectNotificationSubscriptionsApi->get_notification_subscriptions:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectNotificationSubscriptionsApi->get_notification_subscriptions: %s\n" % e)
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of the project |
Return type¶
Authorization¶
HTTP request headers¶
- Content-Type: Not defined
- Accept: application/problem+json, application/vnd.illumina.v3+json
HTTP response details¶
Status code | Description | Response headers |
---|---|---|
200 | The notification subscriptions are successfully retrieved. | - |
0 | A problem occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
update_notification_subscription¶
NotificationSubscription update_notification_subscription(project_id, subscription_id, notification_subscription, if_match=if_match)
Update a notification subscription
Fields which can be updated: - enabled - eventCode - filterExpression - notificationChannel
Example¶
- Bearer (JWT) Authentication (JwtAuth):
- Api Key Authentication (ApiKeyAuth):
import libica.openapi.v3
from libica.openapi.v3.models.notification_subscription import NotificationSubscription
from libica.openapi.v3.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to /ica/rest
# See configuration.py for a list of all supported configuration parameters.
configuration = libica.openapi.v3.Configuration(
host = "/ica/rest"
)
# 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 (JWT): JwtAuth
configuration = libica.openapi.v3.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with libica.openapi.v3.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = libica.openapi.v3.ProjectNotificationSubscriptionsApi(api_client)
project_id = 'project_id_example' # str | The ID of the project
subscription_id = 'subscription_id_example' # str | The ID of the notification subscription to update
notification_subscription = libica.openapi.v3.NotificationSubscription() # NotificationSubscription | The updated subscription
if_match = 'if_match_example' # str | Optional header parameter to enable conflict exposure. If the client provides this header, then it must contains the client's most recent value of the 'ETag' response header, and the server will respond with a 409 code if it detects a conflict. If the client does not provide this header, then the server will not do a conflict check, which means that as a client you can override the resource even when the server has a more recent version. (optional)
try:
# Update a notification subscription
api_response = api_instance.update_notification_subscription(project_id, subscription_id, notification_subscription, if_match=if_match)
print("The response of ProjectNotificationSubscriptionsApi->update_notification_subscription:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ProjectNotificationSubscriptionsApi->update_notification_subscription: %s\n" % e)
Parameters¶
Name | Type | Description | Notes |
---|---|---|---|
project_id | str | The ID of the project | |
subscription_id | str | The ID of the notification subscription to update | |
notification_subscription | NotificationSubscription | The updated subscription | |
if_match | str | Optional header parameter to enable conflict exposure. If the client provides this header, then it must contains the client's most recent value of the 'ETag' response header, and the server will respond with a 409 code if it detects a conflict. If the client does not provide this header, then the server will not do a conflict check, which means that as a client you can override the resource even when the server has a more recent version. | [optional] |
Return type¶
Authorization¶
HTTP request headers¶
- Content-Type: application/vnd.illumina.v3+json, application/json
- Accept: application/problem+json, application/vnd.illumina.v3+json
HTTP response details¶
Status code | Description | Response headers |
---|---|---|
200 | The notification subscription is successfully updated. | * ETag - The current version of the resource. Can be passed to the corresponding PUT endpoint to enable conflict exposure (409 response). |
0 | A problem occurred. | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]