Search API


GET /api/v1/search

Searches all content

Parameters

Name Description
q String to search on
product_id Limit search results to a single product
record_type Limit serach results to a single record type

GET /api/v1/search?q=Feature

Example CURL command

curl -g "https://company.aha.io/api/v1/search?q=Feature" -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
{
  "results": [
    {
      "result_type": "basic",
      "result_hit": "This <b>feature</b> is integrated",
      "record": {
        "id": "340318108",
        "body": "This feature is integrated",
        "created_at": "2019-01-01T00:00:00.000Z",
        "updated_at": "2019-01-01T00:00:00.000Z",
        "user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "no-reply@aha.io",
          "created_at": "2019-01-01T00:00:00.000Z",
          "updated_at": "2019-01-01T00:00:00.000Z"
        },
        "url": "http://company.aha.io/comments/340318108"
      },
      "record_type": "Comment"
    },
    {
      "result_type": "basic",
      "result_hit": "Comment on <b>feature</b>",
      "record": {
        "id": "781701978",
        "body": "Comment on feature",
        "created_at": "2019-01-01T00:00:00.000Z",
        "updated_at": "2019-01-01T00:00:00.000Z",
        "user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "no-reply@aha.io",
          "created_at": "2019-01-01T00:00:00.000Z",
          "updated_at": "2019-01-01T00:00:00.000Z"
        },
        "url": "http://company.aha.io/comments/781701978"
      },
      "record_type": "Comment"
    },
    {
      "result_type": "basic",
      "result_hit": "PRJ1-4 Another Fourth <b>Feature</b>",
      "record": {
        "id": "209201304",
        "reference_num": "PRJ1-4",
        "name": "Another Fourth Feature",
        "created_at": "2019-01-01T00:00:00.000Z",
        "url": "http://company.aha.io/features/PRJ1-4",
        "resource": "http://company.aha.io/api/v1/features/PRJ1-4",
        "product_id": 131414752
      },
      "record_type": "Feature"
    },
    {
      "result_type": "basic",
      "result_hit": "PRJ1-3 Another Third <b>Feature</b>",
      "record": {
        "id": "303873333",
        "reference_num": "PRJ1-3",
        "name": "Another Third Feature",
        "created_at": "2019-01-01T00:00:00.000Z",
        "url": "http://company.aha.io/features/PRJ1-3",
        "resource": "http://company.aha.io/api/v1/features/PRJ1-3",
        "product_id": 131414752
      },
      "record_type": "Feature"
    },
    {
      "result_type": "basic",
      "result_hit": "PRJ1-2 Another <b>Feature</b>",
      "record": {
        "id": "622562724",
        "reference_num": "PRJ1-2",
        "name": "Another Feature",
        "created_at": "2019-01-01T00:00:00.000Z",
        "url": "http://company.aha.io/features/PRJ1-2",
        "resource": "http://company.aha.io/api/v1/features/PRJ1-2",
        "product_id": 131414752
      },
      "record_type": "Feature"
    },
    {
      "result_type": "basic",
      "result_hit": "PRJ1-1 <b>Feature</b>",
      "record": {
        "id": "1007868956",
        "reference_num": "PRJ1-1",
        "name": "Feature 1",
        "created_at": "2019-01-01T00:00:00.000Z",
        "url": "http://company.aha.io/features/PRJ1-1",
        "resource": "http://company.aha.io/api/v1/features/PRJ1-1",
        "product_id": 131414752
      },
      "record_type": "Feature"
    }
  ],
  "projects": [
    {
      "name": "Project 1",
      "id": 131414752,
      "count": 6
    }
  ],
  "record_types": [
    {
      "name": "Features",
      "count": 4
    },
    {
      "name": "Comments",
      "count": 2
    }
  ],
  "pagination": {
    "total_records": 6,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/search

Searches only specific record type

Parameters

Name Description
q String to search on
product_id Limit search results to a single product
record_type Limit serach results to a single record type

GET /api/v1/search?q=Feature&record_type=Comment

Example CURL command

curl -g "https://company.aha.io/api/v1/search?q=Feature&record_type=Comment" -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
{
  "results": [
    {
      "result_type": "basic",
      "result_hit": "This <b>feature</b> is integrated",
      "record": {
        "id": "340318108",
        "body": "This feature is integrated",
        "created_at": "2019-01-01T00:00:00.000Z",
        "updated_at": "2019-01-01T00:00:00.000Z",
        "user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "no-reply@aha.io",
          "created_at": "2019-01-01T00:00:00.000Z",
          "updated_at": "2019-01-01T00:00:00.000Z"
        },
        "url": "http://company.aha.io/comments/340318108"
      },
      "record_type": "Comment"
    },
    {
      "result_type": "basic",
      "result_hit": "Comment on <b>feature</b>",
      "record": {
        "id": "781701978",
        "body": "Comment on feature",
        "created_at": "2019-01-01T00:00:00.000Z",
        "updated_at": "2019-01-01T00:00:00.000Z",
        "user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "no-reply@aha.io",
          "created_at": "2019-01-01T00:00:00.000Z",
          "updated_at": "2019-01-01T00:00:00.000Z"
        },
        "url": "http://company.aha.io/comments/781701978"
      },
      "record_type": "Comment"
    }
  ],
  "projects": [
    {
      "name": "Project 1",
      "id": 131414752,
      "count": 2
    }
  ],
  "record_types": [
    {
      "name": "Comments",
      "count": 2
    }
  ],
  "pagination": {
    "total_records": 2,
    "total_pages": 1,
    "current_page": 1
  }
}

Overview

API Resources