OpenStack API文档¶
在你的OpenStack云中,使用OpenStack API来启动服务器云主机,创建镜像、给实例和镜像分配元数据、创建存储容器和对象以及完成其他相关的动作。
备注
The links below are grouped according to the API status that reflects the state of the endpoint on the service.
‘Current’ indicates a stable version that is up-to-date, recent, and might receive future versions. This endpoint should be prioritized over all others.
‘Supported’ is a stable version that is available on the server. However, it is not likely the most recent available and might not be updated or might be deprecated at some time in the future.
‘Deprecated’ is a stable version that is still available but is being deprecated and might be removed in the future.
‘Experimental’ is not a stable version. This version is under development or contains features that are otherwise subject to change.
For more information about API status values and version information, see Version Discovery.
The notation ‘(microversions)’ next to the link to an API reference indicates that the API follows a pattern established by the Compute service to enable small, documented changes to the API on a resource-by-resource basis.
当前API 版本¶
Application Container Service API (microversions)
Bare Metal API v1 (microversions)
Block Storage API v3 (microversions)
备注
块存储API v3在功能上等同于块存储API v2。随后的API v3微版本与API v2不同,比如v3.1。
Compute API (microversions)
Container Infrastructure Management API (microversions)
Data Protection Orchestration v1
Domain Name Server (DNS) API v2
Placement API (microversions)
Shared File Systems API v2 (microversions)
备注
共享文件系统API v1版本与 v2版本在功能上是一致的。随后的API v2微版本,例如v2.1,与API v1是不同的。
支持的API版本¶
不支持的API版本¶
备注
块存储API v3在功能上等同于块存储API v2。随后的API v3微版本与API v2不同,比如v3.1。
API 快速入门示例¶
With the TryStack OpenStack installation, these services work together in the background of the installation, and many of these examples work on TryStack.
当你通过认证服务认证后,你可以使用其他的 OpenStack API 来创建和管理你OpenStack云环境下的资源。你可以通过计算服务API或者 OpenStack 命令行客户端启动用镜像创建的实例以及为云主机配置参数。
使用如下的方法之一发送 API 请求:
cURL
命令行工具可以让你发送HTTP请求和接收响应。请参考`openstack_API_quick_guide`部分。
OpenStack命令行客户端
OpenStack工程提供了一个能够让你通过简单命令去访问APIs的命令行客户端,请参考`client-intro`。
REST客户端
Both Mozilla and Google provide browser-based graphical interfaces for REST. For Firefox, see RESTClient. For Chrome, see rest-client.
OpenStack Python软件开发工具包(SDK)
你可以使用SDK编写自动化Python脚本,用于创建和管理你的Openstack云环境中的资源。SDK实现了Python绑定OpenStack API,这能够让你使用Python实现自动化任务通过调用Python对象,而不用直接调用REST接口。所有的OpenStack命令行工具都可以使用Python SDK实现。在*OpenStack Python SDK *中查看`OpenStack Python SDK <https://docs.openstack.org/user-guide/sdk.html>`。