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": "6398143269158448125",
    "service_name": "zendesk",
    "name": "Zendesk",
    "enabled": true,
    "callback_token": "babfa27b630338678fc19341a0b04ebe2aac59347fc4ad1a9fe705e236c23b2d",
    "created_at": "2017-03-16T17:03:35.547Z",
    "updated_at": "2017-03-16T17:03:35.547Z",
    "url": "http://account1.example.org/integrations/6398143269158448125",
    "resource": "http://account1.example.org/api/v1/integrations/6398143269158448125",
    "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-03-16T17:02:52.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": "6398143270185768039",
    "service_name": "zendesk",
    "name": "Zendesk",
    "enabled": true,
    "callback_token": "df5670937bd7cdf2265ef2edd202f257165a5e55ab18d10082acd50c3b127336",
    "created_at": "2017-03-16T17:03:35.785Z",
    "updated_at": "2017-03-16T17:03:35.785Z",
    "url": "http://account1.example.org/integrations/6398143270185768039",
    "resource": "http://account1.example.org/api/v1/integrations/6398143270185768039",
    "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-03-16T17:02:52.000Z"
    },
    {
      "id": "322044925",
      "name": "JIRA",
      "service_name": "jira",
      "created_at": "2017-03-16T17:02:52.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-03-16T17:02:52.000Z",
    "updated_at": "2017-03-16T17:02:52.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-03-16T17:02:52.000Z",
    "updated_at": "2017-03-16T17:02:52.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