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": "6733663112731232406",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663112778602588",
      "team_id": 949295028,
      "period_start": null,
      "total": "15.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663112884848356",
      "team_id": null,
      "period_start": null,
      "total": "50.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663112960396389",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663113074285846",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663113271588048",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663113343727846",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663113417412926",
      "team_id": 563889676,
      "period_start": null,
      "total": "35.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663114022560242",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663114269888666",
      "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": "6733663115381670017",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663115733253364",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663115437141199",
      "team_id": 563889676,
      "period_start": null,
      "total": "35.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663114693254719",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663115056995582",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663114763589314",
      "team_id": 949295028,
      "period_start": null,
      "total": "15.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663114932243730",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663115256529834",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663115933021981",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663114846237314",
      "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/6733663116819260002

Example CURL command

curl "https://company.aha.io/api/v1/estimate_values/6733663116819260002" -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": "6733663116819260002",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6733663116541239177",
      "team_id": 949295028,
      "period_start": null,
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663116614974624",
      "team_id": null,
      "period_start": null,
      "total": "60.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6733663117018269478",
      "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/6733663118956512981

Example CURL command

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

Overview

API Resources