Skip to content

Latest commit

 

History

History
542 lines (373 loc) · 17.6 KB

RulesApi.md

File metadata and controls

542 lines (373 loc) · 17.6 KB

TheLogicStudio\CodatPHP\RulesApi

All URIs are relative to https://api.codat.io, except if the operation defines another base path.

Method HTTP request Description
rulesAlertsAlertIdGet() GET /rules/alerts/{alertId}
rulesAlertsGet() GET /rules/alerts
rulesGet() GET /rules Fetch a list of rules
rulesPost() POST /rules Subscribe to a rule
rulesRuleIdAlertsGet() GET /rules/{ruleId}/alerts
rulesRuleIdDelete() DELETE /rules/{ruleId}
rulesRuleIdGet() GET /rules/{ruleId}
rulesRuleIdPut() PUT /rules/{ruleId}

rulesAlertsAlertIdGet()

rulesAlertsAlertIdGet($alert_id): \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAlertModel

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\RulesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$alert_id = 'alert_id_example'; // string

try {
    $result = $apiInstance->rulesAlertsAlertIdGet($alert_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RulesApi->rulesAlertsAlertIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
alert_id string

Return type

\TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAlertModel

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

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

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

rulesAlertsGet()

rulesAlertsGet($page, $company_id, $page_size, $query, $order_by): \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAlertModelPagedResponseModel

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\RulesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$page = 56; // int
$company_id = 'company_id_example'; // string
$page_size = 100; // int
$query = 'query_example'; // string
$order_by = 'order_by_example'; // string

try {
    $result = $apiInstance->rulesAlertsGet($page, $company_id, $page_size, $query, $order_by);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RulesApi->rulesAlertsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int
company_id string [optional]
page_size int [optional] [default to 100]
query string [optional]
order_by string [optional]

Return type

\TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAlertModelPagedResponseModel

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

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

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

rulesGet()

rulesGet($page, $page_size, $query, $order_by): \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRulePagedResponseModel

Fetch a list of rules

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\RulesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$page = 56; // int
$page_size = 100; // int
$query = 'query_example'; // string
$order_by = 'order_by_example'; // string

try {
    $result = $apiInstance->rulesGet($page, $page_size, $query, $order_by);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RulesApi->rulesGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
page int
page_size int [optional] [default to 100]
query string [optional]
order_by string [optional]

Return type

\TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRulePagedResponseModel

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

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

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

rulesPost()

rulesPost($codat_public_api_models_rules_add_rule_model): \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule

Subscribe to a rule

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\RulesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$codat_public_api_models_rules_add_rule_model = new \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAddRuleModel(); // \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAddRuleModel | 

try {
    $result = $apiInstance->rulesPost($codat_public_api_models_rules_add_rule_model);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RulesApi->rulesPost: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
codat_public_api_models_rules_add_rule_model \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAddRuleModel [optional]

Return type

\TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

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

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

rulesRuleIdAlertsGet()

rulesRuleIdAlertsGet($rule_id, $page, $page_size, $query, $order_by): \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAlertModelPagedResponseModel

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\RulesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$rule_id = 'rule_id_example'; // string
$page = 56; // int
$page_size = 100; // int
$query = 'query_example'; // string
$order_by = 'order_by_example'; // string

try {
    $result = $apiInstance->rulesRuleIdAlertsGet($rule_id, $page, $page_size, $query, $order_by);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RulesApi->rulesRuleIdAlertsGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
rule_id string
page int
page_size int [optional] [default to 100]
query string [optional]
order_by string [optional]

Return type

\TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesAlertModelPagedResponseModel

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

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

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

rulesRuleIdDelete()

rulesRuleIdDelete($rule_id)

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\RulesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$rule_id = 'rule_id_example'; // string

try {
    $apiInstance->rulesRuleIdDelete($rule_id);
} catch (Exception $e) {
    echo 'Exception when calling RulesApi->rulesRuleIdDelete: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
rule_id string

Return type

void (empty response body)

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

rulesRuleIdGet()

rulesRuleIdGet($rule_id): \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\RulesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$rule_id = 'rule_id_example'; // string

try {
    $result = $apiInstance->rulesRuleIdGet($rule_id);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RulesApi->rulesRuleIdGet: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
rule_id string

Return type

\TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

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

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

rulesRuleIdPut()

rulesRuleIdPut($rule_id, $codat_public_api_models_rules_rule): \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure OAuth2 access token for authorization: CodatLogin
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');

// Configure API key authorization: APIKeyAuth
$config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = TheLogicStudio\CodatPHP\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');


$apiInstance = new TheLogicStudio\CodatPHP\Api\RulesApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$rule_id = 'rule_id_example'; // string
$codat_public_api_models_rules_rule = new \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule(); // \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule

try {
    $result = $apiInstance->rulesRuleIdPut($rule_id, $codat_public_api_models_rules_rule);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling RulesApi->rulesRuleIdPut: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
rule_id string
codat_public_api_models_rules_rule \TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule [optional]

Return type

\TheLogicStudio\CodatPHP\Model\CodatPublicApiModelsRulesRule

Authorization

CodatLogin, APIKeyAuth

HTTP request headers

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

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