[フレーム]
Docs Pricing
Login Book a meeting Try Redis

The API request lifecycle

API requests follow specific lifecycle phases and states, based on the complexity and length of execution of the operation.

Redis Cloud

Redis Cloud owners and viewers can leverage a REST API that permits operations against a variety of resources, including subscriptions, databases, and related infrastructure.

Once it's enabled, you can use the REST API to create, update, and delete subscriptions, databases, and other entities.

All create, update, and delete API operations (POST, PUT, and DELETE) and some query operations (GET) run asynchronously, which means that provisioning or processing 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 works.

For operations that do not create or modify resources or do not require additional processing (such as most GET operations), the API is synchronous; that is, the response object reports the results of the request.

Asynchronous operations have two main phases: processing and provisioning. A resource is not available until both phases are complete.

Task processing

During this phase, the request is received, evaluated, planned, and executed.

Use tasks to track requests

The response objects for all asynchronous operations provide a taskId identifier that lets you track the progress of the underlying operation.

You can query the taskId to track the state of a specific task using GET /v1/tasks/{taskId}.

You can also query the state of all active tasks or recently completed tasks in your account using GET /tasks.

Task process states

During the processing of a request, the task moves through these states:

Note:
A task that reaches the received state cannot be cancelled and it will await completion (i.e. processing and provisioning). If you wish to undo an operation that was performed by a task, perform a compensating action (for example: delete a subscription that was created unintentionally)

Task provisioning phase

When the processing phase succeeds and the task is in the processing-completed state, the provisioning phase starts. During the provisioning phase, the API orchestrates all of the infrastructure, resources, and dependencies required by the request.

Note:
The term "provisioning" refers to all infrastructure changes required in order to apply the request. This includes provisioning new or additional infrastructure.

The provisioning phase may require several minutes to complete. You can query the resource identifier to track the progress of the provisioning phase.

For example, when you provision a new subscription, use GET /v1/subscriptions/{subscriptionId}, where the {subscriptionId} is the resource ID that you receive when the task is in the processing-completed state.

Provisioning state values

During the provisioning of a resource (such as a subscription, database, or cloud account) the resource transitions through these states:

Process limitations

The following limitations apply to asynchronous operations:

RATE THIS PAGE
Back to top ↑

On this page

AltStyle によって変換されたページ (->オリジナル) /