All URIs are relative to https://api.artik.cloud/v1.1
| Method | HTTP request | Description |
|---|---|---|
| create_rule | POST /rules | Create Rule |
| delete_rule | DELETE /rules/{ruleId} | Delete Rule |
| get_rule | GET /rules/{ruleId} | Get Rule |
| update_rule | PUT /rules/{ruleId} | Update Rule |
RuleEnvelope create_rule(rule_info, user_id)
Create Rule
Create a new Rule
from __future__ import print_statement
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = artikcloud.RulesApi()
rule_info = artikcloud.RuleCreationInfo() # RuleCreationInfo | Rule object that needs to be added
user_id = 'user_id_example' # str | User ID
try:
# Create Rule
api_response = api_instance.create_rule(rule_info, user_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling RulesApi->create_rule: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| rule_info | RuleCreationInfo | Rule object that needs to be added | |
| user_id | str | User ID |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RuleEnvelope delete_rule(rule_id)
Delete Rule
Delete a Rule
from __future__ import print_statement
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = artikcloud.RulesApi()
rule_id = 'rule_id_example' # str | Rule ID.
try:
# Delete Rule
api_response = api_instance.delete_rule(rule_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling RulesApi->delete_rule: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| rule_id | str | Rule ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RuleEnvelope get_rule(rule_id)
Get Rule
Get a rule using the Rule ID
from __future__ import print_statement
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = artikcloud.RulesApi()
rule_id = 'rule_id_example' # str | Rule ID.
try:
# Get Rule
api_response = api_instance.get_rule(rule_id)
pprint(api_response)
except ApiException as e:
print("Exception when calling RulesApi->get_rule: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| rule_id | str | Rule ID. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RuleEnvelope update_rule(rule_id, rule_info)
Update Rule
Update an existing Rule
from __future__ import print_statement
import time
import artikcloud
from artikcloud.rest import ApiException
from pprint import pprint
# Configure OAuth2 access token for authorization: artikcloud_oauth
artikcloud.configuration.access_token = 'YOUR_ACCESS_TOKEN'
# create an instance of the API class
api_instance = artikcloud.RulesApi()
rule_id = 'rule_id_example' # str | Rule ID.
rule_info = artikcloud.RuleUpdateInfo() # RuleUpdateInfo | Rule object that needs to be updated
try:
# Update Rule
api_response = api_instance.update_rule(rule_id, rule_info)
pprint(api_response)
except ApiException as e:
print("Exception when calling RulesApi->update_rule: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| rule_id | str | Rule ID. | |
| rule_info | RuleUpdateInfo | Rule object that needs to be updated |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]