APIs are increasingly becoming new business assets for organizations and consequently, API functionality and its pricing should be precisely defined for customers. Pricing is typically composed by different plans that specify a range of limitations, e.g., a Free plan allows 100 monthly requests while a Gold plan has 10000 requests per month. In this context, the OpenAPI Specification (OAS) has emerged to model the functional part of an API, becoming a de facto industry standard and boosting a rich ecosystem of vendor-neutral tools to assist API providers and consumers. In contrast, there is no proposal for modeling API pricings (i.e. their plans and limitations) and this lack hinders the creation of tools that can leverage this information. To deal with this gap, this paper presents a pricing modeling framework that includes: (a) Pricing4APIs model, a comprehensive and rigorous model of API pricings, along SLA4OAI, a serialization that extends OAS; (b) an operation to validate the description of API pricings, with a toolset (sla4oai-analyzer) that has been developed to automate this operation. Additionally, we analyzed 268 real-world APIs to assess the expressiveness of our proposal and created a representative dataset of 54 pricing models to validate our framework.
翻译:API正日益成为组织的新型商业资产,因此API功能及其定价需向客户精确定义。定价通常由不同套餐构成,这些套餐规定了各项限制,例如免费套餐允许每月100次请求,而黄金套餐则允许每月10000次请求。在此背景下,OpenAPI规范(OAS)已出现用于建模API功能部分,成为事实上的行业标准,并推动了丰富的供应商中立工具生态系统,以辅助API提供者和消费者。然而,目前尚无针对API定价(即其套餐与限制)建模的提案,这一缺失阻碍了能够利用此类信息的工具开发。为解决此问题,本文提出一个定价建模框架,包括:(a) Pricing4APIs模型——一个全面且严谨的API定价模型,以及SLA4OAI——一种扩展OAS的序列化方式;(b) 验证API定价描述的运算过程,并配套开发了自动化该运算的工具集(sla4oai-analyzer)。此外,我们分析了268个真实世界API以评估所提模型的表现力,并创建了包含54个定价模型的代表性数据集以验证框架有效性。