Credit allocation rules and usage
POST/license/api/v1/credit-allocation-rules
Get credit allocation rules and usage with pagination.
Request
- application/json
Body
timeRange object
Time range for credit allocation rule request
Possible values: [relative
, absolute
, to_now
, from_now
]
One of 'relative', 'absolute', 'to_now', or 'from_now'
value object
Time range value for credit allocation rule request. For relative, provide an object with unit and amount fields. For absolute, provide an object with startTime and endTime fields. For to_now or from_now, provide a string time unit.
Possible values: [hour
, day
, week
, month
, year
]
Time unit when type=relative, to_now, or from_now. The unit 'week' is only supported when type=relative.
Possible values: >= 1
Number of time units when type=relative
Start time when type=absolute. startTime must be milli-seconds since epoch.
End time when type=absolute. endTime must be milli-seconds since epoch.
Filter rules by name
Filter by account group ids
Possible values: [AboveThreshold
, BelowThreshold
]
Filter by above or below threshold
Possible values: >= 1
Limit of items per page. Values greater than 1000 are set to 1000. Default is 300.
The pageToken returned from a previous call to this endpoint. The next page is returned.
Responses
- 200
- 400
Success
- */*
- Schema
- Example (from schema)
Schema
- Array [
- ]
rules object[]
Credit allocation rules. Null when no rules.
Unique id. Ignored on create. Must match path param on update.
Customer id. Ignored on create and update.
Customer prisma id. Ignored on create and update.
Possible values: non-empty
and <= 200 characters
Rule name. Must be non-empty and unique. Required on create. Ignored on update if null.
Possible values: [AccountGroup
]
Must be 'AccountGroup'. Required on create. Ignored on update if null.
Possible values: <= 2147483647
Credits allocated to this rule. Required on create. Ignored on update if null.
Possible values: <= 100
Percent usage of allocatedCredits to trigger alarm. Required on create. Ignored on update if null.
Possible values: >= 1
, <= 2147483647
Account group ids. Must be at least one. Required on create. Ignored on update if null.
Credit usage for the requested time period
Percent credit usage of the rule allocated credits
Non-null when there is another page of rules available. Use value as 'pageToken' to get the next page.
{
"rules": [
{
"id": "string",
"customerId": 0,
"prismaId": 0,
"name": "string",
"targetType": "AccountGroup",
"allocatedCredits": 0,
"alarmThreshold": 0,
"accountGroups": [
"string"
],
"usedCredits": 0,
"percentage": 0
}
],
"pageToken": "string"
}
invalid_parameter_value
- */*
- Schema
- Example (from schema)
Schema
timestamp
Http status
Error message
Error message
Request path
{
"timestamp": "string",
"status": 0,
"error": "string",
"message": "string",
"path": "string"
}