Subtasks API

 


 

Get Subtasks

GET /v2/subtasks/[subtask_id]

 

Optional Parameters

  • subtask_id - Details of single subtask.
  • task_id - If passed then a list of subtasks with a parent of task_id will be returned.
  • user_id - Get subtasks for specific user
  • team_id - Get subtasks for a team
  • due_from - Due date from (yyyymmdd)
  • due_to - Due date to (yyyymmdd)
  • completed_from - Completed date from (yyyymmdd)
  • completed_to - Completed date to (yyyymmdd)
  • status - Status (open, completed, active, onhold, inactive, archived)
  • limit - Limit number of records returned. Maximum 1000 records
  • offset - Start position for fetching records

 

Sample Response - Single Subtask

{
  "data": {
    "subtask_id": "1",
    "subtask_name": "My first subtask",
    "description": "Testing out subtasks",
    "color": "dd067a",
    "notes": "",
    "start_date": "0000-00-00 00:00:00",
    "due_date": "0000-00-00 00:00:00",
    "date_completed": "0000-00-00 00:00:00",
    "ongoing": "1",
    "project_id": "1",
    "project_name": "Project 1",
    "task_id": "1",
    "task_name": "Create project specification",
    "tracked_seconds": null,
    "estimated_hours": "0",
    "subtask_order": "0",
    "active": "1",
    "important": "0",
    "completed": "0",
    "progress": "50",
    "notifications": "1",
    "recurring": "",
    "date_created": "2014-08-14 15:21:56",
    "date_modified": "2014-12-17 08:24:59",
    "user_id": "1234",
    "users": [
        {
            "user_id": "1234",
            "user_name": "John Doe"
        }
    ]
  }
}

 

Sample Response - Multiple Subtasks

{
  "paging": {
    "offset": 0,
    "limit": 1000,
    "total_records": 2
  },
  "data": [
    {
      "subtask_id": "1",
      "subtask_name": "My very first subtask!",
      "description": "Testing out the subtasks",
      "color": "dd067a",
      "notes": "",
      "start_date": "0000-00-00 00:00:00",
      "due_date": "0000-00-00 00:00:00",
      "date_completed": "0000-00-00 00:00:00",
      "ongoing": "1",
      "project_id": "1",
      "project_name": "Project 1",
      "task_id": "1",
      "task_name": "My very first task",
      "tracked_seconds": null,
      "estimated_hours": "0",
      "subtask_order": "0",
      "active": "1",
      "important": "0",
      "completed": "50",
      "progress": "0",
      "notifications": "1",
      "recurring": "",
      "date_created": "2014-08-14 15:21:56",
      "date_modified": "2014-12-17 08:24:59",
      "user_id": "1234",
      "users": [
        {
            "user_id": "1234",
            "user_name": "John Doe"
        }
      ]
    },
    {
      "subtask_id": "2",
      "subtask_name": "subtask aa",
      "description": null,
      "color": null,
      "notes": null,
      "start_date": "0000-00-00 00:00:00",
      "due_date": "0000-00-00 00:00:00",
      "date_completed": "0000-00-00 00:00:00",
      "ongoing": "1",
      "project_id": "1",
      "project_name": "Project 1",
      "task_id": "1",
      "task_name": "My very first task",
      "tracked_seconds": null,
      "estimated_hours": null,
      "subtask_order": "0",
      "active": "1",
      "important": "0",
      "completed": "0",
      "progress": "25",
      "notifications": "1",
      "recurring": "",
      "date_created": "2014-08-14 15:21:56",
      "date_modified": "2014-08-14 14:21:56",
      "user_id": "1234",
      "users": [
        {
            "user_id": "1234",
            "user_name": "John Doe"
        }
      ]
    }
  ]
}

 

Example Calls

Single subtask

curl -X GET "https://api.projectbubble.com/v2/subtasks/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"

 

Subtasks of parent task

curl -X GET "https://api.projectbubble.com/v2/subtasks?task_id=1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"

 

Get subtasks for a particular parent task by due date

curl -X GET "https://api.projectbubble.com/v2/subtasks?task_id=1&order=duedate" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"

 

Response Codes

200 - OK or "No records found"
401 - Permission error. Your user account (API Key) does not have permission to access subtasks.

 

