Looking for the old docs site? You can still view it for a limited time here.

Tasks API Concepts

Use Tasks APIs to get a list of tasks for long-running operations or the status of a specific task.

About tasks

When Managed Search receives an REST API request to perform an operation, it does one of two things:

  • Managed Search performs the operation and responds with data – For operations that can be completed quickly, Managed Search performs the operation and returns a response message that contains data (for example, a list of clusters).

  • Managed Search creates a task to perform the operation – For operations that take a while to complete (such as cluster creation), or that might take a while (such as updating a collection using PATCH), Managed Search creates a task to perform the operation. A task is a set of data-processing resources.

    The response message for the original API request contains a taskId that identifies the task. Use the Tasks API (GET with the HTTP request URI ending in tasks/taskId) to find out when the task completes. Then use other APIs to get the data you need. For example, use GET with the HTTP request URI ending in clusters/clusterId to get the attributes of a cluster.