7.6. globalmessages


消息 API.

7.6.1. createGlobalMessage

创建消息。

POST /api/v1/messages

授权: oauth2_implicit (超级:user)

请求正文模式(application/json)

创建新消息

名称描述模式

message
必需

单个消息

对象

响应
HTTP 代码描述模式

201

成功创建

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X POST "https://<quay-server.example.com>/api/v1/messages" \
    -H "Authorization: Bearer <access_token>" \
    -H "Content-Type: application/json" \
    -d '{
        "message": {
            "content": "Hi",
            "media_type": "text/plain",
            "severity": "info"
        }
    }'

7.6.2. getGlobalMessages

返回超级用户消息。

GET /api/v1/messages

授权: 

响应
HTTP 代码描述模式

200

成功调用

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X GET "https://<quay-server.example.com>/api/v1/messages" \
    -H "Authorization: Bearer <access_token>"

7.6.3. deleteGlobalMessage

删除消息。

DELETE /api/v1/message/{uuid}

授权: oauth2_implicit (超级:user)

路径参数
类型Name描述模式

path

UUID
必需

 

字符串

响应
HTTP 代码描述模式

204

已删除

 

400

错误请求

ApiError

401

需要会话

ApiError

403

未授权访问

ApiError

404

未找到

ApiError

示例命令
$ curl -X DELETE "https://<quay-server.example.com>/api/v1/message/<uuid>" \
    -H "Authorization: Bearer <access_token>"
Red Hat logoGithubRedditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

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

让开源更具包容性

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

關於紅帽

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

© 2024 Red Hat, Inc.