Tasks API


POST /api/v1/tasks

Create a task without an associated record

POST /api/v1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/tasks" -d '{"task":{"name":"Review press release","body":"\u003cp\u003eCan you please review the press release\u003c/p\u003e","assigned_to_users":[{"email":"henry.humpty@account1.com"}]}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "task": {
    "name": "Review press release",
    "body": "<p>Can you please review the press release</p>",
    "assigned_to_users": [
      {
        "email": "henry.humpty@account1.com"
      }
    ]
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "task": {
    "id": "6411303780374544889",
    "name": "Review press release",
    "body": "<p>Can you please review the press release</p>",
    "due_date": null,
    "status": "partially_complete",
    "position": 2,
    "created_at": "2017-04-21T04:13:05.844Z",
    "updated_at": "2017-04-21T04:13:05.865Z",
    "assigned_to_users": [
      {
        "id": "6411303780439049587",
        "status": "pending",
        "user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "mary.humpty@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      }
    ],
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-04-21T04:12:25.000Z",
      "updated_at": "2017-04-21T04:12:25.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/tasks/6411303780374544889",
    "resource": "http://account1.example.org/api/v1/tasks/6411303780374544889",
    "comments_count": 0
  }
}

POST /api/v1/tasks

Set the due date when creating task

POST /api/v1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/tasks" -d '{"task":{"name":"Review press release","body":"\u003cp\u003eCan you please review the press release\u003c/p\u003e","assigned_to_users":[{"email":"henry.humpty@account1.com"}],"due_date":"2014-03-23"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "task": {
    "name": "Review press release",
    "body": "<p>Can you please review the press release</p>",
    "assigned_to_users": [
      {
        "email": "henry.humpty@account1.com"
      }
    ],
    "due_date": "2014-03-23"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "task": {
    "id": "6411303781071263464",
    "name": "Review press release",
    "body": "<p>Can you please review the press release</p>",
    "due_date": "2014-03-23",
    "status": "partially_complete",
    "position": 2,
    "created_at": "2017-04-21T04:13:06.002Z",
    "updated_at": "2017-04-21T04:13:06.014Z",
    "assigned_to_users": [
      {
        "id": "6411303781103006181",
        "status": "pending",
        "user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "mary.humpty@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      }
    ],
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-04-21T04:12:25.000Z",
      "updated_at": "2017-04-21T04:12:25.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/tasks/6411303781071263464",
    "resource": "http://account1.example.org/api/v1/tasks/6411303781071263464",
    "comments_count": 0
  }
}

POST /api/v1/tasks

Create a task for a feature

POST /api/v1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/tasks" -d '{"task":{"name":"Review press release","body":"\u003cp\u003eCan you please review the press release\u003c/p\u003e","taskable_type":"Feature","taskable_id":1007868956}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "task": {
    "name": "Review press release",
    "body": "<p>Can you please review the press release</p>",
    "taskable_type": "Feature",
    "taskable_id": 1007868956
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "task": {
    "id": "6411303781725724169",
    "name": "Review press release",
    "body": "<p>Can you please review the press release</p>",
    "due_date": null,
    "status": "partially_complete",
    "position": 2,
    "created_at": "2017-04-21T04:13:06.154Z",
    "updated_at": "2017-04-21T04:13:06.192Z",
    "assigned_to_users": [
      {
        "id": "6411303781873279880",
        "status": "pending",
        "user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "mary.humpty@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      }
    ],
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-04-21T04:12:25.000Z",
      "updated_at": "2017-04-21T04:12:25.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/tasks/6411303781725724169",
    "resource": "http://account1.example.org/api/v1/tasks/6411303781725724169",
    "comments_count": 0,
    "taskable": {
      "type": "Feature",
      "id": "1007868956",
      "url": "http://account1.example.org/features/PRJ1-1",
      "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
    }
  }
}

POST /api/v1/tasks

Create a task with multiple assignee's

