Estimate values API


POST /api/v1/capacity_investments/:id/estimate_values

Create estimate values for a capacity investment

Estimate value objects should include the following keys: team_id, period_start, and total. Returns all updated and destroyed estimate values, including computed sums and ignored values.

Parameters

Name Description
id * Numeric ID of the capacity investment to add estimate values to
estimate_values * An array of estimate value objects to create

POST /api/v1/capacity_investments/756888381/estimate_values

Example CURL command

curl "https://company.aha.io/api/v1/capacity_investments/756888381/estimate_values" -d $'{"estimate_values":{"0":{"team_id":949295028,"period_start":"2019-01-01","total":5},"1":{"team_id":949295028,"period_start":"2019-01-01","total":10},"2":{"team_id":563889676,"period_start":"2019-01-01","total":15},"3":{"team_id":563889676,"period_start":"2019-01-01","total":20}}}' -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
{
  "estimate_values": {
    "0": {
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": 5
    },
    "1": {
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": 10
    },
    "2": {
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": 15
    },
    "3": {
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": 20
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "updated": [
    {
      "id": "6796021259017686928",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021259069475631",
      "team_id": 949295028,
      "period_start": null,
      "total": "15.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021259201013087",
      "team_id": null,
      "period_start": null,
      "total": "50.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021259281444301",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021259383422249",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021259638300224",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021259744696410",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021259793799890",
      "team_id": 563889676,
      "period_start": null,
      "total": "35.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021260132778953",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021260415781128",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": true,
      "ignored": false
    }
  ],
  "destroyed": [

  ]
}

GET /api/v1/capacity_investments/:id/estimate_values

Retrieve estimate values for a capacity investment

Parameters

Name Description
id * Numeric ID of the capacity investment to retrieve estimate values for

GET /api/v1/capacity_investments/756888381/estimate_values

Example CURL command

curl -g "https://company.aha.io/api/v1/capacity_investments/756888381/estimate_values" -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
{
  "estimate_values": [
    {
      "id": "6796021261636438659",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021262201814994",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021261676455197",
      "team_id": 563889676,
      "period_start": null,
      "total": "35.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021260951646231",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021261302641105",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021261010240755",
      "team_id": 949295028,
      "period_start": null,
      "total": "15.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021261174317024",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021261505531460",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021262370013740",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021261085818916",
      "team_id": null,
      "period_start": null,
      "total": "50.0",
      "computed": true,
      "ignored": false
    }
  ],
  "pagination": {
    "total_records": 10,
    "total_pages": 1,
    "current_page": 1
  }
}

PUT /api/v1/estimate_values/:id

Update an estimate value

Returns all updated estimate values, including computed sums and ignored values.

Parameters

Name Description
id * Numeric ID of the estimate value to update
total Total of the estimate value

PUT /api/v1/estimate_values/6796021263266806171

Example CURL command

curl "https://company.aha.io/api/v1/estimate_values/6796021263266806171" -d $'{"estimate_value":{"total":20}}' -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
{
  "estimate_value": {
    "total": 20
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "updated": [
    {
      "id": "6796021263266806171",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6796021263053048580",
      "team_id": 949295028,
      "period_start": null,
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021263125596376",
      "team_id": null,
      "period_start": null,
      "total": "60.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021263446034950",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "35.0",
      "computed": true,
      "ignored": false
    }
  ],
  "destroyed": [

  ]
}

DELETE /api/v1/estimate_values/:id

Delete an estimate value

Returns all updated and destroyed estimate values, including computed sums and ignored values.

Parameters

Name Description
id * Numeric ID of the estimate value to update

DELETE /api/v1/estimate_values/6796021265181394864

Example CURL command

curl "https://company.aha.io/api/v1/estimate_values/6796021265181394864" -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: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "updated": [
    {
      "id": "6796021264911018805",
      "team_id": 949295028,
      "period_start": null,
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021264991075616",
      "team_id": null,
      "period_start": null,
      "total": "40.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6796021265410532776",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": true,
      "ignored": false
    }
  ],
  "destroyed": [
    {
      "id": "6796021265181394864",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    }
  ]
}

Overview

API Resources