Create Subtask

POST /v2/subtasks/[task_id]

 

Parameters

  • task_id - Requiried. Parent task ID
  • subtask_name - Required. Subtask name
  • description - Description
  • color - Color in hex e.g. FF0000 would be red
  • notes - Notes
  • start_date - Start date (yyyymmdd)
  • due_date - Due date (yyyymmdd)
  • subtask_order - Subtask order
  • active - Active? (2 is amber)
  • important - Important?
  • notifications - Notifications?
  • recurring - Recurring subtask. Accepts the following string values:
    • D - Daily
    • W - Weekly
    • M - Monthly
    • Q - Quarterly
    • S - Semi yearly (Every six months)
    • Y - Yearly
  • user_id - Creator user ID
  • users - Assigned user IDs
    • user_id - User ID
  • teams - Assigned team IDs
    • team_id - Team ID

 

Sample Response

{
  "data": {
    "subtask_id": "1",
    "subtask_name": "My first subtask",
    "description": "Testing out subtasks",
    "color": "dd067a",
    "notes": "",
    "start_date": "0000-00-00 00:00:00",
    "due_date": "0000-00-00 00:00:00",
    "ongoing": "1",
    "project_id": "1",
    "project_name": "Project 1",
    "task_id": "1",
    "task_name": "Create project specification",
    "tracked_seconds": null,
    "estimated_hours": "0",
    "subtask_order": "0",
    "active": "1",
    "important": "0",
    "notifications": "1",
    "recurring": "",
    "date_created": "2014-08-14 15:21:56",
    "date_modified": "2014-12-17 08:24:59",
    "user_id": "1234",
    "users": [
        {
            "user_id": "1234",
            "user_name": "John Doe"
        }
    ]
  }
}

 

Example Calls

Subtask with parent task with task_id=1

curl -X POST "https://api.projectbubble.com/v2/subtasks/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"\
-d '{"subtask_name": "My first subtask", \
"description": "Testing out subtasks"}'

 

Monthly recurring subtask with lots of params set

curl -X POST "https://api.projectbubble.com/v2/subtasks/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"\
-d '{"subtask_name": "Clear out log files", \
"description": "Do this every month", \
"recurring": "M", \
"start_date": "20150101", \
"color": "d40000"}'

 

Response Codes

201 - Created ok
400 - Validation error. Check returned message
401 - Permission error. Your user account (API Key) does not have permission to access subtasks.
404 - Task not found

 

Update Subtask

PUT /v2/subtasks/[subtask_id]

 

Parameters

  • subtask_id - Required.
  • subtask_name - Subtask name
  • description - Description
  • color - Color in hex e.g. FF0000 would be red
  • notes - Notes
  • start_date - Start date (yyyymmdd)
  • due_date - Due date (yyyymmdd)
  • date_completed - Date completed (yyyymmdd)
  • subtask_order - Subtask order
  • active - Active? (2 is amber)
  • important - Important?
  • completed - !!important!! - All other params are ignored if this is set. See Complete Subtask
  • resume - !!important!! - All other params are ignored if this is set. See Resume Subtask
  • progress - Completion progress as percentage (no symbol)
  • notifications - Notifications?
  • recurring - Recurring subtask. Accepts the following string values:
    • D - Daily
    • W - Weekly
    • M - Monthly
    • Q - Quarterly
    • S - Semi yearly (Every six months)
    • Y - Yearly
  • user_id - Creator user ID
  • users - Assigned user IDs
    • id - User ID
    • user_name - User name
  • teams - Assigned team IDs
    • team_id - Team ID

 

Sample response:

{
  "data": {
    "subtask_id": "1",
    "subtask_name": "My first subtasktask",
    "description": "This is my updated description",
    "color": "dd067a",
    "notes": "",
    "start_date": "0000-00-00 00:00:00",
    "due_date": "0000-00-00 00:00:00",
    "date_completed": "0000-00-00 00:00:00",
    "ongoing": "1",
    "project_id": "1",
    "project_name": "Project 1",
    "task_id": "1",
    "task_name": "Create project specification",
    "tracked_seconds": null,
    "estimated_hours": "0",
    "subtask_order": "0",
    "active": "1",
    "important": "0",
    "completed": "0",
    "progress": "33",
    "notifications": "1",
    "recurring": "",
    "date_created": "2014-08-14 15:21:56",
    "date_modified": "2014-12-17 08:24:59",
    "user_id": "1234",
    "users": [
        {
            "user_id": "1234",
            "user_name": "John Doe"
        }
    ]
  }
}

 

