Goals API


POST /api/v1/products/:product_id/goals

Create a goal

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the goal in
project_id * Numeric ID, or key of the project the goals should be created in
name * Name of the goal
description Description of the goal and it can include HTML formatting.
effort Value between 1 and 100 describing the goal's position on the effort axis in the goal chart
value Value between 1 and 100 describing the goal's position on the value axis in the goal chart
parent_id ID of a goal to roll up to in the product line, Roll up a goal to a product line goal by 1) creating a goal for the product line 2) choosing that goal in this control. You can then visualize how releases relate to your strategic goals throughout Aha!
success_metric_name * Name of the Metric that will be used to measure this goal's success
success_metric_description * Description of the success metric
success_metric_status * Status of the success metric for the goal

POST /api/v1/products/PRJ1/goals

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/goals" -d '{"goal":{"name":"Goal 3","success_metric":{"name":"FooBar","description":"Foo Bar","workflow_status":"Not Started"},"time_frame":{"name":"2015"},"description":"Our first big goal","effort":15,"value":5}}' -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
{
  "goal": {
    "name": "Goal 3",
    "success_metric": {
      "name": "FooBar",
      "description": "Foo Bar",
      "workflow_status": "Not Started"
    },
    "time_frame": {
      "name": "2015"
    },
    "description": "Our first big goal",
    "effort": 15,
    "value": 5
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "goal": {
    "id": "6426394684603266989",
    "name": "Goal 3",
    "effort": 15,
    "value": 5,
    "position": 3,
    "created_at": "2017-05-31T20:13:30.788Z",
    "updated_at": "2017-05-31T20:13:30.898Z",
    "url": "http://account1.example.org/strategic_imperatives/6426394684603266989",
    "resource": "http://account1.example.org/strategic_imperatives/6426394684603266989",
    "description": {
      "id": "6426394684627360099",
      "body": "Our first big goal",
      "created_at": "2017-05-31T20:13:30.793Z",
      "attachments": [

      ]
    },
    "success_metric": {
      "name": "FooBar",
      "description": {
        "id": "6426394684872702266",
        "body": "Foo Bar",
        "created_at": "2017-05-31T20:13:30.851Z",
        "attachments": [

        ]
      },
      "workflow_status": {
        "id": "412273758",
        "name": "Not Started",
        "complete": false
      }
    },
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-05-31T20:12:51.000Z"
    },
    "initiatives": [

    ],
    "comments_count": 0,
    "features": [

    ],
    "releases": [

    ],
    "custom_fields": [

    ]
  }
}

POST /api/v1/products/:product_id/goals

Create a goal should set a strategic imperative metric

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the goal in
project_id * Numeric ID, or key of the project the goals should be created in
name * Name of the goal
description Description of the goal and it can include HTML formatting.
effort Value between 1 and 100 describing the goal's position on the effort axis in the goal chart
value Value between 1 and 100 describing the goal's position on the value axis in the goal chart
parent_id ID of a goal to roll up to in the product line, Roll up a goal to a product line goal by 1) creating a goal for the product line 2) choosing that goal in this control. You can then visualize how releases relate to your strategic goals throughout Aha!
success_metric_name * Name of the Metric that will be used to measure this goal's success
success_metric_description * Description of the success metric
success_metric_status * Status of the success metric for the goal

POST /api/v1/products/PRJ1/goals

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/goals" -d '{"goal":{"name":"Goal 3418271","success_metric":{"name":"FooBar","description":"Foo Bar","workflow_status":"Not Started"},"time_frame":{"name":"2015"},"description":"Our first big goal","effort":15,"value":5}}' -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
{
  "goal": {
    "name": "Goal 3418271",
    "success_metric": {
      "name": "FooBar",
      "description": "Foo Bar",
      "workflow_status": "Not Started"
    },
    "time_frame": {
      "name": "2015"
    },
    "description": "Our first big goal",
    "effort": 15,
    "value": 5
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "goal": {
    "id": "6426394685646829300",
    "name": "Goal 3418271",
    "effort": 15,
    "value": 5,
    "position": 3,
    "created_at": "2017-05-31T20:13:31.029Z",
    "updated_at": "2017-05-31T20:13:31.132Z",
    "url": "http://account1.example.org/strategic_imperatives/6426394685646829300",
    "resource": "http://account1.example.org/strategic_imperatives/6426394685646829300",
    "description": {
      "id": "6426394685653513425",
      "body": "Our first big goal",
      "created_at": "2017-05-31T20:13:31.032Z",
      "attachments": [

      ]
    },
    "success_metric": {
      "name": "FooBar",
      "description": {
        "id": "6426394685875121970",
        "body": "Foo Bar",
        "created_at": "2017-05-31T20:13:31.087Z",
        "attachments": [

        ]
      },
      "workflow_status": {
        "id": "412273758",
        "name": "Not Started",
        "complete": false
      }
    },
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-05-31T20:12:51.000Z"
    },
    "initiatives": [

    ],
    "comments_count": 0,
    "features": [

    ],
    "releases": [

    ],
    "custom_fields": [

    ]
  }
}

