import cyberwave.rest
from cyberwave.rest.models.opportunity_schema import OpportunitySchema
from cyberwave.rest.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to http://localhost
# See configuration.py for a list of all supported configuration parameters.
configuration = cyberwave.rest.Configuration(
host = "http://localhost"
)
# 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: CustomTokenAuthentication
configuration.api_key['CustomTokenAuthentication'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['CustomTokenAuthentication'] = 'Bearer'
# Enter a context with an instance of the API client
with cyberwave.rest.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = cyberwave.rest.CRMApi(api_client)
opportunity_type = 'opportunity_type_example' # str | (optional)
year = 56 # int | (optional)
is_archived = True # bool | (optional)
workspace_uuid = 'workspace_uuid_example' # str | (optional)
try:
# List Opportunities
api_response = api_instance.src_app_api_crm_list_opportunities(opportunity_type=opportunity_type, year=year, is_archived=is_archived, workspace_uuid=workspace_uuid)
print("The response of CRMApi->src_app_api_crm_list_opportunities:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling CRMApi->src_app_api_crm_list_opportunities: %s\n" % e)