Requirements API


GET /api/v1/features/:feature_id/requirements

Get all requirements for a feature

Parameters

Name Description
feature_id * Numeric ID, or key of the feature to retrieve requirements for

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

Example CURL command

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

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "requirements": [
    {
      "id": "483368544",
      "name": "Body of requirement 1",
      "reference_num": "PRJ1-1-1",
      "position": 1,
      "created_at": "2018-10-22T20:28:58.000Z",
      "updated_at": "2018-10-22T20:28:58.000Z",
      "release_id": 278327321,
      "workflow_status": {
        "id": "934242751",
        "name": "New",
        "position": 1,
        "complete": false,
        "color": "#dce7c6"
      },
      "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": "2018-10-22T20:28:58.000Z",
        "attachments": [

        ]
      },
      "feature": {
        "id": "1007868956",
        "reference_num": "PRJ1-1",
        "name": "Feature 1",
        "created_at": "2018-10-22T20:28:58.000Z",
        "url": "http://account1.example.org/features/PRJ1-1",
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1",
        "product_id": 131414752
      },
      "assigned_to_user": {
        "id": "689956296",
        "name": "Henry Humpty",
        "email": "henry.humpty@account1.com",
        "created_at": "2018-10-22T20:28:57.000Z",
        "updated_at": "2018-10-22T20:28:57.000Z",
        "default_assignee": true
      },
      "created_by_user": {
        "id": "1020675218",
        "name": "Mary Humpty",
        "email": "mary.humpty@account1.com",
        "created_at": "2018-10-22T20:28:57.000Z",
        "updated_at": "2018-10-22T20:28:57.000Z"
      },
      "attachments": [

      ],
      "custom_fields": [
        {
          "key": "expected_completion_date",
          "name": "Expected completion date",
          "value": null,
          "type": "date"
        }
      ],
      "integration_fields": [
        {
          "id": "417785887",
          "name": "id",
          "value": "991",
          "integration_id": 342659513,
          "service_name": "jira",
          "created_at": "2018-10-22T20:28:57.000Z"
        },
        {
          "id": "32487847",
          "name": "key",
          "value": "JRA-987",
          "integration_id": 342659513,
          "service_name": "jira",
          "created_at": "2018-10-22T20:28:57.000Z"
        }
      ],
      "comments_count": 1
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

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://account1.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 "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
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": "6615281181371139265",
    "name": "New name",
    "reference_num": "PRJ1-1-1",
    "position": 2,
    "created_at": "2018-10-22T20:29:35.407Z",
    "updated_at": "2018-10-22T20:29:35.471Z",
    "release_id": 278327321,
    "workflow_status": {
      "id": "962984386",
      "name": "Designed",
      "position": 2,
      "complete": false,
      "color": "#ecdd8f"
    },
    "url": "http://account1.example.org/requirements/PRJ1-1-1",
    "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1",
    "description": {
      "id": "6615281181393381565",
      "body": "<p>This is the description</p>",
      "created_at": "2018-10-22T20:29:35.414Z",
      "attachments": [

      ]
    },
    "feature": {
      "id": "1007868956",
      "reference_num": "PRJ1-1",
      "name": "Feature 1",
      "created_at": "2018-10-22T20:28:58.000Z",
      "url": "http://account1.example.org/features/PRJ1-1",
      "resource": "http://account1.example.org/api/v1/features/PRJ1-1",
      "product_id": 131414752
    },
    "assigned_to_user": {
      "id": "689956296",
      "name": "Henry Humpty",
      "email": "henry.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z",
      "default_assignee": false
    },
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.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 -g "https://account1.aha.io/api/v1/requirements/PRJ1-1-1" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
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": "2018-10-22T20:28:58.000Z",
    "updated_at": "2018-10-22T20:28:58.000Z",
    "release_id": 278327321,
    "workflow_status": {
      "id": "934242751",
      "name": "New",
      "position": 1,
      "complete": false,
      "color": "#dce7c6"
    },
    "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": "2018-10-22T20:28:58.000Z",
      "attachments": [

      ]
    },
    "feature": {
      "id": "1007868956",
      "reference_num": "PRJ1-1",
      "name": "Feature 1",
      "created_at": "2018-10-22T20:28:58.000Z",
      "url": "http://account1.example.org/features/PRJ1-1",
      "resource": "http://account1.example.org/api/v1/features/PRJ1-1",
      "product_id": 131414752
    },
    "assigned_to_user": {
      "id": "689956296",
      "name": "Henry Humpty",
      "email": "henry.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z",
      "default_assignee": true
    },
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z"
    },
    "attachments": [

    ],
    "custom_fields": [
      {
        "key": "expected_completion_date",
        "name": "Expected completion date",
        "value": null,
        "type": "date"
      }
    ],
    "integration_fields": [
      {
        "id": "417785887",
        "name": "id",
        "value": "991",
        "integration_id": 342659513,
        "service_name": "jira",
        "created_at": "2018-10-22T20:28:57.000Z"
      },
      {
        "id": "32487847",
        "name": "key",
        "value": "JRA-987",
        "integration_id": 342659513,
        "service_name": "jira",
        "created_at": "2018-10-22T20:28:57.000Z"
      }
    ],
    "comments_count": 1
  }
}

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://account1.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 "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
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": "2018-10-22T20:28:58.000Z",
    "updated_at": "2018-10-22T20:29:35.779Z",
    "release_id": 278327321,
    "workflow_status": {
      "id": "962984386",
      "name": "Designed",
      "position": 2,
      "complete": false,
      "color": "#ecdd8f"
    },
    "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": "2018-10-22T20:28:58.000Z",
      "attachments": [

      ]
    },
    "feature": {
      "id": "1007868956",
      "reference_num": "PRJ1-1",
      "name": "Feature 1",
      "created_at": "2018-10-22T20:28:58.000Z",
      "url": "http://account1.example.org/features/PRJ1-1",
      "resource": "http://account1.example.org/api/v1/features/PRJ1-1",
      "product_id": 131414752
    },
    "assigned_to_user": {
      "id": "689956296",
      "name": "Henry Humpty",
      "email": "henry.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z",
      "default_assignee": true
    },
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z"
    },
    "attachments": [

    ],
    "custom_fields": [
      {
        "key": "expected_completion_date",
        "name": "Expected completion date",
        "value": null,
        "type": "date"
      }
    ],
    "integration_fields": [
      {
        "id": "417785887",
        "name": "id",
        "value": "991",
        "integration_id": 342659513,
        "service_name": "jira",
        "created_at": "2018-10-22T20:28:57.000Z"
      },
      {
        "id": "32487847",
        "name": "key",
        "value": "JRA-987",
        "integration_id": 342659513,
        "service_name": "jira",
        "created_at": "2018-10-22T20:28:57.000Z"
      }
    ],
    "comments_count": 1
  }
}