POST /api/v1/products/:product_id/goals

Create a goal without all params should 400

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the goal in
project_id * Numeric ID, or key of the project the goals should be created in
name * Name of the goal
description Description of the goal and it can include HTML formatting.
effort Value between 1 and 100 describing the goal's position on the effort axis in the goal chart
value Value between 1 and 100 describing the goal's position on the value axis in the goal chart
parent_id ID of a goal to roll up to in the product line, Roll up a goal to a product line goal by 1) creating a goal for the product line 2) choosing that goal in this control. You can then visualize how releases relate to your strategic goals throughout Aha!
success_metric_name * Name of the Metric that will be used to measure this goal's success
success_metric_description * Description of the success metric
success_metric_status * Status of the success metric for the goal

POST /api/v1/products/PRJ1/goals

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/goals" -d '{"goal":{"name":"Goal 3418271","time_frame":{"name":"2015"},"description":"Our first big goal","effort":15,"value":5}}' -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
{
  "goal": {
    "name": "Goal 3418271",
    "time_frame": {
      "name": "2015"
    },
    "description": "Our first big goal",
    "effort": 15,
    "value": 5
  }
}

Response

Status: 400 Bad Request
  Content-Type: application/json; charset=utf-8
{
  "error": "Required parameter missing: success_metric"
}

GET /api/v1/products/:product_id/goals

Get all goals for a product

Parameters

Name Description
product_id * Numeric ID, or key of the product to get goals for

