Integrations API


POST /api/v1/integrations

Create an integration for the account

POST /api/v1/integrations

Example CURL command

curl "https://secure.aha.io/api/v1/integrations" -d '{"integration":{"service_name":"zendesk","enabled":true}}' -X POST \
	-H "Authorization: Bearer 584b6d6b83405011f8c6903d2379f4afdf824cef867db391b7bcb5995f603a76" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 584b6d6b83405011f8c6903d2379f4afdf824cef867db391b7bcb5995f603a76
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json
{
  "integration": {
    "service_name": "zendesk",
    "enabled": true
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "integration": {
    "id": "6411303743955432048",
    "service_name": "zendesk",
    "name": "Zendesk",
    "enabled": true,
    "callback_token": "ca094416fa4ee584ae55646c28a26017b1938e298846bf801d508dee54a9d792",
    "created_at": "2017-04-21T04:12:57.364Z",
    "updated_at": "2017-04-21T04:12:57.364Z",
    "url": "http://account1.example.org/integrations/6411303743955432048",
    "resource": "http://account1.example.org/api/v1/integrations/6411303743955432048",
    "owner": {
      "type": "Account",
      "id": "303742481",
      "url": "http://account1.example.org/account/303742481",
      "resource": "http://account1.example.org/account/303742481"
    }
  }
}

GET /api/v1/integrations

Get all integrations at the account level

GET /api/v1/integrations

Example CURL command

curl "https://secure.aha.io/api/v1/integrations" -X GET \
	-H "Authorization: Bearer 584b6d6b83405011f8c6903d2379f4afdf824cef867db391b7bcb5995f603a76" \
	-H "X-Aha-Account: account1" \
	-H "Content-Type: application/json" \
	-H "Accept: application/json"

Request

Authorization: Bearer 584b6d6b83405011f8c6903d2379f4afdf824cef867db391b7bcb5995f603a76
X-Aha-Account: account1
Content-Type: application/json
Accept: application/json

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "integrations": [
    {
      "id": "390243673",
      "name": "Zendesk",
      "service_name": "zendesk",
      "created_at": "2017-04-21T04:12:25.000Z"
    }
  ],
  "pagination": {
    "total_records": 1,
    "total_pages": 1,
    "current_page": 1
  }
}

POST /api/v1/products/:product_id/integrations

Create an integration for a product

Parameters

Name Description
product_id * Numeric ID, or key of the product to create an integration for

POST /api/v1/products/PRJ1/integrations

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/integrations" -d '{"integration":{"service_name":"zendesk","enabled":true}}' -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
{
  "integration": {
    "service_name": "zendesk",
    "enabled": true
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "integration": {
    "id": "6411303744688460619",
    "service_name": "zendesk",
    "name": "Zendesk",
    "enabled": true,
    "callback_token": "e08ff55a6f5f44532dc94fbc35aaa75dad6efdce5482518143abdc928dff9911",
    "created_at": "2017-04-21T04:12:57.535Z",
    "updated_at": "2017-04-21T04:12:57.535Z",
    "url": "http://account1.example.org/integrations/6411303744688460619",
    "resource": "http://account1.example.org/api/v1/integrations/6411303744688460619",
    "owner": {
      "type": "Project",
      "id": "131414752",
      "url": "http://account1.example.org/projects/PRJ1",
      "resource": "http://account1.example.org/projects/PRJ1"
    }
  }
}

GET /api/v1/products/:product_id/integrations

Get all integrations at the product level

Parameters

Name Description
product_id * Numeric ID, or key of the product to get integrations for

GET /api/v1/products/PRJ1/integrations

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/integrations" -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
{
  "integrations": [
    {
      "id": "204584239",
      "name": "JIRA",
      "service_name": "jira",
      "created_at": "2017-04-21T04:12:25.000Z"
    },
    {
      "id": "322044925",
      "name": "JIRA",
      "service_name": "jira",
      "created_at": "2017-04-21T04:12:25.000Z"
    }
  ],
  "pagination": {
    "total_records": 2,
    "total_pages": 1,
    "current_page": 1
  }
}

GET /api/v1/products/:product_id/integrations/:integration_id

Get a specific integration by id

Parameters

Name Description
product_id * Numeric ID, or key of the product to retrieve an integration for
service_name * Numeric ID of the integration to retrieve

GET /api/v1/products/PRJ1/integrations/204584239

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/integrations/204584239" -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
{
  "integration": {
    "id": "204584239",
    "service_name": "jira",
    "name": "JIRA",
    "enabled": true,
    "callback_token": "123",
    "created_at": "2017-04-21T04:12:25.000Z",
    "updated_at": "2017-04-21T04:12:25.000Z",
    "url": "http://account1.example.org/integrations/204584239",
    "resource": "http://account1.example.org/api/v1/integrations/204584239",
    "owner": {
      "type": "Project",
      "id": "131414752",
      "url": "http://account1.example.org/projects/PRJ1",
      "resource": "http://account1.example.org/projects/PRJ1"
    }
  }
}

GET /api/v1/products/:product_id/integrations/:service_name

Get a specific integration by service name

DEPRECATED: pass :integration_id rather than :service_name to identify the integration.

Parameters

Name Description
product_id * Numeric ID, or key of the product to retrieve an integration for
service_name * Service name of the integration to retrieve

GET /api/v1/products/PRJ1/integrations/jira

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1/integrations/jira" -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
{
  "integration": {
    "id": "322044925",
    "service_name": "jira",
    "name": "JIRA",
    "enabled": true,
    "callback_token": "1234",
    "created_at": "2017-04-21T04:12:25.000Z",
    "updated_at": "2017-04-21T04:12:25.000Z",
    "url": "http://account1.example.org/integrations/322044925",
    "resource": "http://account1.example.org/api/v1/integrations/322044925",
    "owner": {
      "type": "Project",
      "id": "131414752",
      "url": "http://account1.example.org/projects/PRJ1",
      "resource": "http://account1.example.org/projects/PRJ1"
    }
  }
}

Overview

API Resources