You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/operate/rc/api/get-started/manage-tasks.md
+6-15Lines changed: 6 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -24,10 +24,9 @@ After you request an asynchronous operation, the operation returns a `taskId` th
24
24
25
25
Tasks are part of the API [processing and provisioning lifecycle]({{< relref "/operate/rc/api/get-started/process-lifecycle" >}}).
26
26
27
-
###Task information
27
+
## Task information
28
28
29
-
When you query a task of an asynchronous API operation,
30
-
the response to the request includes the task status and additional information about the task:
29
+
When you request an asynchronous operation, the response to the request includes the task status and additional information about the task:
31
30
32
31
```json
33
32
{
@@ -57,19 +56,15 @@ Where:
57
56
- A link to itself
58
57
- Additional links based on the context of the response
59
58
60
-
###Task status updates
59
+
## Task status updates
61
60
62
61
With the task ID, you can query the task status for updates and progress information.
63
62
The response in the above example shows a URL with the title `getTaskStatusUpdates`.
64
63
The URL in the `href` property returns updates for the specified task.
65
64
66
-
This request returns the updated status of the task identifier:
65
+
Use [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}) to check the task status.
67
66
68
-
```bash
69
-
GET "https://[host]/v1/tasks/<taskId>"
70
-
```
71
-
72
-
The response to the `getTaskStatusUpdates` request shows:
67
+
This endpoint returns information about the queried task.
73
68
74
69
```json
75
70
{
@@ -104,12 +99,8 @@ This response example shows:
104
99
105
100
### Tasks list
106
101
107
-
You can use the API operation `GET /tasks` to list the recently submitted and completed tasks for the current account.
102
+
You can use the API operation [`GET /tasks`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getAllTasks" >}}) to list the recently submitted and completed tasks for the current account.
108
103
109
104
This API operation returns a list of tasks for the current account, sorted by most recent status update.
110
105
111
-
```bash
112
-
GET "https://$HOST/tasks"
113
-
```
114
-
115
106
The result returns all the tasks submitted during the past 10 days.
Copy file name to clipboardExpand all lines: content/operate/rc/api/get-started/process-lifecycle.md
+6-20Lines changed: 6 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -10,13 +10,13 @@ description: API requests follow specific lifecycle phases and states, based on
10
10
linkTitle: API request lifecycle
11
11
weight: 60
12
12
---
13
-
All Redis Cloud [subscriptions]({{< relref "/operate/rc/subscriptions/" >}}) can leverage a RESTful API that permits operations against a variety of resources, including servers, services, and related infrastructure.
13
+
Redis Cloud owners and viewers can leverage a RESTful API that permits operations against a variety of resources, including subscriptions, databases, and related infrastructure.
14
14
15
15
[Once it's enabled]({{< relref "/operate/rc/api/get-started/enable-the-api.md" >}}), you can use the REST API to create, update, and delete subscriptions, databases, and other entities.
16
16
17
-
API operations run asynchronously, which means that provisioning occurs in the background. When you submit a request, a background process starts working on it. The response object includes an ID that lets you determine the status of the background process as it performs its work.
17
+
All create, update, and delete API operations (`POST`, `PUT`, and `DELETE`) and some query operations (`GET`) run asynchronously, which means that provisioning occurs in the background. When you submit a request, a background process, known as a **Task**, starts working on it. The response object includes an ID that lets you determine the status of the background process as it performs its work.
18
18
19
-
For operations that do not create or modify resources (such as most GET operations), the API is sychronous; that is, the response object reports the results of the request.
19
+
For operations that do not create or modify resources (such as most GET operations), the API is synchronous; that is, the response object reports the results of the request.
20
20
21
21
Asynchronous operations have two main phases: processing and provisioning. A resource is not available until both phases are complete.
22
22
@@ -30,17 +30,9 @@ During this phase, the request is received, evaluated, planned, and executed.
30
30
31
31
Many operations are asychronous, including CREATE, UPDATE, and DELETE operations. The response objects for such operations provide a `taskId` identifier that lets you track the progress of the underlying operation.
32
32
33
-
You can query the `taskId` to track the state of a specific task:
33
+
You can query the `taskId` to track the state of a specific task using [`GET /v1/tasks/{taskId}`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getTaskById" >}}).
34
34
35
-
```shell
36
-
GET "https://[host]/v1/tasks/<taskId>"
37
-
```
38
-
39
-
You can also query the state of all active tasks or recently completed tasks in your account:
40
-
41
-
```shell
42
-
GET "https://[host]/v1/tasks"
43
-
```
35
+
You can also query the state of all active tasks or recently completed tasks in your account using [`GET /tasks`]({{< relref "/operate/rc/api/api-reference#tag/Tasks/operation/getAllTasks" >}})
44
36
45
37
### Task process states
46
38
@@ -69,13 +61,7 @@ The term "provisioning" refers to all infrastructure changes required in order t
69
61
70
62
The provisioning phase may require several minutes to complete. You can query the resource identifier to track the progress of the provisioning phase.
71
63
72
-
For example, when you provision a new subscription, use this API call to query the status of the subscription:
73
-
74
-
```shell
75
-
GET "https://[host]/v1/subscriptions/<subscription-id>"
76
-
```
77
-
78
-
Where the `<subscription-id>` is the resource ID that you receive when the task is in the `processing-completed` state.
64
+
For example, when you provision a new subscription, use [`GET /v1/subscriptions/{subscriptionId}`]({{< relref "/operate/rc/api/api-reference#tag/Subscriptions-Pro/operation/getSubscriptionById" >}}), where the `{subscriptionId}` is the resource ID that you receive when the task is in the `processing-completed` state.
0 commit comments