Personas API


POST /api/v1/products/:product_id/personas

Create a persona

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the persona in
name * Name of the persona
color Hex color of the persona in the Aha! UI

POST /api/v1/products/PRJ1/personas

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/personas" -d '{"persona":{"name":"John"}}' -X POST \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "persona": {
    "name": "John"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "persona": {
    "id": "6495838399435245948",
    "name": "John",
    "color": 13421772,
    "created_at": "2017-12-04T23:30:35.609Z",
    "updated_at": "2017-12-04T23:30:35.609Z",
    "url": "http://account1.example.org/personas/6495838399435245948",
    "resource": "http://account1.example.org/personas/6495838399435245948",
    "custom_fields": [

    ],
    "comments_count": 0
  }
}

GET /api/v1/products/:product_id/personas

Get all of the personas in a product

Parameters

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

GET /api/v1/products/PRJ1/personas

Example CURL command

curl -g "https://secure.aha.io/api/v1/products/PRJ1/personas" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "personas": [
    {
      "id": "344093881",
      "name": "Jane the athlete",
      "created_at": "2017-12-04T23:30:01.000Z"
    },
    {
      "id": "227222789",
      "name": "Jim the cyclist",
      "created_at": "2017-12-04T23:30:01.000Z"
    },
    {
      "id": "982259096",
      "name": "Tim the repairer",
      "created_at": "2017-12-04T23:30:01.000Z"
    }
  ],
  "pagination": {
    "total_records": 3,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/personas/:id

Get a specific persona

Parameters

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

GET /api/v1/personas/344093881

Example CURL command

curl -g "https://secure.aha.io/api/v1/personas/344093881" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "persona": {
    "id": "344093881",
    "name": "Jane the athlete",
    "color": 13421772,
    "created_at": "2017-12-04T23:30:01.000Z",
    "updated_at": "2017-12-04T23:30:01.000Z",
    "url": "http://account1.example.org/personas/344093881",
    "resource": "http://account1.example.org/personas/344093881",
    "custom_fields": [

    ],
    "comments_count": 0
  }
}

GET /api/v1/personas

Search personas by name

Parameters

Name Description
q Sub-string to match against persona name

GET /api/v1/personas?q=Jim

Example CURL command

curl -g "https://secure.aha.io/api/v1/personas?q=Jim" -X GET \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "personas": [
    {
      "id": "227222789",
      "name": "Jim the cyclist",
      "created_at": "2017-12-04T23:30:01.000Z"
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

PUT /api/v1/products/:product_id/personas/:id

Update a persona

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the persona in
id * Numeric ID, or key of the persona to be updated
name Name of the persona
color Hex color of the persona in the Aha! UI

PUT /api/v1/products/PRJ1/personas/344093881

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/personas/344093881" -d '{"persona":{"name":"Julie"}}' -X PUT \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "persona": {
    "name": "Julie"
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "persona": {
    "id": "344093881",
    "name": "Julie",
    "color": 13421772,
    "created_at": "2017-12-04T23:30:01.000Z",
    "updated_at": "2017-12-04T23:30:35.948Z",
    "url": "http://account1.example.org/personas/344093881",
    "resource": "http://account1.example.org/personas/344093881",
    "custom_fields": [

    ],
    "comments_count": 0
  }
}

DELETE /api/v1/products/:product_id/personas/:id

Delete a persona

Parameters

Name Description
product_id * Numeric ID, or key of the product to create the persona in
id * Numeric ID, or key of the persona to be deleted

DELETE /api/v1/products/PRJ1/personas/344093881

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/personas/344093881" -d '' -X DELETE \
	-H "Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 15b60d42d4bc417284a246ced6877b0bf13fb4aca415f7b55f7006bc3694a8ab
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 204 No Content
  

Overview

API Resources