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": "6778870061887696285",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870061944924717",
      "team_id": 949295028,
      "period_start": null,
      "total": "15.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870062030454487",
      "team_id": null,
      "period_start": null,
      "total": "50.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870062196062540",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870062274727540",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870062484090563",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870062538504687",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870062578944574",
      "team_id": 563889676,
      "period_start": null,
      "total": "35.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870062805564973",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870063004153183",
      "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": "6778870064037304163",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "15.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870064303426613",
      "team_id": 563889676,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870064075441464",
      "team_id": 563889676,
      "period_start": null,
      "total": "35.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870063451977733",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870063755771172",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "10.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870063513442936",
      "team_id": 949295028,
      "period_start": null,
      "total": "15.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870063651963983",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "5.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870063944992796",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870064450666865",
      "team_id": null,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870063583753567",
      "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/6778870065445374760

Example CURL command

curl "https://company.aha.io/api/v1/estimate_values/6778870065445374760" -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": "6778870065445374760",
      "team_id": 949295028,
      "period_start": "2019-01-01",
      "total": "20.0",
      "computed": false,
      "ignored": false
    },
    {
      "id": "6778870065086437597",
      "team_id": 949295028,
      "period_start": null,
      "total": "25.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870065268694571",
      "team_id": null,
      "period_start": null,
      "total": "60.0",
      "computed": true,
      "ignored": false
    },
    {
      "id": "6778870065616131390",
      "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/6778870067332247561

Example CURL command

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

Overview

API Resources