了解在 Oracle API Platform Cloud Service
您的 REST API 是一项重要的开发投资,当您具有成百上千个 API 时,一次发布、监视、控制和停用这些 API 可能会是一项耗时的任务。您可以使用 Oracle API Platform Cloud Service REST 功能自动将 API 加载到平台的过程。
Oracle API Platform Cloud Service 允许您一次注册和管理多个应用程序编程接口 (Application Programming Interface,API) 的生命周期。在 Oracle API Platform Cloud Service 中,您可以发布、监视和停用 API,控制和管理 API 访问,跟踪资源消耗和错误率,以及管理这些 API 的使用者。
如果您有大量需要作为简单 API 发布的后端服务,请使用 Oracle API Platform Cloud Service REST API 创建实用程序脚本并自动执行流程,例如在平台中创建和部署 API。
体系结构
您可以使用管理服务 REST API 开发将 API 上载和部署到 Oracle API Platform Cloud Service 的 Python 实用程序脚本。

插图 upload-utility-bulk-api-platform-cloud-service.png 的说明
upload-utility-bulk-api-platform-cloud-service.zip
使用以下工作流开发 Python 实用程序:
- 创建一个 Python 配置帮助程序文件 (
.py),在其中配置实用程序的输入,定义 REST 端点,与 Oracle API Platform Cloud Service 服务器的连接详细信息,以及传递给上载实用程序程序的 JSON 模板变量。 - 创建包含 API 信息的 CSV 文件。每行表示一个 API。可以使用每行的信息为每个请求创建 JavaScript 对象(采用 JSON 表示法)。
- 您可以开发主 Python 实用程序脚本,该脚本会查询用户获取其身份证明,以逐个将多个 API 部署到 API Platform Cloud Service 。
- 运行主 Python 实用程序
.py脚本以触发整个进程。
关于必需的服务、组件和角色
您需要访问以下服务以及安装的工具来创建 API 并将其部署到 Oracle API Platform Cloud Service:
-
Oracle API Platform Cloud Service
- 要使用 API Platform Cloud Service ,需要订阅 Oracle Identity Cloud Service 。
- 安装了 Python 2。7 或 3.x 以开发和执行该实用程序。
You need to have the following role to use the REST APIs from Oracle API Platform Cloud Service.
| 服务名:职责 | 要求 ... |
|---|---|
| Oracle API Platform Cloud Service: API Manager role or membership in a group that has the API Manager role | Use the REST API for the Management Service in Oracle API Platform Cloud Service |
要获取所需的云服务,请参阅 了解如何获取 Oracle 解决方案的 Oracle Cloud 服务 。