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": "6477599777056387696",
    "service_name": "zendesk",
    "name": "Zendesk",
    "enabled": true,
    "callback_token": "30447cf2c15c13a1d0626a0431cba23181c650f523809d6bba3e93e955650e74",
    "created_at": "2017-10-16T19:55:25.421Z",
    "updated_at": "2017-10-16T19:55:25.421Z",
    "url": "http://account1.example.org/integrations/6477599777056387696",
    "resource": "http://account1.example.org/api/v1/integrations/6477599777056387696",
    "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 -g "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": "1055357999",
      "name": "Desk.com",
      "service_name": "desk_dot_com",
      "created_at": "2017-10-16T19:54:35.000Z"
    },
    {
      "id": "79015308",
      "name": "Salesforce",
      "service_name": "salesforce",
      "created_at": "2017-10-16T19:54:35.000Z"
    },
    {
      "id": "390243673",
      "name": "Zendesk",
      "service_name": "zendesk",
      "created_at": "2017-10-16T19:54:35.000Z"
    }
  ],
  "pagination": {
    "total_records": 3,
    "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": "6477599777973965643",
    "service_name": "zendesk",
    "name": "Zendesk",
    "enabled": true,
    "callback_token": "a869b71dc1abac135315dcb229946b4f39f491081cd2cd0fb458d398080133b3",
    "created_at": "2017-10-16T19:55:25.635Z",
    "updated_at": "2017-10-16T19:55:25.635Z",
    "url": "http://account1.example.org/integrations/6477599777973965643",
    "resource": "http://account1.example.org/api/v1/integrations/6477599777973965643",
    "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 -g "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-10-16T19:54:35.000Z"
    },
    {
      "id": "207648948",
      "name": "JIRA",
      "service_name": "jira",
      "created_at": "2017-10-16T19:54:35.000Z"
    },
    {
      "id": "322044925",
      "name": "JIRA",
      "service_name": "jira",
      "created_at": "2017-10-16T19:54:35.000Z"
    },
    {
      "id": "342659513",
      "name": "JIRA",
      "service_name": "jira",
      "created_at": "2017-10-16T19:54:35.000Z"
    }
  ],
  "pagination": {
    "total_records": 4,
    "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 -g "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-10-16T19:54:35.000Z",
    "updated_at": "2017-10-16T19:54:35.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 -g "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-10-16T19:54:35.000Z",
    "updated_at": "2017-10-16T19:54:35.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