All URIs are relative to https://api.sparkfly.com
Method | HTTP request | Description |
---|---|---|
create_channel | POST /v1.0/channels | Create a channel |
delete_channel | DELETE /v1.0/channels/{channel_id} | Delete channel by ID |
get_channel | GET /v1.0/channels/{channel_id} | Get channel by ID |
get_channels | GET /v1.0/channels | Get channels |
update_channel | PUT /v1.0/channels/{channel_id} | Update channel by ID |
ChannelResponse create_channel(channel_input_request=channel_input_request)
Create a channel
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.channel_input_request import ChannelInputRequest
from sparkfly_client.models.channel_response import ChannelResponse
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# 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 API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.ChannelsApi(api_client)
channel_input_request = sparkfly_client.ChannelInputRequest() # ChannelInputRequest | Channel to add (optional)
try:
# Create a channel
api_response = api_instance.create_channel(channel_input_request=channel_input_request)
print("The response of ChannelsApi->create_channel:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ChannelsApi->create_channel: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_input_request | ChannelInputRequest | Channel to add | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Channel successfully created | * Cache-Control - * Content-Length - * Content-Type - * Date - * Etag - * Location - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
400 | Error parsing request | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
delete_channel(channel_id)
Delete channel by ID
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# 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 API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.ChannelsApi(api_client)
channel_id = 56 # int | The id of the channel
try:
# Delete channel by ID
api_instance.delete_channel(channel_id)
except Exception as e:
print("Exception when calling ChannelsApi->delete_channel: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_id | int | The id of the channel |
void (empty response body)
- Content-Type: Not defined
- Accept: Not defined
Status code | Description | Response headers |
---|---|---|
200 | Successful deletion | * Cache-Control - * Content-Length - * Content-Type - * Date - * Etag - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
404 | Channel was not found by id | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChannelResponse get_channel(channel_id)
Get channel by ID
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.channel_response import ChannelResponse
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# 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 API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.ChannelsApi(api_client)
channel_id = 56 # int | The id of the channel
try:
# Get channel by ID
api_response = api_instance.get_channel(channel_id)
print("The response of ChannelsApi->get_channel:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ChannelsApi->get_channel: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_id | int | The id of the channel |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Channel to be returned | * Cache-Control - * Content-Length - * Date - * Etag - * Server - * Set-Cookie - * X-Auth-Token - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChannelList get_channels()
Get channels
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.channel_list import ChannelList
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# 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 API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.ChannelsApi(api_client)
try:
# Get channels
api_response = api_instance.get_channels()
print("The response of ChannelsApi->get_channels:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ChannelsApi->get_channels: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | successful retrieval of channels | * Cache-Control - * Content-Length - * Date - * Etag - * Server - * Set-Cookie - * X-Auth-Token - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ChannelResponse update_channel(channel_id, channel_input_request=channel_input_request)
Update channel by ID
- Api Key Authentication (X-Auth-Token):
import time
import os
import sparkfly_client
from sparkfly_client.models.channel_input_request import ChannelInputRequest
from sparkfly_client.models.channel_response import ChannelResponse
from sparkfly_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.sparkfly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = sparkfly_client.Configuration(
host = "https://api.sparkfly.com"
)
# 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 API key authorization: X-Auth-Token
configuration.api_key['X-Auth-Token'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['X-Auth-Token'] = 'Bearer'
# Enter a context with an instance of the API client
with sparkfly_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = sparkfly_client.ChannelsApi(api_client)
channel_id = 56 # int | The id of the channel
channel_input_request = sparkfly_client.ChannelInputRequest() # ChannelInputRequest | Fields of channel to update in system (optional)
try:
# Update channel by ID
api_response = api_instance.update_channel(channel_id, channel_input_request=channel_input_request)
print("The response of ChannelsApi->update_channel:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ChannelsApi->update_channel: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
channel_id | int | The id of the channel | |
channel_input_request | ChannelInputRequest | Fields of channel to update in system | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully updated channel | * Cache-Control - * Content-Length - * Date - * Etag - * Server - * Set-Cookie - * X-Auth-Token - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
400 | Error parsing request | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * Set-Cookie - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
401 | Unauthorized | * Cache-Control - * Content-Length - * Content-Type - * Date - * Server - * X-Request-Id - * X-Runtime - * X-Ua-Compatible - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]