GET /api/v1/products/PRJ1/goals

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/goals" -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
{
  "goals": [
    {
      "id": "602095703",
      "name": "Goal 1",
      "effort": 10,
      "value": 70,
      "position": 1,
      "created_at": "2017-05-31T20:12:51.000Z",
      "updated_at": "2017-05-31T20:12:51.000Z",
      "url": "http://account1.example.org/strategic_imperatives/602095703",
      "resource": "http://account1.example.org/strategic_imperatives/602095703",
      "description": {
        "id": "166463080",
        "body": "Description of goal 1",
        "created_at": "2017-05-31T20:12:50.000Z",
        "attachments": [

        ]
      },
      "success_metric": {
        "name": "Metric 1",
        "description": {
          "id": "546284368",
          "body": "Description of goal 1",
          "created_at": "2017-05-31T20:12:50.000Z",
          "attachments": [

          ]
        },
        "workflow_status": {
          "id": "1009437757",
          "name": "In progress",
          "complete": false
        }
      },
      "project": {
        "id": "131414752",
        "reference_prefix": "PRJ1",
        "name": "Project 1",
        "product_line": false,
        "created_at": "2017-05-31T20:12:51.000Z"
      },
      "initiatives": [

      ],
      "comments_count": 1,
      "features": [
        {
          "id": "1007868956",
          "reference_num": "PRJ1-1",
          "name": "Feature 1",
          "created_at": "2017-05-31T20:12:50.000Z",
          "url": "http://account1.example.org/features/PRJ1-1",
          "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
        }
      ],
      "releases": [

      ],
      "custom_fields": [

      ]
    },
    {
      "id": "988418543",
      "name": "Goal 2",
      "effort": 40,
      "value": 30,
      "position": 2,
      "created_at": "2017-05-31T20:12:51.000Z",
      "updated_at": "2017-05-31T20:12:51.000Z",
      "url": "http://account1.example.org/strategic_imperatives/988418543",
      "resource": "http://account1.example.org/strategic_imperatives/988418543",
      "description": {
        "id": "1055602421",
        "body": "Description of goal 2",
        "created_at": "2017-05-31T20:12:50.000Z",
        "attachments": [

        ]
      },
      "success_metric": {
        "name": "Metric 2",
        "description": {
          "id": "394826695",
          "body": "Description of goal 2",
          "created_at": "2017-05-31T20:12:50.000Z",
          "attachments": [

          ]
        },
        "workflow_status": {
          "id": "1009437757",
          "name": "In progress",
          "complete": false
        }
      },
      "project": {
        "id": "131414752",
        "reference_prefix": "PRJ1",
        "name": "Project 1",
        "product_line": false,
        "created_at": "2017-05-31T20:12:51.000Z"
      },
      "initiatives": [

      ],
      "comments_count": 0,
      "features": [

      ],
      "releases": [

      ],
      "custom_fields": [

      ]
    },
    {
      "id": "712130641",
      "name": "Goal 3",
      "effort": 40,
      "value": 30,
      "position": 2,
      "created_at": "2017-05-31T20:12:51.000Z",
      "updated_at": "2017-05-31T20:12:51.000Z",
      "url": "http://account1.example.org/strategic_imperatives/712130641",
      "resource": "http://account1.example.org/strategic_imperatives/712130641",
      "description": {
        "id": "568840458",
        "body": "Description of project1_strategic_imperative3_no_epoch",
        "created_at": "2017-05-31T20:12:50.000Z",
        "attachments": [

        ]
      },
      "success_metric": {
        "name": "Metric 3",
        "description": {
          "id": "668008103",
          "body": "Description of project1_strategic_imperative3_no_epoch_strategic_imperative_metric",
          "created_at": "2017-05-31T20:12:50.000Z",
          "attachments": [

          ]
        },
        "workflow_status": {
          "id": "1009437757",
          "name": "In progress",
          "complete": false
        }
      },
      "project": {
        "id": "131414752",
        "reference_prefix": "PRJ1",
        "name": "Project 1",
        "product_line": false,
        "created_at": "2017-05-31T20:12:51.000Z"
      },
      "initiatives": [

      ],
      "comments_count": 0,
      "features": [

      ],
      "releases": [

      ],
      "custom_fields": [

      ]
    },
    {
      "id": "926116263",
      "name": "Goal 4",
      "effort": 40,
      "value": 30,
      "position": 2,
      "created_at": "2017-05-31T20:12:51.000Z",
      "updated_at": "2017-05-31T20:12:51.000Z",
      "url": "http://account1.example.org/strategic_imperatives/926116263",
      "resource": "http://account1.example.org/strategic_imperatives/926116263",
      "description": {
        "id": "308494954",
        "body": "Description of project1_strategic_imperative4_active_epoch",
        "created_at": "2017-05-31T20:12:50.000Z",
        "attachments": [

        ]
      },
      "success_metric": {
        "name": "Metric 4",
        "description": {
          "id": "330355042",
          "body": "Description of project1_strategic_imperative4_active_epoch_strategic_imperative_metric",
          "created_at": "2017-05-31T20:12:50.000Z",
          "attachments": [

          ]
        },
        "workflow_status": {
          "id": "1009437757",
          "name": "In progress",
          "complete": false
        }
      },
      "project": {
        "id": "131414752",
        "reference_prefix": "PRJ1",
        "name": "Project 1",
        "product_line": false,
        "created_at": "2017-05-31T20:12:51.000Z"
      },
      "time_frame": {
        "id": 273422810,
        "name": "2017"
      },
      "initiatives": [

      ],
      "comments_count": 0,
      "features": [

      ],
      "releases": [

      ],
      "custom_fields": [

      ]
    },
    {
      "id": "111739083",
      "name": "Goal 5",
      "effort": 40,
      "value": 30,
      "position": 2,
      "created_at": "2017-05-31T20:12:51.000Z",
      "updated_at": "2017-05-31T20:12:51.000Z",
      "url": "http://account1.example.org/strategic_imperatives/111739083",
      "resource": "http://account1.example.org/strategic_imperatives/111739083",
      "description": {
        "id": "996214770",
        "body": "Description of project1_strategic_imperative5_archived_epoch",
        "created_at": "2017-05-31T20:12:50.000Z",
        "attachments": [

        ]
      },
      "success_metric": {
        "name": "Metric 5",
        "description": {
          "id": "429990377",
          "body": "Description of project1_strategic_imperative5_archived_epoch_strategic_imperative_metric",
          "created_at": "2017-05-31T20:12:50.000Z",
          "attachments": [

          ]
        },
        "workflow_status": {
          "id": "1009437757",
          "name": "In progress",
          "complete": false
        }
      },
      "project": {
        "id": "131414752",
        "reference_prefix": "PRJ1",
        "name": "Project 1",
        "product_line": false,
        "created_at": "2017-05-31T20:12:51.000Z"
      },
      "time_frame": {
        "id": 834757622,
        "name": "2018"
      },
      "initiatives": [

      ],
      "comments_count": 0,
      "features": [

      ],
      "releases": [

      ],
      "custom_fields": [

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

GET /api/v1/goals/:id

Get a specific goal

Parameters

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

GET /api/v1/goals/602095703

Example CURL command

curl "https://secure.aha.io/api/v1/goals/602095703" -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
{
  "goal": {
    "id": "602095703",
    "name": "Goal 1",
    "effort": 10,
    "value": 70,
    "position": 1,
    "created_at": "2017-05-31T20:12:51.000Z",
    "updated_at": "2017-05-31T20:12:51.000Z",
    "url": "http://account1.example.org/strategic_imperatives/602095703",
    "resource": "http://account1.example.org/strategic_imperatives/602095703",
    "description": {
      "id": "166463080",
      "body": "Description of goal 1",
      "created_at": "2017-05-31T20:12:50.000Z",
      "attachments": [

      ]
    },
    "success_metric": {
      "name": "Metric 1",
      "description": {
        "id": "546284368",
        "body": "Description of goal 1",
        "created_at": "2017-05-31T20:12:50.000Z",
        "attachments": [

        ]
      },
      "workflow_status": {
        "id": "1009437757",
        "name": "In progress",
        "complete": false
      }
    },
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-05-31T20:12:51.000Z"
    },
    "initiatives": [

    ],
    "comments_count": 1,
    "features": [
      {
        "id": "1007868956",
        "reference_num": "PRJ1-1",
        "name": "Feature 1",
        "created_at": "2017-05-31T20:12:50.000Z",
        "url": "http://account1.example.org/features/PRJ1-1",
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
      }
    ],
    "releases": [

    ],
    "custom_fields": [

    ]
  }
}

PUT /api/v1/products/:product_id/goals/:id

Update a goal

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the goal in
id * Numeric ID, or key of the goal to be updated
project_id Numeric ID, or key of the project the goals should be created in
name Name of the goal
description Description of the goal and it can include HTML formatting.
effort Value between 1 and 100 describing the goal's position on the effort axis in the goal chart
value Value between 1 and 100 describing the goal's position on the value axis in the goal chart
parent_id ID of a goal to roll up to in the product line, Roll up a goal to a product line goal by 1) creating a goal for the product line 2) choosing that goal in this control. You can then visualize how releases relate to your strategic goals throughout Aha!
success_metric_name Name of the Metric that will be used to measure this goal's success
success_metric_description Description of the success metric
success_metric_status Status of the success metric for the goal

PUT /api/v1/products/PRJ1/goals/602095703

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/goals/602095703" -d '{"goal":{"description":"An even smarter goal."}}' -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
{
  "goal": {
    "description": "An even smarter goal."
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "goal": {
    "id": "602095703",
    "name": "Goal 1",
    "effort": 10,
    "value": 70,
    "position": 1,
    "created_at": "2017-05-31T20:12:51.000Z",
    "updated_at": "2017-05-31T20:12:51.000Z",
    "url": "http://account1.example.org/strategic_imperatives/602095703",
    "resource": "http://account1.example.org/strategic_imperatives/602095703",
    "description": {
      "id": "166463080",
      "body": "An even smarter goal.",
      "created_at": "2017-05-31T20:12:50.000Z",
      "attachments": [

      ]
    },
    "success_metric": {
      "name": "Metric 1",
      "description": {
        "id": "546284368",
        "body": "Description of goal 1",
        "created_at": "2017-05-31T20:12:50.000Z",
        "attachments": [

        ]
      },
      "workflow_status": {
        "id": "1009437757",
        "name": "In progress",
        "complete": false
      }
    },
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-05-31T20:12:51.000Z"
    },
    "initiatives": [

    ],
    "comments_count": 1,
    "features": [
      {
        "id": "1007868956",
        "reference_num": "PRJ1-1",
        "name": "Feature 1",
        "created_at": "2017-05-31T20:12:50.000Z",
        "url": "http://account1.example.org/features/PRJ1-1",
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
      }
    ],
    "releases": [

    ],
    "custom_fields": [

    ]
  }
}

DELETE /api/v1/products/:product_id/goals/:id

Delete a goal

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the goal in
id * Numeric ID, or key of the goal to be deleted

DELETE /api/v1/products/PRJ1/goals/602095703

Example CURL command

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