Tasks API

Tasks represent activities or actions that need to be completed within the GridLogs platform. This API allows you to create, retrieve, update, and delete tasks, as well as manage task assignees.

Create Task

POST /v1/tasks

Creates a new task.

Request

title
string
required

Title of the task

description
string

Detailed description of the task

dueDate
string

Due date for the task (ISO format)

priority
string

Priority level (e.g., LOW, MEDIUM, HIGH)

status
string

Status of the task (e.g., TODO, IN_PROGRESS, DONE)

businessCaseId
string

ID of the associated business case

consumerCaseId
string

ID of the associated consumer case

Response

id
string

Unique identifier for the task

title
string

Title of the task

description
string

Detailed description of the task

dueDate
string

Due date for the task

priority
string

Priority level of the task

status
string

Status of the task

businessCaseId
string

ID of the associated business case

consumerCaseId
string

ID of the associated consumer case

createdAt
string

Creation timestamp

updatedAt
string

Last update timestamp

Examples

curl -X POST https://api.gridlogs.co/v1/tasks \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Review business documents",
    "description": "Verify all the submitted business documents",
    "dueDate": "2023-12-31T23:59:59Z",
    "priority": "HIGH",
    "status": "TODO",
    "businessCaseId": "bc_12345"
  }'

List Tasks

GET /v1/tasks

Returns a paginated list of tasks.

Query Parameters

page
number

Page number for pagination (default: 1)

limit
number

Number of items per page (default: 10)

status
string

Filter by status

priority
string

Filter by priority

businessCaseId
string

Filter by business case ID

consumerCaseId
string

Filter by consumer case ID

Search term to filter results

Response

items
array

Array of task objects

meta
object

Pagination metadata

meta.total
number

Total number of tasks

meta.page
number

Current page number

meta.limit
number

Number of items per page

meta.totalPages
number

Total number of pages

Examples

curl -X GET "https://api.gridlogs.co/v1/tasks?page=1&limit=10&status=TODO&priority=HIGH" \
  -H "X-API-Key: your_api_key_here"

Get Task

GET /v1/tasks/{id}

Retrieves a specific task by ID.

Path Parameters

id
string
required

Task ID

Response

Returns a task object with all its properties.

Examples

curl -X GET "https://api.gridlogs.co/v1/tasks/task_12345" \
  -H "X-API-Key: your_api_key_here"

Update Task

PUT /v1/tasks/{id}

Updates a specific task.

Path Parameters

id
string
required

Task ID

Request

title
string

Title of the task

description
string

Detailed description of the task

dueDate
string

Due date for the task (ISO format)

priority
string

Priority level (e.g., LOW, MEDIUM, HIGH)

status
string

Status of the task (e.g., TODO, IN_PROGRESS, DONE)

Response

Returns the updated task object.

Examples

curl -X PUT "https://api.gridlogs.co/v1/tasks/task_12345" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Review business documents (Updated)",
    "status": "IN_PROGRESS",
    "priority": "MEDIUM"
  }'

Delete Task

DELETE /v1/tasks/{id}

Deletes a specific task.

Path Parameters

id
string
required

Task ID

Response

Returns the deleted task object.

Examples

curl -X DELETE "https://api.gridlogs.co/v1/tasks/task_12345" \
  -H "X-API-Key: your_api_key_here"

Add Assignee

POST /v1/tasks/{id}/assignees

Adds an assignee to a task.

Path Parameters

id
string
required

Task ID

Request

userId
string
required

ID of the user to assign to the task

Response

Returns the updated task with the new assignee added.

Examples

curl -X POST "https://api.gridlogs.co/v1/tasks/task_12345/assignees" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "userId": "user_67890"
  }'

Remove Assignee

DELETE /v1/tasks/{id}/assignees/{userId}

Removes an assignee from a task.

Path Parameters

id
string
required

Task ID

userId
string
required

ID of the user to remove from the task

Response

Returns the updated task with the assignee removed.

Examples

curl -X DELETE "https://api.gridlogs.co/v1/tasks/task_12345/assignees/user_67890" \
  -H "X-API-Key: your_api_key_here"