QueryCostCenterRule
Queries cost center rules.
Operation description
Queries the parent cost center and its child cost centers.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
bss:DescribeCostUnit |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| CostCenterId |
integer |
No |
The ID of the cost center. |
597745 |
| EcIdAccountIds |
array<object> |
No |
The list of enterprises and accounts. If this parameter is left empty, the current account is queried. |
|
|
object |
No |
The list of enterprises and accounts. If this parameter is left empty, the current account is queried. |
||
| AccountIds |
array |
No |
The list of accounts to access. If this parameter is left empty, all accounts under the current entity ID are selected. |
|
|
integer |
No |
The ID of the member accounts. |
1990699401005016 |
|
| EcId |
string |
Yes |
The ID of the enterprise entity. |
1004064243473974 |
| Nbid |
string |
No |
The ID of the level-1 marketplace. If this parameter is left empty, the ID of the marketplace to which the current user belongs is used by default. |
2684201000001 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
BssApiPlainResult |
||
| CostCenterId |
integer |
The ID of the cost center. |
597745 |
| FilterExpression |
object |
The rule expression. |
|
| ExpressionType |
string |
The operation type. Valid values:
|
NARY |
| FilterValues |
object |
The sub-condition filter. |
|
| Code |
string |
The condition filter key. Valid values:
|
TAG-test-xxx-key |
| CodeName |
string |
[Deprecated] The name of the condition filter key. |
None |
| SelectType |
string |
The association between code and value. Valid values:
|
IN |
| Values |
array |
The property value type corresponding to the module code. Valid values:
|
|
|
string |
The condition filter value. Only one value can be entered when the code is INSTANCE_NICK. |
["TAG-test-xxx"] |
|
| Operand |
any |
[Deprecated] The filter condition. |
None |
| Operands |
array |
The conditional expression. |
|
|
any |
The conditional expression. For the overall structure, see the example. Multilayer nesting is supported. The following fields are for description purposes only. |
{ "Operands": [ { "FilterValues": { "Code": "TAG-xxx", "Values": [ "xxxx" ], "SelectType": "IN" }, "ExpressionType": "TAG" }, { "FilterValues": { "Code": "INSTANCE_ID", "Values": [ "xxxxx" ], "SelectType": "LIKE" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "INSTANCE_NICK", "Values": [ "111" ], "SelectType": "LIKE" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "RESOURCE_GROUP", "Values": [ "xxxxx" ], "SelectType": "IN" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "ARTICLE", "Values": [ "xxxxx" ], "SelectType": "IN" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "PRODUCT", "Values": [ "xxxxx" ], "SelectType": "IN" }, "ExpressionType": "DIMENSION" }, { "FilterValues": { "Code": "OWNER", "Values": [ "xxxxx" ], "SelectType": "IN" }, "ExpressionType": "DIMENSION" } ] } |
|
| OperatorType |
string |
The relational expression. Valid values:
|
AND |
| GmtCreate |
string |
The creation time. |
Tue Nov 12 14:49:43 CST 2024 |
| GmtModified |
string |
The modification time. |
Wed Oct 16 10:15:37 CST 2024 |
| Id |
integer |
The ID of the cost center automatic allocation rule. |
32048 |
| IsDeleted |
integer |
The deletion status. Valid values:
|
0 |
| Metadata |
any |
The metadata of the response structure. |
{} |
| OwnerAccountId |
integer |
The owner account of the cost center. |
1977800748053695 |
| RequestId |
string |
Id of the request |
UUID |
| RootCostCenterId |
integer |
The ID of the root cost center. |
0 |
| Status |
string |
The status. Valid values:
|
on |
Examples
Success response
JSON format
{
"CostCenterId": 597745,
"FilterExpression": {
"ExpressionType": "NARY",
"FilterValues": {
"Code": "TAG-test-xxx-key\n",
"CodeName": "None",
"SelectType": "IN",
"Values": [
"[\"TAG-test-xxx\"]\n"
]
},
"Operand": "None",
"Operands": [
"{\n \n \"Operands\": [\n {\n \"FilterValues\": {\n \"Code\": \"TAG-xxx\",\n \"Values\": [\n \"xxxx\"\n ],\n \"SelectType\": \"IN\"\n },\n \"ExpressionType\": \"TAG\"\n },\n {\n \"FilterValues\": {\n \"Code\": \"INSTANCE_ID\",\n \"Values\": [\n \"xxxxx\"\n ],\n \"SelectType\": \"LIKE\"\n },\n \"ExpressionType\": \"DIMENSION\"\n },\n {\n \"FilterValues\": {\n \"Code\": \"INSTANCE_NICK\",\n \"Values\": [\n \"111\"\n ],\n \"SelectType\": \"LIKE\"\n },\n \"ExpressionType\": \"DIMENSION\"\n },\n {\n \"FilterValues\": {\n \"Code\": \"RESOURCE_GROUP\",\n \"Values\": [\n \"xxxxx\"\n ],\n \"SelectType\": \"IN\"\n },\n \"ExpressionType\": \"DIMENSION\"\n },\n {\n \"FilterValues\": {\n \"Code\": \"ARTICLE\",\n \"Values\": [\n \"xxxxx\"\n ],\n \"SelectType\": \"IN\"\n },\n \"ExpressionType\": \"DIMENSION\"\n },\n {\n \"FilterValues\": {\n \"Code\": \"PRODUCT\",\n \"Values\": [\n \"xxxxx\"\n ],\n \"SelectType\": \"IN\"\n },\n \"ExpressionType\": \"DIMENSION\"\n },\n {\n \"FilterValues\": {\n \"Code\": \"OWNER\",\n \"Values\": [\n \"xxxxx\"\n ],\n \"SelectType\": \"IN\"\n },\n \"ExpressionType\": \"DIMENSION\"\n }\n ]\n }"
],
"OperatorType": "AND"
},
"GmtCreate": "Tue Nov 12 14:49:43 CST 2024",
"GmtModified": "Wed Oct 16 10:15:37 CST 2024",
"Id": 32048,
"IsDeleted": 0,
"Metadata": "{}",
"OwnerAccountId": 1977800748053695,
"RequestId": "UUID",
"RootCostCenterId": 0,
"Status": "on"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | CostCenter.MasterAndSubHasNoRelation | Your account has no valid account relation yet. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.