POST /api/v1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/tasks" -d '{"task":{"name":"Review press release","body":"\u003cp\u003eCan you please review the press release\u003c/p\u003e","assigned_to_users":[{"email":"henry.humpty@account1.com"},{"email":"sally.sane@account2.com"}]}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "task": {
    "name": "Review press release",
    "body": "<p>Can you please review the press release</p>",
    "assigned_to_users": [
      {
        "email": "henry.humpty@account1.com"
      },
      {
        "email": "sally.sane@account2.com"
      }
    ]
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "task": {
    "id": "6411303782299003552",
    "name": "Review press release",
    "body": "<p>Can you please review the press release</p>",
    "due_date": null,
    "status": "partially_complete",
    "position": 2,
    "created_at": "2017-04-21T04:13:06.293Z",
    "updated_at": "2017-04-21T04:13:06.301Z",
    "assigned_to_users": [
      {
        "id": "6411303782347783585",
        "status": "pending",
        "user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "mary.humpty@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      }
    ],
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-04-21T04:12:25.000Z",
      "updated_at": "2017-04-21T04:12:25.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/tasks/6411303782299003552",
    "resource": "http://account1.example.org/api/v1/tasks/6411303782299003552",
    "comments_count": 0
  }
}

GET /api/v1/tasks

Get all tasks

GET /api/v1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/tasks" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "tasks": [
    {
      "id": "654705094",
      "name": "Task name",
      "due_date": "2017-04-27",
      "status": "pending",
      "created_at": "2017-04-21T04:12:25.000Z"
    },
    {
      "id": "748715293",
      "name": "Task name",
      "due_date": "2017-04-27",
      "status": "completed",
      "created_at": "2017-04-21T04:12:25.000Z"
    },
    {
      "id": "785584324",
      "name": "Task name",
      "due_date": "2017-04-27",
      "status": "pending",
      "created_at": "2017-04-21T04:12:25.000Z"
    },
    {
      "id": "1041191038",
      "name": "Task name",
      "due_date": "2017-04-27",
      "status": "partially_complete",
      "created_at": "2017-04-21T04:12:25.000Z"
    }
  ],
  "pagination": {
    "total_records": 4,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/features/:feature_id/tasks

Get all tasks for a feature

Parameters

Name Description
feature_id * Numeric ID or key of the feature to get tasks for

GET /api/v1/features/PRJ1-1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/features/PRJ1-1/tasks" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "tasks": [
    {
      "id": "748715293",
      "name": "Task name",
      "due_date": "2017-04-27",
      "status": "completed",
      "created_at": "2017-04-21T04:12:25.000Z"
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/releases/:release_id/tasks

Get all tasks for a release

Parameters

Name Description
release_id * Numeric ID or key of the release to get tasks for

GET /api/v1/releases/PRJ1-R-1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/releases/PRJ1-R-1/tasks" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "tasks": [

  ],
  "pagination": {
    "total_records": 0,
    "total_pages": 0,
    "current_page": 1
  }
}

GET /api/v1/ideas/:idea_id/tasks

Get all tasks for an idea

Parameters

Name Description
idea_id * Numeric ID or key of the idea to get tasks for

GET /api/v1/ideas/PRJ1-I-1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1/tasks" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "tasks": [

  ],
  "pagination": {
    "total_records": 0,
    "total_pages": 0,
    "current_page": 1
  }
}

GET /api/v1/requirements/:requirement_id/tasks

Get all tasks for a requirement

Parameters

Name Description
requirement_id * Numeric ID or key of the requirement to get tasks for

GET /api/v1/requirements/PRJ1-1-1/tasks

Example CURL command

curl "https://secure.aha.io/api/v1/requirements/PRJ1-1-1/tasks" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "tasks": [

  ],
  "pagination": {
    "total_records": 0,
    "total_pages": 0,
    "current_page": 1
  }
}

GET /api/v1/tasks/:id

Get a specific task

Parameters

Name Description
id * Numeric ID of the task to be retrieved

GET /api/v1/tasks/1041191038

Example CURL command