Example Calls

Change description of subtask_id=1

curl -X PUT "https://api.projectbubble.com/v2/subtasks/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"\
-d '{"This is my updated description": "Testing out subtasks"}'

 

Response Codes

200 - OK
400 - Validation error. Check returned message
401 - Permission error. Your user account (API Key) does not have permission to access subtasks.
404 - Task not found

 

Delete Subtask

DELETE /v2/subtasks/[subtask_id]

 

Sample Response

[]

 

Example Call

curl -X DELETE "https://api.projectbubble.com/v2/subtasks/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"

 

Response Codes

200 - Subtask deleted
400/401 - Permission error. Validation error, see returned text.
404 - Subtask not found.

 

Complete Subtask

Completing a subtask updates parent task completion progress.

PUT /v2/subtasks/[subtask_id]

 

Required Parameters

  • completed - 1 = complete task

Response:

 

Sample Response

{
  "data": {
    "subtask_id": "1",
    "subtask_name": "My first subtask",
    "description": "Testing out subtasks",
    "color": "dd067a",
    "notes": "",
    "start_date": "0000-00-00 00:00:00",
    "due_date": "0000-00-00 00:00:00",
    "date_completed": "2015-01-01 09:00:00",
    "ongoing": "1",
    "project_id": "1",
    "project_name": "Project 1",
    "task_id": "1",
    "task_name": "Create project specification",
    "tracked_seconds": null,
    "estimated_hours": "0",
    "subtask_order": "0",
    "active": "0",
    "important": "0",
    "completed": "1",
    "progress": "100",
    "notifications": "1",
    "recurring": "",
    "date_created": "2014-08-14 15:21:56",
    "date_modified": "2014-12-17 08:24:59",
    "user_id": "1234",
    "users": [
        {
            "user_id": "1234",
            "user_name": "John Doe"
        }
    ]
  }
}

 

Example Call

curl -X POST "https://api.projectbubble.com/v2/subtasks/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"\
-d '{"complete": 1}'

 

Response Codes

200 - Subtask Updated
400 - Validation error, see returned text.
401 - Permission error. Your user account (API Key) does not have permission to access subtasks.
404 - Subtask not found

 

Resume Subtask

Resuming a subtask updates parent task completion progress.

PUT /v2/subtasks/[subtask_id]

 

Required Parameters

  • resume - 1 = complete task

Response:

 

Sample Response

{
  "data": {
    "subtask_id": "1",
    "subtask_name": "My first subtask",
    "description": "Testing out subtasks",
    "color": "dd067a",
    "notes": "",
    "start_date": "0000-00-00 00:00:00",
    "due_date": "0000-00-00 00:00:00",
    "date_completed": "0000-00-00 00:00:00",
    "ongoing": "1",
    "project_id": "1",
    "project_name": "Project 1",
    "task_id": "1",
    "task_name": "Create project specification",
    "tracked_seconds": null,
    "estimated_hours": "0",
    "subtask_order": "0",
    "active": "1",
    "important": "0",
    "completed": "0",
    "progress": "0",
    "notifications": "1",
    "recurring": "",
    "date_created": "2014-08-14 15:21:56",
    "date_modified": "2014-12-17 08:24:59",
    "user_id": "1234",
    "users": [
        {
            "user_id": "1234",
            "user_name": "John Doe"
        }
    ]
  }
}

 

Example Call

curl -X POST "https://api.projectbubble.com/v2/subtasks/1" \
-H "domain: example.projectbubble.com" \
-H "key: 27838413e610417bd866352767fe322ca97d94c8"\
-d '{"resume": 1}'

 

Response Codes

200 - Subtask Updated
400 - Validation error, see returned text.
401 - Permission error. Your user account (API Key) does not have permission to access subtasks.
404 - Subtask not found
© 2005 - 2024 ProProfs
-
add chat to your website