PUT /api/v1/requirements/:id

Update a requirement's custom fields

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://account1.aha.io/api/v1/requirements/PRJ1-1-1" -d '{"requirement":{"custom_fields":{"priority":"P3"}}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json
{
  "requirement": {
    "custom_fields": {
      "priority": "P3"
    }
  }
}

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": "2018-10-22T20:28:58.000Z",
    "updated_at": "2018-10-22T20:29:35.943Z",
    "release_id": 278327321,
    "workflow_status": {
      "id": "934242751",
      "name": "New",
      "position": 1,
      "complete": false,
      "color": "#dce7c6"
    },
    "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": "2018-10-22T20:28:58.000Z",
      "attachments": [

      ]
    },
    "feature": {
      "id": "1007868956",
      "reference_num": "PRJ1-1",
      "name": "Feature 1",
      "created_at": "2018-10-22T20:28:58.000Z",
      "url": "http://account1.example.org/features/PRJ1-1",
      "resource": "http://account1.example.org/api/v1/features/PRJ1-1",
      "product_id": 131414752
    },
    "assigned_to_user": {
      "id": "689956296",
      "name": "Henry Humpty",
      "email": "henry.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z",
      "default_assignee": true
    },
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z"
    },
    "attachments": [

    ],
    "custom_fields": [
      {
        "key": "expected_completion_date",
        "name": "Expected completion date",
        "value": null,
        "type": "date"
      },
      {
        "key": "priority",
        "name": "Priority",
        "value": "P3",
        "type": "string"
      }
    ],
    "integration_fields": [
      {
        "id": "417785887",
        "name": "id",
        "value": "991",
        "integration_id": 342659513,
        "service_name": "jira",
        "created_at": "2018-10-22T20:28:57.000Z"
      },
      {
        "id": "32487847",
        "name": "key",
        "value": "JRA-987",
        "integration_id": 342659513,
        "service_name": "jira",
        "created_at": "2018-10-22T20:28:57.000Z"
      }
    ],
    "comments_count": 1
  }
}

