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": "6426394652941210011",
    "service_name": "zendesk",
    "name": "Zendesk",
    "enabled": true,
    "callback_token": "45a5cc5abe5412a6dee3237a02cf354cd033878336c552b948790e1e131d07c0",
    "created_at": "2017-05-31T20:13:23.417Z",
    "updated_at": "2017-05-31T20:13:23.417Z",
    "url": "http://account1.example.org/integrations/6426394652941210011",
    "resource": "http://account1.example.org/api/v1/integrations/6426394652941210011",
    "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-05-31T20:12:50.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": "6426394653658491650",
    "service_name": "zendesk",
    "name": "Zendesk",
    "enabled": true,
    "callback_token": "422086e6e36bcda6632b0f871e540c7a1cba60e37b8fbf1871ab4725fb51cfcf",
    "created_at": "2017-05-31T20:13:23.581Z",
    "updated_at": "2017-05-31T20:13:23.581Z",
    "url": "http://account1.example.org/integrations/6426394653658491650",
    "resource": "http://account1.example.org/api/v1/integrations/6426394653658491650",
    "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-05-31T20:12:50.000Z"
    },
    {
      "id": "322044925",
      "name": "JIRA",
      "service_name": "jira",
      "created_at": "2017-05-31T20:12:50.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-05-31T20:12:50.000Z",
    "updated_at": "2017-05-31T20:12:50.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": "204584239",
    "service_name": "jira",
    "name": "JIRA",
    "enabled": true,
    "callback_token": "123",
    "created_at": "2017-05-31T20:12:50.000Z",
    "updated_at": "2017-05-31T20:12:50.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"
    }
  }
}

Overview

API Resources