此内容没有您所选择的语言版本。

Chapter 1. Interacting with Red Hat Lightspeed APIs


Red Hat Lightspeed is a predictive analytics service that helps identify and remediate security, performance, and availability threats to your Red Hat infrastructure. Red Hat Lightspeed is built on APIs (Application Program Interfaces) that supply data and functionality to its various applications. The Red Hat Lightspeed front end (the user interface, or UI) directly communicates with the back end API (the server) to retrieve and display information. You can interact with Red Hat Lightspeed through the UI, or create your own custom clients to connect directly to the back end API.

You can use API commands to interact with web services to perform various operations, such as retrieving data, sending data, updating records, and deleting records. Using APIs to interact with Red Hat Lightspeed enables you to perform Red Hat Lightspeed operations synchronously or asynchronously, depending on the service and endpoint. The Inventory export service is an example of an asynchronous operation, but most operations work synchronously. You can incorporate API calls into your web-based applications, and you can even automate them.

Using APIs presents many advantages, including:

  • Better security — Instead of granting users access to data on your server, you can create a structured URL that they can use to request information. This helps to protect sensitive data.
  • APIs allow computers to interact directly with other computers.
  • APIs can be scripted. You can configure automation to run scripts on demand.

Red Hat Lightspeed APIs follow the OpenAPI specification. By default, all Red Hat Lightspeed API resources are represented in application/json format. In addition, you can also export reports, inventory and maintenance plans as text/csv.

1.1. About REST API and HTTP methods

REST (Representational State Transfer) API is a set of rules and conventions for building and interacting with web services. REST APIs use URLs as resources to communicate with servers using HTTP requests.

HTTP methods perform CRUD (Create, Read, Update, and Delete) operations on API resources. The most common HTTP methods used are:

  • GET (retrieve data)
  • POST (send data)
  • PUT (insert data)
  • DELETE (remove data)
  • PATCH (update data)

An API request (also known as an API call) requests that the server perform the operation that the HTTP method describes (for example, GET) from the location that the request specifies.

Additional resources

1.2. Response Codes

APIs return numerical status codes that indicate whether an API call was successfully processed by the server. If the call fails, the server returns a status code that describes the reason for the failure. The following table shows types of API response codes:

Expand

Response code

Response

Description

100/1xx

Request received

Informational codes. The server has received the request.

200/2xx

Success

200 = The server has successfully processed the request.

2xx = The request has succeeded, and more information is available.

300/3xx

Redirect

The URL/URI of the requested resource exists at a different location than the one you requested.

400/4xx

Client Error

The request failed.

400 = Bad request

404 = Server not found/resource not found

4xx = The request failed, and the cause of the failure is described.

500/5xx

Server Error

The server cannot handle the request.

Additional resources

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部