POST /api/v1/requirements/:id/convert_to_feature

Convert a requirement to a feature

Parameters

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

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

Example CURL command

curl "https://account1.aha.io/api/v1/requirements/PRJ1-1-1/convert_to_feature" -d '' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "feature": {
    "id": "6615281184376198088",
    "name": "Body of requirement 1",
    "reference_num": "PRJ1-3",
    "position": 1,
    "score": 2,
    "created_at": "2018-10-22T20:29:36.107Z",
    "updated_at": "2018-10-22T20:29:36.325Z",
    "start_date": null,
    "due_date": null,
    "product_id": 131414752,
    "workflow_kind": {
      "id": "98484309",
      "name": "New"
    },
    "workflow_status": {
      "id": "934242751",
      "name": "New",
      "position": 1,
      "complete": false,
      "color": "#dce7c6"
    },
    "description": {
      "id": "910541534",
      "body": "Body of requirement 1",
      "created_at": "2018-10-22T20:28:58.000Z",
      "attachments": [

      ]
    },
    "attachments": [

    ],
    "integration_fields": [

    ],
    "url": "http://account1.example.org/features/PRJ1-3",
    "resource": "http://account1.example.org/api/v1/features/PRJ1-3",
    "release": {
      "id": "278327321",
      "reference_num": "PRJ1-R-1",
      "name": "Release 1",
      "start_date": "2018-10-29",
      "release_date": "2018-10-29",
      "parking_lot": false,
      "created_at": "2018-10-22T20:28:57.000Z",
      "product_id": 131414752,
      "integration_fields": [
        {
          "id": "68217473",
          "name": "id",
          "value": "777",
          "integration_id": 204584239,
          "service_name": "jira",
          "created_at": "2018-10-22T20:28:57.000Z"
        }
      ],
      "url": "http://account1.example.org/releases/PRJ1-R-1",
      "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-1",
      "owner": {
        "id": "16338845",
        "name": "John Smith",
        "email": "john.smith@account1.com",
        "created_at": "2018-10-22T20:28:57.000Z",
        "updated_at": "2018-10-22T20:28:57.000Z"
      },
      "project": {
        "id": "131414752",
        "reference_prefix": "PRJ1",
        "name": "Project 1",
        "product_line": false,
        "created_at": "2018-10-22T20:28:58.000Z"
      }
    },
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z"
    },
    "assigned_to_user": {
      "id": "689956296",
      "name": "Henry Humpty",
      "email": "henry.humpty@account1.com",
      "created_at": "2018-10-22T20:28:57.000Z",
      "updated_at": "2018-10-22T20:28:57.000Z",
      "default_assignee": true
    },
    "requirements": [

    ],
    "goals": [

    ],
    "comments_count": 1,
    "score_facts": [

    ],
    "tags": [

    ],
    "full_tags": [

    ],
    "custom_fields": [
      {
        "key": "expected_completion_date",
        "name": "Expected completion date",
        "value": null,
        "type": "date"
      }
    ],
    "feature_links": [
      {
        "link_type": "Relates to",
        "link_type_id": 10,
        "created_at": "2018-10-22T20:29:36.148Z",
        "parent_record": {
          "id": "1007868956",
          "reference_num": "PRJ1-1",
          "name": "Feature 1",
          "created_at": "2018-10-22T20:28:58.000Z",
          "url": "http://account1.example.org/features/PRJ1-1",
          "resource": "http://account1.example.org/api/v1/features/PRJ1-1",
          "product_id": 131414752
        },
        "child_record": {
          "id": "6615281184376198088",
          "reference_num": "PRJ1-3",
          "name": "Body of requirement 1",
          "created_at": "2018-10-22T20:29:36.107Z",
          "url": "http://account1.example.org/features/PRJ1-3",
          "resource": "http://account1.example.org/api/v1/features/PRJ1-3",
          "product_id": 131414752
        }
      }
    ],
    "feature_only_original_estimate": null,
    "feature_only_remaining_estimate": null,
    "feature_only_work_done": null
  }
}

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://account1.aha.io/api/v1/requirements/PRJ1-1-1" -d '' -X DELETE \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
Content-Type: application/json
Accept: application/json

Response

Status: 204 No Content
  

Overview

API Resources