mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Adding TPAccountActions API documentation
This commit is contained in:
198
docs/api_tpaccountactions.rst
Normal file
198
docs/api_tpaccountactions.rst
Normal file
@@ -0,0 +1,198 @@
|
||||
Apier.SetTPAccountActions
|
||||
+++++++++++++++++++++++++
|
||||
|
||||
Creates a new AccountActions profile within a tariff plan.
|
||||
|
||||
**Request**:
|
||||
|
||||
Data:
|
||||
::
|
||||
|
||||
type ApiTPAccountActions struct {
|
||||
TPid string // Tariff plan id
|
||||
AccountActionsId string // AccountActions id
|
||||
Tenant string // Tenant's Id
|
||||
Account string // Account name
|
||||
Direction string // Traffic direction
|
||||
ActionTimingsId string // Id of ActionTimings profile to use
|
||||
ActionTriggersId string // Id of ActionTriggers profile to use
|
||||
}
|
||||
|
||||
Mandatory parameters: ``[]string{"TPid", "AccountActionsId","Tenant","Account","Direction","ActionTimingsId","ActionTriggersId"}``
|
||||
|
||||
*JSON sample*:
|
||||
::
|
||||
|
||||
{
|
||||
"id": 2,
|
||||
"method": "Apier.SetTPAccountActions",
|
||||
"params": [
|
||||
{
|
||||
"Account": "ACNT1",
|
||||
"AccountActionsId": "AA_SAMPLE_2",
|
||||
"ActionTimingsId": "SAMPLE_AT_1",
|
||||
"ActionTriggersId": "SAMPLE_ATRS_1",
|
||||
"Direction": "OUT",
|
||||
"TPid": "SAMPLE_TP_1",
|
||||
"Tenant": "TENANT1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
**Reply**:
|
||||
|
||||
Data:
|
||||
::
|
||||
|
||||
string
|
||||
|
||||
Possible answers:
|
||||
``OK`` - Success.
|
||||
|
||||
*JSON sample*:
|
||||
::
|
||||
|
||||
{
|
||||
"error": null,
|
||||
"id": 2,
|
||||
"result": "OK"
|
||||
}
|
||||
|
||||
**Errors**:
|
||||
|
||||
``MANDATORY_IE_MISSING`` - Mandatory parameter missing from request.
|
||||
|
||||
``SERVER_ERROR`` - Server error occurred.
|
||||
|
||||
``DUPLICATE`` - The specified combination of TPid/AccountActionsId already present in StorDb.
|
||||
|
||||
|
||||
Apier.GetTPAccountActions
|
||||
+++++++++++++++++++++++++
|
||||
|
||||
Queries specific AccountActions profile on tariff plan.
|
||||
|
||||
**Request**:
|
||||
|
||||
Data:
|
||||
::
|
||||
|
||||
type AttrGetTPAccountActions struct {
|
||||
TPid string // Tariff plan id
|
||||
AccountActionsId string // AccountActions id
|
||||
}
|
||||
|
||||
Mandatory parameters: ``[]string{"TPid", "AccountActionsId"}``
|
||||
|
||||
*JSON sample*:
|
||||
::
|
||||
|
||||
{
|
||||
"id": 3,
|
||||
"method": "Apier.GetTPAccountActions",
|
||||
"params": [
|
||||
{
|
||||
"AccountActionsId": "AA_SAMPLE_2",
|
||||
"TPid": "SAMPLE_TP_1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
**Reply**:
|
||||
|
||||
Data:
|
||||
::
|
||||
|
||||
type ApiTPAccountActions struct {
|
||||
TPid string // Tariff plan id
|
||||
AccountActionsId string // AccountActions id
|
||||
Tenant string // Tenant's Id
|
||||
Account string // Account name
|
||||
Direction string // Traffic direction
|
||||
ActionTimingsId string // Id of ActionTimings profile to use
|
||||
ActionTriggersId string // Id of ActionTriggers profile to use
|
||||
}
|
||||
|
||||
*JSON sample*:
|
||||
::
|
||||
|
||||
{
|
||||
"error": null,
|
||||
"id": 3,
|
||||
"result": {
|
||||
"Account": "ACNT1",
|
||||
"AccountActionsId": "AA_SAMPLE_2",
|
||||
"ActionTimingsId": "SAMPLE_AT_1",
|
||||
"ActionTriggersId": "SAMPLE_ATRS_1",
|
||||
"Direction": "OUT",
|
||||
"TPid": "SAMPLE_TP_1",
|
||||
"Tenant": "TENANT1"
|
||||
}
|
||||
}
|
||||
|
||||
**Errors**:
|
||||
|
||||
``MANDATORY_IE_MISSING`` - Mandatory parameter missing from request.
|
||||
|
||||
``SERVER_ERROR`` - Server error occurred.
|
||||
|
||||
``NOT_FOUND`` - Requested AccountActions profile not found.
|
||||
|
||||
|
||||
Apier.GetTPAccountActionIds
|
||||
+++++++++++++++++++++++++++
|
||||
|
||||
Queries AccountActions identities on specific tariff plan.
|
||||
|
||||
**Request**:
|
||||
|
||||
Data:
|
||||
::
|
||||
|
||||
type AttrGetTPAccountActionIds struct {
|
||||
TPid string // Tariff plan id
|
||||
}
|
||||
|
||||
Mandatory parameters: ``[]string{"TPid"}``
|
||||
|
||||
*JSON sample*:
|
||||
::
|
||||
|
||||
{
|
||||
"id": 4,
|
||||
"method": "Apier.GetTPAccountActionIds",
|
||||
"params": [
|
||||
{
|
||||
"TPid": "SAMPLE_TP_1"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
**Reply**:
|
||||
|
||||
Data:
|
||||
::
|
||||
|
||||
[]string
|
||||
|
||||
*JSON sample*:
|
||||
::
|
||||
|
||||
{
|
||||
"error": null,
|
||||
"id": 4,
|
||||
"result": [
|
||||
"AA_SAMPLE_1",
|
||||
"AA_SAMPLE_2"
|
||||
]
|
||||
}
|
||||
|
||||
**Errors**:
|
||||
|
||||
``MANDATORY_IE_MISSING`` - Mandatory parameter missing from request.
|
||||
|
||||
``SERVER_ERROR`` - Server error occurred.
|
||||
|
||||
``NOT_FOUND`` - There are no AccountAction profiles defined on the selected TPid.
|
||||
|
||||
|
||||
@@ -116,10 +116,10 @@ FlushCache
|
||||
Cleans all internal cached (Destinations, RatingProfiles)
|
||||
|
||||
|
||||
6.1.4. Importing API
|
||||
--------------------
|
||||
6.1.4. Tariff plan importer APIs
|
||||
--------------------------------
|
||||
|
||||
These operate on a tpid
|
||||
These operate on a tpid and are used to import the tariff plan content into storDb.
|
||||
|
||||
TariffPlan
|
||||
~~~~~~~~~~
|
||||
@@ -129,7 +129,6 @@ TariffPlan
|
||||
|
||||
api_tp
|
||||
|
||||
|
||||
Timings
|
||||
~~~~~~~
|
||||
|
||||
@@ -138,7 +137,6 @@ Timings
|
||||
|
||||
api_tptimings
|
||||
|
||||
|
||||
Destinations
|
||||
~~~~~~~~~~~~
|
||||
|
||||
@@ -147,7 +145,6 @@ Destinations
|
||||
|
||||
api_tpdestinations
|
||||
|
||||
|
||||
Rates
|
||||
~~~~~
|
||||
|
||||
@@ -156,7 +153,6 @@ Rates
|
||||
|
||||
api_tprates
|
||||
|
||||
|
||||
DestinationRates
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -165,7 +161,6 @@ DestinationRates
|
||||
|
||||
api_tpdestinationrates
|
||||
|
||||
|
||||
DestinationRateTimings
|
||||
~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -174,7 +169,6 @@ DestinationRateTimings
|
||||
|
||||
api_tpdestratetimings
|
||||
|
||||
|
||||
RateProfiles
|
||||
~~~~~~~~~~~~
|
||||
|
||||
@@ -184,7 +178,7 @@ RateProfiles
|
||||
api_tprateprofiles
|
||||
|
||||
Actions
|
||||
~~~~~~~~~~~~
|
||||
~~~~~~~
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
@@ -192,7 +186,8 @@ Actions
|
||||
api_tpactions
|
||||
|
||||
ActionTimings
|
||||
~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
@@ -200,13 +195,22 @@ ActionTimings
|
||||
api_tpactiontimings
|
||||
|
||||
ActionTriggers
|
||||
~~~~~~~~~~~~
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
api_tpactiontriggers
|
||||
|
||||
AccountActions
|
||||
~~~~~~~~~~~~~~
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
api_tpaccountactions
|
||||
|
||||
|
||||
6.1.5. Management API
|
||||
---------------------
|
||||
|
||||
Reference in New Issue
Block a user