curl "https://secure.aha.io/api/v1/tasks/1041191038" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "task": {
    "id": "1041191038",
    "name": "Task name",
    "body": "Task body",
    "due_date": "2017-04-27",
    "status": "partially_complete",
    "position": 1,
    "created_at": "2017-04-21T04:12:25.000Z",
    "updated_at": "2017-04-21T04:12:25.000Z",
    "assigned_to_users": [
      {
        "id": "642374309",
        "status": "pending",
        "user": {
          "id": "689956296",
          "name": "Henry Humpty",
          "email": "henry.humpty@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      },
      {
        "id": "1061194521",
        "status": "completed",
        "user": {
          "id": "601067208",
          "name": "Jeremy Smith",
          "email": "jeremy.smith@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      }
    ],
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-04-21T04:12:25.000Z",
      "updated_at": "2017-04-21T04:12:25.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/tasks/1041191038",
    "resource": "http://account1.example.org/api/v1/tasks/1041191038",
    "comments_count": 0
  }
}

PUT /api/v1/tasks/:id

Update a task

Parameters

Name Description
id * Numeric ID task to be edited

PUT /api/v1/tasks/1041191038

Example CURL command

curl "https://secure.aha.io/api/v1/tasks/1041191038" -d '{"task":{"body":"\u003cp\u003eCan you please review this press release\u003c/p\u003e"}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "task": {
    "body": "<p>Can you please review this press release</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "task": {
    "id": "1041191038",
    "name": "Task name",
    "body": "<p>Can you please review this press release</p>",
    "due_date": "2017-04-27",
    "status": "partially_complete",
    "position": 1,
    "created_at": "2017-04-21T04:12:25.000Z",
    "updated_at": "2017-04-21T04:13:07.166Z",
    "assigned_to_users": [
      {
        "id": "642374309",
        "status": "pending",
        "user": {
          "id": "689956296",
          "name": "Henry Humpty",
          "email": "henry.humpty@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      },
      {
        "id": "1061194521",
        "status": "completed",
        "user": {
          "id": "601067208",
          "name": "Jeremy Smith",
          "email": "jeremy.smith@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      }
    ],
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-04-21T04:12:25.000Z",
      "updated_at": "2017-04-21T04:12:25.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/tasks/1041191038",
    "resource": "http://account1.example.org/api/v1/tasks/1041191038",
    "comments_count": 0
  }
}

PUT /api/v1/tasks/:id

Update a task's status

Parameters

Name Description
id * Numeric ID task to be edited

PUT /api/v1/tasks/1041191038

Example CURL command

curl "https://secure.aha.io/api/v1/tasks/1041191038" -d '{"task":{"status":"complete"}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "task": {
    "status": "complete"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "task": {
    "id": "1041191038",
    "name": "Task name",
    "body": "Task body",
    "due_date": "2017-04-27",
    "status": "completed",
    "position": 1,
    "created_at": "2017-04-21T04:12:25.000Z",
    "updated_at": "2017-04-21T04:13:07.333Z",
    "assigned_to_users": [
      {
        "id": "642374309",
        "status": "completed",
        "completed_date": "2017-04-21T04:13:07.327Z",
        "user": {
          "id": "689956296",
          "name": "Henry Humpty",
          "email": "henry.humpty@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      },
      {
        "id": "1061194521",
        "status": "completed",
        "user": {
          "id": "601067208",
          "name": "Jeremy Smith",
          "email": "jeremy.smith@account1.com",
          "created_at": "2017-04-21T04:12:25.000Z",
          "updated_at": "2017-04-21T04:12:25.000Z"
        }
      }
    ],
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-04-21T04:12:25.000Z",
      "updated_at": "2017-04-21T04:12:25.000Z"
    },
    "attachments": [

    ],
    "url": "http://account1.example.org/tasks/1041191038",
    "resource": "http://account1.example.org/api/v1/tasks/1041191038",
    "comments_count": 0
  }
}

DELETE /api/v1/tasks/:id

Delete a task

Parameters

Name Description
id * Numeric ID of the task to be deleted

DELETE /api/v1/tasks/1041191038

Example CURL command

curl "https://secure.aha.io/api/v1/tasks/1041191038" -d '' -X DELETE \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 204 No Content
  

Overview

API Resources