作请求

作请求

Redis 企业软件
方法 路径 描述
获取 /v1/actions 获取所有作
获取 /v1/actions/{uid} 获取单个作

获取所有作

GET /v1/actions

获取所有实体(集群、节点和数据库)上所有作(executing、queued 或 completed)的状态。此 API 跟踪返回task_idaction_uid.

所需权限

权限名称
view_status_of_cluster_action

请求

HTTP 请求示例

GET /v1/actions

响应

返回一个 JSON作对象数组和一个状态机对象数组。

无论作的来源如何,响应中的每个作都包含以下属性:name,action_uid,statusprogress.

示例 JSON 正文

{
  "actions": [
    {
      "action_uid": "159ca2f8-7bf3-4cda-97e8-4eb560665c28",
      "name": "retry_bdb",
      "node_uid": "2",
      "progress": "100",
      "status": "completed",
      "task_id": "159ca2f8-7bf3-4cda-97e8-4eb560665c28"
    },
    {
      "action_uid": "661697c5-c747-41bd-ab81-ffc8fd13c494",
      "name": "retry_bdb",
      "node_uid": "1",
      "progress": "100",
      "status": "completed",
      "task_id": "661697c5-c747-41bd-ab81-ffc8fd13c494"
    }
  ],
  "state-machines": [
    {
      "action_uid": "a10586b1-60bc-428e-9bc6-392eb5f0d8ae",
      "heartbeat": 1650378874,
      "name": "SMCreateBDB",
      "object_name": "bdb:1",
      "progress": 100,
      "status": "completed"
    }
  ]
}

Status codes

Code Description
200 OK No error, response provides info about an ongoing action
404 Not Found Action does not exist (i.e. not currently running and no available status of last run).

Get a specific action

GET /v1/actions/{uid}

Get the status of a currently executing, queued, or completed action.

Required permissions

Permission name
view_status_of_cluster_action

Request

Example HTTP request

GET /v1/actions/{uid}

URL parameters

Field Type Description
uid string The action_uid to check

Response

Returns an action object.

Regardless of an action’s source, each action contains the following attributes: name, action_uid, status, and progress.

Example JSON body

{
  "action_uid": "159ca2f8-7bf3-4cda-97e8-4eb560665c28",
  "name": "retry_bdb",
  "node_uid": "2",
  "progress": "100",
  "status": "completed",
  "task_id": "159ca2f8-7bf3-4cda-97e8-4eb560665c28"
}

Status codes

Code Description
200 OK No error, response provides info about an ongoing action
404 Not Found Action does not exist (i.e. not currently running and no available status of last run)
RATE THIS PAGE
Back to top ↑