Teams API


POST /api/v1/teams

Create a team

Parameters

Name Description
name * Name of the team
product_id Numeric ID, or key of the product to assign the team to, or null for an account-level team
schedule_id Schedule to use for this team
team_members_count Number of members on a team
capacity The team's weekly capacity in hours
start_date The start date for the team
end_date The end date for the team
hourly_rate The hourly rate per team member

POST /api/v1/teams

Example CURL command

curl "https://company.aha.io/api/v1/teams" -d '{"team":{"name":"Account team"}}' -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
{
  "team": {
    "name": "Account team"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "team": {
    "id": "6743665458170168864",
    "name": "Account team",
    "team_members_count": 0,
    "capacity": 0,
    "hourly_rate": null,
    "start_date": null,
    "end_date": null,
    "project": null,
    "schedule": {
      "id": "441193141",
      "name": "Default schedule",
      "hours_per_day": "8.2",
      "velocity": "10.5"
    },
    "custom_fields": [

    ]
  }
}

POST /api/v1/products/:product_id/teams

Create a team at the product level

Parameters

Name Description
product_id * Numeric ID or key of the product to create a team for
name * Name of the team
product_id Numeric ID, or key of the product to assign the team to, or null for an account-level team
schedule_id Schedule to use for this team
team_members_count Number of members on a team
capacity The team's weekly capacity in hours
start_date The start date for the team
end_date The end date for the team
hourly_rate The hourly rate per team member

POST /api/v1/products/PRJ1/teams

Example CURL command

curl "https://company.aha.io/api/v1/products/PRJ1/teams" -d '{"team":{"name":"Product team"}}' -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
{
  "team": {
    "name": "Product team"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "team": {
    "id": "6743665458748404399",
    "name": "Product team",
    "team_members_count": 0,
    "capacity": 0,
    "hourly_rate": null,
    "start_date": null,
    "end_date": null,
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2019-01-01T00:00:00.000Z"
    },
    "schedule": {
      "id": "441193141",
      "name": "Default schedule",
      "hours_per_day": "8.2",
      "velocity": "10.5"
    },
    "custom_fields": [

    ]
  }
}

GET /api/v1/teams

Get all teams

GET /api/v1/teams

Example CURL command

curl -g "https://company.aha.io/api/v1/teams" -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
{
  "teams": [
    {
      "id": "563889676",
      "name": "Another team"
    },
    {
      "id": "949295028",
      "name": "Default team"
    },
    {
      "id": "130027876",
      "name": "Product line team"
    },
    {
      "id": "134558347",
      "name": "Project team"
    }
  ],
  "pagination": {
    "total_records": 4,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/products/:product_id/teams

Get all teams for a product

Parameters

Name Description
product_id * Numeric ID or key of the product to retrieve teams for

GET /api/v1/products/PRJ3/teams

Example CURL command

curl -g "https://company.aha.io/api/v1/products/PRJ3/teams" -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
{
  "teams": [
    {
      "id": "134558347",
      "name": "Project team"
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/teams/:id

Get a specific team

Parameters

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

GET /api/v1/teams/949295028

Example CURL command

curl -g "https://company.aha.io/api/v1/teams/949295028" -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
{
  "team": {
    "id": "949295028",
    "name": "Default team",
    "team_members_count": 5,
    "capacity": 8.0,
    "hourly_rate": "100.0",
    "start_date": "2019-01-01",
    "end_date": "2019-01-01",
    "project": null,
    "schedule": {
      "id": "441193141",
      "name": "Default schedule",
      "hours_per_day": "8.2",
      "velocity": "10.5"
    },
    "custom_fields": [

    ]
  }
}

PUT /api/v1/teams/:id

Move a team to a different product

Parameters

Name Description
id * Numeric ID of the team to be edited
name Name of the team
product_id Numeric ID, or key of the product to assign the team to, or null for an account-level team
schedule_id Schedule to use for this team
team_members_count Number of members on a team
capacity The team's weekly capacity in hours
start_date The start date for the team
end_date The end date for the team
hourly_rate The hourly rate per team member

PUT /api/v1/teams/134558347

Example CURL command

curl "https://company.aha.io/api/v1/teams/134558347" -d '{"team":{"name":"Product 2 team","product_id":"PRJ2"}}' -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
{
  "team": {
    "name": "Product 2 team",
    "product_id": "PRJ2"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "team": {
    "id": "134558347",
    "name": "Product 2 team",
    "team_members_count": 0,
    "capacity": 0.0,
    "hourly_rate": "250.0",
    "start_date": "2019-01-01",
    "end_date": "2019-01-01",
    "project": {
      "id": "517761884",
      "reference_prefix": "PRJ2",
      "name": "Project 2",
      "product_line": false,
      "created_at": "2019-01-01T00:00:00.000Z"
    },
    "schedule": {
      "id": "441193141",
      "name": "Default schedule",
      "hours_per_day": "8.2",
      "velocity": "10.5"
    },
    "custom_fields": [

    ]
  }
}

DELETE /api/v1/teams/:id

Delete a team

Parameters

Name Description
id * Numeric ID of the team to be deleted

DELETE /api/v1/teams/134558347

Example CURL command

curl "https://company.aha.io/api/v1/teams/134558347" -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: 204 No Content
  

Overview

API Resources