Skip to content

Latest commit

 

History

History
320 lines (236 loc) · 12.1 KB

ExternalFeedsApi.md

File metadata and controls

320 lines (236 loc) · 12.1 KB

brevo_python.ExternalFeedsApi

All URIs are relative to https://api.brevo.com/v3

Method HTTP request Description
create_external_feed POST /feeds Create an external feed
delete_external_feed DELETE /feeds/{uuid} Delete an external feed
get_all_external_feeds GET /feeds Fetch all external feeds
get_external_feed_by_uuid GET /feeds/{uuid} Get an external feed by UUID
update_external_feed PUT /feeds/{uuid} Update an external feed

create_external_feed

InlineResponse2015 create_external_feed(create_external_feed)

Create an external feed

This endpoint will create an external feed.

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.ExternalFeedsApi(brevo_python.ApiClient(configuration))
create_external_feed = brevo_python.CreateExternalFeed() # CreateExternalFeed | Values to create a feed

try:
    # Create an external feed
    api_response = api_instance.create_external_feed(create_external_feed)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalFeedsApi->create_external_feed: %s\n" % e)

Parameters

Name Type Description Notes
create_external_feed CreateExternalFeed Values to create a feed

Return type

InlineResponse2015

Authorization

api-key, partner-key

HTTP request headers

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

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

delete_external_feed

delete_external_feed(uuid)

Delete an external feed

This endpoint will delete an external feed.

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.ExternalFeedsApi(brevo_python.ApiClient(configuration))
uuid = 'uuid_example' # str | UUID of the feed to delete

try:
    # Delete an external feed
    api_instance.delete_external_feed(uuid)
except ApiException as e:
    print("Exception when calling ExternalFeedsApi->delete_external_feed: %s\n" % e)

Parameters

Name Type Description Notes
uuid str UUID of the feed to delete

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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

get_all_external_feeds

GetAllExternalFeeds get_all_external_feeds(search=search, start_date=start_date, end_date=end_date, sort=sort, auth_type=auth_type, limit=limit, offset=offset)

Fetch all external feeds

This endpoint can fetch all created external feeds.

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.ExternalFeedsApi(brevo_python.ApiClient(configuration))
search = 'search_example' # str | Can be used to filter records by search keyword on feed name (optional)
start_date = '2013-10-20' # date | Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. (optional)
end_date = '2013-10-20' # date | Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. (optional)
sort = 'desc' # str | Sort the results in the ascending/descending order of record creation. Default order is **descending** if `sort` is not passed. (optional) (default to desc)
auth_type = 'auth_type_example' # str | Filter the records by `authType` of the feed. (optional)
limit = 50 # int | Number of documents returned per page. (optional) (default to 50)
offset = 0 # int | Index of the first document on the page. (optional) (default to 0)

try:
    # Fetch all external feeds
    api_response = api_instance.get_all_external_feeds(search=search, start_date=start_date, end_date=end_date, sort=sort, auth_type=auth_type, limit=limit, offset=offset)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalFeedsApi->get_all_external_feeds: %s\n" % e)

Parameters

Name Type Description Notes
search str Can be used to filter records by search keyword on feed name [optional]
start_date date Mandatory if `endDate` is used. Starting date (YYYY-MM-DD) from which you want to fetch the list. Can be maximum 30 days older than current date. [optional]
end_date date Mandatory if `startDate` is used. Ending date (YYYY-MM-DD) till which you want to fetch the list. Maximum time period that can be selected is one month. [optional]
sort str Sort the results in the ascending/descending order of record creation. Default order is descending if `sort` is not passed. [optional] [default to desc]
auth_type str Filter the records by `authType` of the feed. [optional]
limit int Number of documents returned per page. [optional] [default to 50]
offset int Index of the first document on the page. [optional] [default to 0]

Return type

GetAllExternalFeeds

Authorization

api-key, partner-key

HTTP request headers

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

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

get_external_feed_by_uuid

GetExternalFeedByUUID get_external_feed_by_uuid(uuid)

Get an external feed by UUID

This endpoint will update an external feed.

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.ExternalFeedsApi(brevo_python.ApiClient(configuration))
uuid = 'uuid_example' # str | UUID of the feed to fetch

try:
    # Get an external feed by UUID
    api_response = api_instance.get_external_feed_by_uuid(uuid)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling ExternalFeedsApi->get_external_feed_by_uuid: %s\n" % e)

Parameters

Name Type Description Notes
uuid str UUID of the feed to fetch

Return type

GetExternalFeedByUUID

Authorization

api-key, partner-key

HTTP request headers

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

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

update_external_feed

update_external_feed(uuid, update_external_feed)

Update an external feed

This endpoint will update an external feed.

Example

from __future__ import print_function
import time
import brevo_python
from brevo_python.rest import ApiException
from pprint import pprint

# Configure API key authorization: api-key
configuration = brevo_python.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['api-key'] = 'Bearer'
# Configure API key authorization: partner-key
configuration = brevo_python.Configuration()
configuration.api_key['partner-key'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['partner-key'] = 'Bearer'

# create an instance of the API class
api_instance = brevo_python.ExternalFeedsApi(brevo_python.ApiClient(configuration))
uuid = 'uuid_example' # str | UUID of the feed to update
update_external_feed = brevo_python.UpdateExternalFeed() # UpdateExternalFeed | Values to update a feed

try:
    # Update an external feed
    api_instance.update_external_feed(uuid, update_external_feed)
except ApiException as e:
    print("Exception when calling ExternalFeedsApi->update_external_feed: %s\n" % e)

Parameters

Name Type Description Notes
uuid str UUID of the feed to update
update_external_feed UpdateExternalFeed Values to update a feed

Return type

void (empty response body)

Authorization

api-key, partner-key

HTTP request headers

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

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