Skip to content

Latest commit

 

History

History
40 lines (24 loc) · 2.6 KB

File metadata and controls

40 lines (24 loc) · 2.6 KB

Task API

The Task API provides a standardized way to manage and track long-running or background operations in the Marketplace Platform.

A task represents an operation that may take some time, has progress, task logs, and a result. With this API, you can:

  • Create a new task, for example, to start a buyer transfer.
  • Update progress, ETA, and parameters within a task. Only the owner service or extension can update a task.
  • Get task results, which may include a JSON result or redirect to a resource if the result is a file.
  • Transition the task status to queued, processing, completed, rescheduled, or failed.
  • Get detailed logs containing additional information regarding task execution.

Before you begin

Review the shared API docs before you work with task resources.

Core resources

The Task API is built around the following core resources:

  • Task – Represents the state of an asynchronous, usually long-running operation.
  • Task log – Represents additional information regarding the execution of the task.

Browse collections

The API is organized into collections, each containing a set of operations. Access to these operations varies by role, depending on whether you are a client, vendor, or operations user.

See the following sections to determine which roles are authorized to perform specific operations within each collection:

Tasks

OperationMethodDescriptionAccess
Create taskPOSTCreates a task.svc
List tasksGETGets a list of tasks.ops, svc, vendor, client
Get task by idGETGets a task by id.ops, svc, vendor, client
Get task resultGETRedirects to a platform resource or returns a result JSON value.ops, svc, vendor, client

Task Log

OperationMethodDescriptionAccess
Get task logsGETGets the log records for a task.ops, svc