All URIs are relative to https://api.wordlift.io
Method | HTTP request | Description |
---|---|---|
get_account | GET /accounts/{id} | Get an account. |
list_accounts | GET /accounts | List |
update_account | PUT /accounts/{id} | Update an account. |
Account get_account(id)
Get an account.
Get the account
- Api Key Authentication (ApiKey):
import wordlift_client
from wordlift_client.models.account import Account
from wordlift_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.wordlift.io
# See configuration.py for a list of all supported configuration parameters.
configuration = wordlift_client.Configuration(
host = "https://api.wordlift.io"
)
# 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: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
async with wordlift_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = wordlift_client.AccountsApi(api_client)
id = 56 # int |
try:
# Get an account.
api_response = await api_instance.get_account(id)
print("The response of AccountsApi->get_account:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountsApi->get_account: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Found | - |
401 | Authentication Failure | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PageActiveAccount list_accounts(cursor=cursor, limit=limit, can_content_generation=can_content_generation, include_entity_count=include_entity_count, include_all_accounts=include_all_accounts, include_subscription=include_subscription, url=url, ng_dataset_id=ng_dataset_id)
List
List the accounts
- Api Key Authentication (ApiKey):
import wordlift_client
from wordlift_client.models.page_active_account import PageActiveAccount
from wordlift_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.wordlift.io
# See configuration.py for a list of all supported configuration parameters.
configuration = wordlift_client.Configuration(
host = "https://api.wordlift.io"
)
# 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: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
async with wordlift_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = wordlift_client.AccountsApi(api_client)
cursor = 'cursor_example' # str | The cursor (optional)
limit = 10 # int | (optional) (default to 10)
can_content_generation = True # bool | Filter accounts that can or cannot do Content Generation (optional)
include_entity_count = False # bool | Add entity count data (optional) (default to False)
include_all_accounts = False # bool | Include all the accounts the user has access to (optional) (default to False)
include_subscription = False # bool | Include the subscription data (optional) (default to False)
url = 'url_example' # str | The URL (optional)
ng_dataset_id = 'ng_dataset_id_example' # str | The dataset id (optional)
try:
# List
api_response = await api_instance.list_accounts(cursor=cursor, limit=limit, can_content_generation=can_content_generation, include_entity_count=include_entity_count, include_all_accounts=include_all_accounts, include_subscription=include_subscription, url=url, ng_dataset_id=ng_dataset_id)
print("The response of AccountsApi->list_accounts:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountsApi->list_accounts: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
cursor | str | The cursor | [optional] |
limit | int | [optional] [default to 10] | |
can_content_generation | bool | Filter accounts that can or cannot do Content Generation | [optional] |
include_entity_count | bool | Add entity count data | [optional] [default to False] |
include_all_accounts | bool | Include all the accounts the user has access to | [optional] [default to False] |
include_subscription | bool | Include the subscription data | [optional] [default to False] |
url | str | The URL | [optional] |
ng_dataset_id | str | The dataset id | [optional] |
- Content-Type: Not defined
- Accept: application/vnd.wordlift.accounts+json;version=1
Status code | Description | Response headers |
---|---|---|
200 | Found | - |
401 | Authentication Failure | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Account update_account(id, update_account_request)
Update an account.
Update the account
- Api Key Authentication (ApiKey):
import wordlift_client
from wordlift_client.models.account import Account
from wordlift_client.models.update_account_request import UpdateAccountRequest
from wordlift_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.wordlift.io
# See configuration.py for a list of all supported configuration parameters.
configuration = wordlift_client.Configuration(
host = "https://api.wordlift.io"
)
# 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: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
async with wordlift_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = wordlift_client.AccountsApi(api_client)
id = 56 # int |
update_account_request = wordlift_client.UpdateAccountRequest() # UpdateAccountRequest |
try:
# Update an account.
api_response = await api_instance.update_account(id, update_account_request)
print("The response of AccountsApi->update_account:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling AccountsApi->update_account: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
id | int | ||
update_account_request | UpdateAccountRequest |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Found | - |
401 | Authentication Failure | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]