Skip to content

API Usage

Lois Onyinyemme Bassey edited this page Mar 20, 2024 · 2 revisions

API Endpoints and Their Usage

GET /api/tasks

  • Description: Retrieves the mock results associated with a Job ID
  • Usage: Send a GET request to this endpoint to retrieve mock results.
  • Parameter: {joId} - Specifies the Job ID used to fetch mock results.
  • Response: A JSON array containing the mock results.

Sample Request

Sample Response

POST /api/tasks

  • Description: Creates a new task, adds a mock result action to a queue for asynchronous processing, returns a Job ID, and stores the Job in a database.
  • Usage: Send a POST request to this endpoint with the necessary input data to create a new task.
  • Input: The request body should contain the necessary data to create a new task.
  • Response: If successful, returns a successful JSON response.

Sample Request

Sample Response

Clone this wiki locally