All URIs are relative to https://api.artik.cloud/v1.1
| Method | HTTP request | Description |
|---|---|---|
| createRule | POST /rules | Create Rule |
| deleteRule | DELETE /rules/{ruleId} | Delete Rule |
| getRule | GET /rules/{ruleId} | Get Rule |
| updateRule | PUT /rules/{ruleId} | Update Rule |
RuleEnvelope createRule(ruleInfo, userId)
Create Rule
Create a new Rule
// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.RulesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");
RulesApi apiInstance = new RulesApi();
RuleCreationInfo ruleInfo = new RuleCreationInfo(); // RuleCreationInfo | Rule object that needs to be added
String userId = "userId_example"; // String | User ID
try {
RuleEnvelope result = apiInstance.createRule(ruleInfo, userId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RulesApi#createRule");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| ruleInfo | RuleCreationInfo | Rule object that needs to be added | |
| userId | String | User ID |
- Content-Type: Not defined
- Accept: application/json
RuleEnvelope deleteRule(ruleId)
Delete Rule
Delete a Rule
// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.RulesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");
RulesApi apiInstance = new RulesApi();
String ruleId = "ruleId_example"; // String | Rule ID.
try {
RuleEnvelope result = apiInstance.deleteRule(ruleId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RulesApi#deleteRule");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| ruleId | String | Rule ID. |
- Content-Type: Not defined
- Accept: application/json
RuleEnvelope getRule(ruleId)
Get Rule
Get a rule using the Rule ID
// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.RulesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");
RulesApi apiInstance = new RulesApi();
String ruleId = "ruleId_example"; // String | Rule ID.
try {
RuleEnvelope result = apiInstance.getRule(ruleId);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RulesApi#getRule");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| ruleId | String | Rule ID. |
- Content-Type: Not defined
- Accept: application/json
RuleEnvelope updateRule(ruleId, ruleInfo)
Update Rule
Update an existing Rule
// Import classes:
//import cloud.artik.client.ApiClient;
//import cloud.artik.client.ApiException;
//import cloud.artik.client.Configuration;
//import cloud.artik.client.auth.*;
//import cloud.artik.api.RulesApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: artikcloud_oauth
OAuth artikcloud_oauth = (OAuth) defaultClient.getAuthentication("artikcloud_oauth");
artikcloud_oauth.setAccessToken("YOUR ACCESS TOKEN");
RulesApi apiInstance = new RulesApi();
String ruleId = "ruleId_example"; // String | Rule ID.
RuleUpdateInfo ruleInfo = new RuleUpdateInfo(); // RuleUpdateInfo | Rule object that needs to be updated
try {
RuleEnvelope result = apiInstance.updateRule(ruleId, ruleInfo);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling RulesApi#updateRule");
e.printStackTrace();
}| Name | Type | Description | Notes |
|---|---|---|---|
| ruleId | String | Rule ID. | |
| ruleInfo | RuleUpdateInfo | Rule object that needs to be updated |
- Content-Type: Not defined
- Accept: application/json