Api server provided api for budget service and ui

Api提供接口供BudgetService通知预算到达上限

Path Method RequestBody
/api/v1/budgets/limit/notification POST BudgetLimitEventDto
@Data
public class BudgetLimitEventDto {

    private Boolean strict;

    private BudgetLimitEventType type;

    private Long userId;

    enum BudgetLimitEventType {
        GLOBAL, USER
    }

}

BudgetService提供接口供Api查询指定用户的BudgetLimit

Path Method Parameter Example ResponseBody
/api/v1/budgets/limit GET userId /api/v1/budgets/limit?userId=1 BudgetLimitDto
@Data
public class BudgetLimitDto {

    private BudgetLimitType type;

    enum BudgetLimitType {
        GLOBAL, USER, BOTH, NONE
    }

}

API提供接口供UI查询指定用户的BudgetLimit

| Path | Method | ResponseBody |
|--|--| --| -- | -- |
| /api/v1/budgets/limit | GET | BudgetLimitDto |

@Data
public class BudgetLimitDto {

    private BudgetLimitType type;

    enum BudgetLimitType {
        GLOBAL, USER, BOTH, NONE
    }

}

BudgetService提供接口供Api查询用量展示到前台

Path Method Parameter Example ResponseBody
/api/v1/budgets/usage GET userId /api/v1/budgets/usage?userId=1 CloudUsageDto
@Data
public class CloudUsageDto {

    private BigDecimal coreHours;

    private BigDecimal price;

    private BigDecimal spend;

    private BigDecimal budget;

    private BigDecimal balance;

    private Boolean strict;

}

Api提供接口供UI查询Budget用量展示到前台

| Path | Method | ResponseBody |
|--|--| --| -- | -- |
| /api/v1/budgets/usage | GET | CloudUsageDto |

@Data
public class CloudUsageDto {

    private BigDecimal coreHours;

    private BigDecimal price;

    private BigDecimal spend;

    private BigDecimal budget;

    private BigDecimal balance;

    private Boolean strict;

}
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容