Requirements API


POST /api/v1/features/:feature_id/requirements

Create a requirement

When creating a Requirement at least the name, description and status must be specified.

Parameters

Name Description
feature_id * Numeric ID, or key of the feature the requirement should be created in

POST /api/v1/features/PRJ1-1/requirements

Example CURL command

curl "https://secure.aha.io/api/v1/features/PRJ1-1/requirements" -d '{"requirement":{"name":"New name","workflow_status":{"name":"Designed"},"description":"\u003cp\u003eThis is the description\u003c/p\u003e","assigned_to_user":{"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
{
  "requirement": {
    "name": "New name",
    "workflow_status": {
      "name": "Designed"
    },
    "description": "<p>This is the description</p>",
    "assigned_to_user": {
      "email": "henry.humpty@account1.com"
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "requirement": {
    "id": "6411303770672677087",
    "name": "New name",
    "reference_num": "PRJ1-1-1",
    "position": 2,
    "created_at": "2017-04-21T04:13:03.586Z",
    "updated_at": "2017-04-21T04:13:03.586Z",
    "workflow_status": {
      "id": "962984386",
      "name": "Designed",
      "complete": false
    },
    "url": "http://account1.example.org/requirements/PRJ1-1-1",
    "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1",
    "description": {
      "id": "6411303770846770707",
      "body": "<p>This is the description</p>",
      "created_at": "2017-04-21T04:13:03.625Z",
      "attachments": [

      ]
    },
    "assigned_to_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",
      "default_assignee": false
    },
    "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": [

    ],
    "custom_fields": [

    ],
    "integration_fields": [

    ],
    "comments_count": 0
  }
}

GET /api/v1/requirements/:id

Get a specific requirement

Parameters

Name Description
id * Numeric ID, or key of the requirement to be retrieved

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

Example CURL command

curl "https://secure.aha.io/api/v1/requirements/PRJ1-1-1" -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
{
  "requirement": {
    "id": "483368544",
    "name": "Body of requirement 1",
    "reference_num": "PRJ1-1-1",
    "position": 1,
    "created_at": "2017-04-21T04:12:25.000Z",
    "updated_at": "2017-04-21T04:12:25.000Z",
    "workflow_status": {
      "id": "934242751",
      "name": "New",
      "complete": false
    },
    "url": "http://account1.example.org/requirements/PRJ1-1-1",
    "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1",
    "description": {
      "id": "910541534",
      "body": "Body of requirement 1",
      "created_at": "2017-04-21T04:12:25.000Z",
      "attachments": [

      ]
    },
    "assigned_to_user": null,
    "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": [

    ],
    "custom_fields": [
      {
        "key": "expected_completion_date",
        "name": "Expected completion date",
        "value": null,
        "type": "date"
      }
    ],
    "integration_fields": [

    ],
    "comments_count": 0
  }
}

PUT /api/v1/requirements/:id

Update a requirement

Parameters

Name Description
id * Numeric ID, or key of the requirement to be edited

PUT /api/v1/requirements/PRJ1-1-1

Example CURL command

curl "https://secure.aha.io/api/v1/requirements/PRJ1-1-1" -d '{"requirement":{"name":"Another name","workflow_status":{"name":"Designed"},"description":"\u003cp\u003enew description\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
{
  "requirement": {
    "name": "Another name",
    "workflow_status": {
      "name": "Designed"
    },
    "description": "<p>new description</p>"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "requirement": {
    "id": "483368544",
    "name": "Another name",
    "reference_num": "PRJ1-1-1",
    "position": 1,
    "created_at": "2017-04-21T04:12:25.000Z",
    "updated_at": "2017-04-21T04:13:04.037Z",
    "workflow_status": {
      "id": "962984386",
      "name": "Designed",
      "complete": false
    },
    "url": "http://account1.example.org/requirements/PRJ1-1-1",
    "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1",
    "description": {
      "id": "910541534",
      "body": "<p>new description</p>",
      "created_at": "2017-04-21T04:12:25.000Z",
      "attachments": [

      ]
    },
    "assigned_to_user": null,
    "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": [

    ],
    "custom_fields": [
      {
        "key": "expected_completion_date",
        "name": "Expected completion date",
        "value": null,
        "type": "date"
      }
    ],
    "integration_fields": [

    ],
    "comments_count": 0
  }
}

DELETE /api/v1/requirements/:id

Delete a requirement

Parameters

Name Description
id * Numeric ID, or key of the requirement to be deleted

DELETE /api/v1/requirements/PRJ1-1-1

Example CURL command

curl "https://secure.aha.io/api/v1/requirements/PRJ1-1-1" -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