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": "6743665183714904214",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665183745497180",
      "team_id": 949295028,
      "period_start": null,
      "total": "15.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665183834965732",
      "team_id": null,
      "period_start": null,
      "total": "50.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665183893736549",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665183990848790",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665184188150992",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665184277068006",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665184317198654",
      "team_id": 563889676,
      "period_start": null,
      "total": "35.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665184570024434",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665184767021210",
      "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": "6743665185778139265",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665186079390964",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665185833610447",
      "team_id": 563889676,
      "period_start": null,
      "total": "35.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665185140055615",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665185470242046",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665185210390210",
      "team_id": 949295028,
      "period_start": null,
      "total": "15.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665185362267410",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665185669776298",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665186262382365",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665185293038210",
      "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/6743665187182174818

Example CURL command

curl "https://company.aha.io/api/v1/estimate_values/6743665187182174818" -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": "6743665187182174818",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6743665186904153993",
      "team_id": 949295028,
      "period_start": null,
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665186994666656",
      "team_id": null,
      "period_start": null,
      "total": "60.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665187381184294",
      "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/6743665189537531605

Example CURL command

curl "https://company.aha.io/api/v1/estimate_values/6743665189537531605" -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": "6743665189273996885",
      "team_id": 949295028,
      "period_start": null,
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665189353427547",
      "team_id": null,
      "period_start": null,
      "total": "40.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6743665189717620478",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": true,
      "ignored": false
    }
  ],
  "destroyed": [
    {
      "id": "6743665189537531605",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    }
  ]
}

Overview

API Resources