Custom Object Links API


Resources that can be linked to objects from a Custom Table can manipulate them in a bulk id-list format. To use Custom Objects Links you must first add a Many-to-Many custom field definition to the resource. When you pass the IDs of custom object records to link to the feature, the existing list of links will be replaced.

Examples of linking custom objects to resources with a Many-to-Many customer field:

Custom Tables are an Enterprise+ exclusive feature.

PUT /api/v1/products/:id

Link custom object records to a product

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the product to be edited

PUT /api/v1/products/PRJ1

Example CURL command

curl "https://secure.aha.io/api/v1/products/PRJ1" -d '{"product":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-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
{
  "product": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "product": {
    "id": "131414752",
    "reference_prefix": "PRJ1",
    "name": "Project 1",
    "product_line": false,
    "created_at": "2017-03-16T17:02:52.000Z",
    "updated_at": "2017-03-16T17:03:01.243Z",
    "description": {
      "id": "21164619",
      "body": "",
      "created_at": "2017-03-16T17:02:52.000Z",
      "attachments": [

      ]
    },
    "url": "http://account1.example.org/projects/PRJ1",
    "resource": "http://account1.example.org/projects/PRJ1",
    "children": [

    ],
    "custom_fields": [

    ],
    "custom_object_links": [

    ],
    "comments_count": 6,
    "has_ideas": true
  }
}

PUT /api/v1/releases/:id

Link custom object records to a release

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the release to be edited

PUT /api/v1/releases/PRJ1-R-1

Example CURL command

curl "https://secure.aha.io/api/v1/releases/PRJ1-R-1" -d '{"release":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-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
{
  "release": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "release": {
    "id": "278327321",
    "product_id": "131414752",
    "reference_num": "PRJ1-R-1",
    "name": "Release 1",
    "start_date": "2017-03-23",
    "release_date": "2017-03-23",
    "released": false,
    "parking_lot": false,
    "created_at": "2017-03-16T17:02:53.000Z",
    "updated_at": "2017-03-16T17:02:53.000Z",
    "theme": {
      "id": "522610666",
      "body": "Theme of the release",
      "created_at": "2017-03-16T17:02:52.000Z",
      "attachments": [

      ]
    },
    "url": "http://account1.example.org/releases/PRJ1-R-1",
    "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-1",
    "integration_fields": [
      {
        "id": "68217473",
        "name": "id",
        "value": "777",
        "integration_id": 204584239,
        "service_name": "jira",
        "created_at": "2017-03-16T17:02:52.000Z"
      }
    ],
    "custom_fields": [
      {
        "key": "text_field",
        "name": "TextField",
        "value": "Acme Corp",
        "type": "string"
      },
      {
        "key": "note",
        "name": "Note",
        "id": "264108567",
        "body": "<p>sample text</p>",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ],
        "value": "<p>sample text</p>",
        "type": "note"
      }
    ],
    "custom_object_links": [

    ],
    "comments_count": 1,
    "workflow_status": {
      "id": "738862546",
      "name": "New",
      "complete": false
    },
    "owner": {
      "id": "16338845",
      "name": "John Smith",
      "email": "john.smith@account1.com",
      "created_at": "2017-03-16T17:02:53.000Z",
      "updated_at": "2017-03-16T17:02:53.000Z"
    },
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-03-16T17:02:52.000Z"
    }
  }
}

PUT /api/v1/features/:id

Link custom object records to a feature

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the feature to be edited

PUT /api/v1/features/PRJ1-1

Example CURL command

curl "https://secure.aha.io/api/v1/features/PRJ1-1" -d '{"feature":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-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
{
  "feature": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "feature": {
    "id": "1007868956",
    "name": "Feature 1",
    "reference_num": "PRJ1-1",
    "position": 1,
    "score": 0,
    "created_at": "2017-03-16T17:02:52.000Z",
    "updated_at": "2017-03-16T17:03:04.034Z",
    "start_date": null,
    "due_date": null,
    "workflow_kind": {
      "id": "98484309",
      "name": "New"
    },
    "workflow_status": {
      "id": "934242751",
      "name": "New",
      "complete": false
    },
    "description": {
      "id": "793547626",
      "body": "Body of note 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "attachments": [
        {
          "id": "724655692",
          "download_url": "http://account1.lvh.me/attachments/token/b50b85351a857b3eefb5287cc0a7313e956d8036c502e2f9e9af4fefa1a70952.download",
          "created_at": "2017-03-16T17:02:52.000Z",
          "file_size": 123,
          "content_type": "text/plain",
          "file_name": "uploaded_file_name.txt"
        }
      ]
    },
    "attachments": [

    ],
    "integration_fields": [
      {
        "id": "846945422",
        "name": "id",
        "value": "435",
        "integration_id": 204584239,
        "service_name": "jira",
        "created_at": "2017-03-16T17:02:52.000Z"
      },
      {
        "id": "728894778",
        "name": "key",
        "value": "JRA-123",
        "integration_id": 204584239,
        "service_name": "jira",
        "created_at": "2017-03-16T17:02:52.000Z"
      }
    ],
    "url": "http://account1.example.org/features/PRJ1-1",
    "resource": "http://account1.example.org/api/v1/features/PRJ1-1",
    "release": {
      "id": "278327321",
      "reference_num": "PRJ1-R-1",
      "name": "Release 1",
      "start_date": "2017-03-23",
      "release_date": "2017-03-23",
      "parking_lot": false,
      "created_at": "2017-03-16T17:02:53.000Z",
      "integration_fields": [
        {
          "id": "68217473",
          "name": "id",
          "value": "777",
          "integration_id": 204584239,
          "service_name": "jira",
          "created_at": "2017-03-16T17:02:52.000Z"
        }
      ],
      "url": "http://account1.example.org/releases/PRJ1-R-1",
      "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-1",
      "owner": {
        "id": "16338845",
        "name": "John Smith",
        "email": "john.smith@account1.com",
        "created_at": "2017-03-16T17:02:53.000Z",
        "updated_at": "2017-03-16T17:02:53.000Z"
      },
      "project": {
        "id": "131414752",
        "reference_prefix": "PRJ1",
        "name": "Project 1",
        "product_line": false,
        "created_at": "2017-03-16T17:02:52.000Z"
      }
    },
    "created_by_user": {
      "id": "16338845",
      "name": "John Smith",
      "email": "john.smith@account1.com",
      "created_at": "2017-03-16T17:02:53.000Z",
      "updated_at": "2017-03-16T17:02:53.000Z"
    },
    "assigned_to_user": {
      "id": "16338845",
      "name": "John Smith",
      "email": "john.smith@account1.com",
      "created_at": "2017-03-16T17:02:53.000Z",
      "updated_at": "2017-03-16T17:02:53.000Z",
      "default_assignee": false
    },
    "requirements": [
      {
        "id": "483368544",
        "name": "Body of requirement 1",
        "reference_num": "PRJ1-1-1",
        "position": 1,
        "created_at": "2017-03-16T17:02:53.000Z",
        "updated_at": "2017-03-16T17:02:53.000Z",
        "workflow_status": {
          "id": "934242751",
          "name": "New",
          "complete": false
        },
        "url": "http://account1.example.org/requirements/PRJ1-1-1",
        "resource": "http://account1.example.org/api/v1/requirements/PRJ1-1-1",
        "description": {
          "id": "910541534",
          "body": "Body of requirement 1",
          "created_at": "2017-03-16T17:02:52.000Z",
          "attachments": [

          ]
        },
        "assigned_to_user": null,
        "created_by_user": {
          "id": "1020675218",
          "name": "Mary Humpty",
          "email": "mary.humpty@account1.com",
          "created_at": "2017-03-16T17:02:53.000Z",
          "updated_at": "2017-03-16T17:02:53.000Z"
        },
        "attachments": [

        ],
        "custom_fields": [
          {
            "key": "expected_completion_date",
            "name": "Expected completion date",
            "value": null,
            "type": "date"
          }
        ],
        "integration_fields": [

        ],
        "comments_count": 0
      }
    ],
    "initiative": {
      "id": "423077122",
      "name": "Initiative 1",
      "url": "http://account1.example.org/initiatives/423077122",
      "resource": "http://account1.example.org/api/v1/initiatives/423077122",
      "created_at": "2017-03-16T17:02:52.000Z",
      "description": {
        "id": "673273729",
        "body": "Description of initiative 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ]
      },
      "integration_fields": [

      ]
    },
    "goals": [
      {
        "id": "602095703",
        "name": "Goal 1",
        "url": "http://account1.example.org/strategic_imperatives/602095703",
        "resource": "http://account1.example.org/api/v1/goals/602095703",
        "created_at": "2017-03-16T17:02:53.000Z",
        "description": {
          "id": "166463080",
          "body": "Description of goal 1",
          "created_at": "2017-03-16T17:02:52.000Z",
          "attachments": [

          ]
        }
      }
    ],
    "comments_count": 1,
    "score_facts": [

    ],
    "tags": [
      "Infrastructure"
    ],
    "custom_fields": [
      {
        "key": "expected_completion_date",
        "name": "Expected completion date",
        "value": null,
        "type": "date"
      }
    ],
    "custom_object_links": [

    ],
    "feature_links": [
      {
        "link_type": "Depends on",
        "link_type_id": 20,
        "created_at": "2017-03-16T17:02:52.000Z",
        "parent_record": {
          "id": "1007868956",
          "reference_num": "PRJ1-1",
          "name": "Feature 1",
          "created_at": "2017-03-16T17:02:52.000Z",
          "url": "http://account1.example.org/features/PRJ1-1",
          "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
        },
        "child_record": {
          "id": "622562724",
          "reference_num": "PRJ1-2",
          "name": "Another Feature",
          "created_at": "2017-03-16T17:02:52.000Z",
          "url": "http://account1.example.org/features/PRJ1-2",
          "resource": "http://account1.example.org/api/v1/features/PRJ1-2"
        }
      }
    ]
  }
}

PUT /api/v1/ideas/:id

Link custom object records to an idea

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the idea to be edited

PUT /api/v1/ideas/PRJ1-I-1

Example CURL command

curl "https://secure.aha.io/api/v1/ideas/PRJ1-I-1" -d '{"idea":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-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
{
  "idea": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "idea": {
    "id": "58056975",
    "name": "Idea 1",
    "reference_num": "PRJ1-I-1",
    "score": 0,
    "created_at": "2017-03-16T17:02:52.000Z",
    "updated_at": "2017-03-16T17:03:04.791Z",
    "product_id": "131414752",
    "workflow_status": {
      "id": "3259216",
      "name": "New",
      "complete": false
    },
    "description": {
      "id": "103757394",
      "body": "Description of idea 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "attachments": [

      ]
    },
    "visibility": "Visible to anyone",
    "url": "http://account1.example.org/ideas/ideas/PRJ1-I-1",
    "resource": "http://account1.example.org/api/v1/ideas/PRJ1-I-1",
    "product": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-03-16T17:02:52.000Z"
    },
    "created_by_user": {
      "id": "1020675218",
      "name": "Mary Humpty",
      "email": "mary.humpty@account1.com",
      "created_at": "2017-03-16T17:02:53.000Z",
      "updated_at": "2017-03-16T17:03:04.822Z"
    },
    "assigned_to_user": null,
    "comments_count": 0,
    "endorsements_count": 1,
    "score_facts": [

    ],
    "tags": [
      "Infrastructure"
    ],
    "categories": [
      {
        "id": "972845454",
        "name": "Hard disk drive",
        "parent_id": 552935478,
        "created_at": "2017-03-16T17:02:52.000Z"
      }
    ],
    "custom_fields": [

    ],
    "custom_object_links": [

    ]
  }
}

PUT /api/v1/initiatives/:id

Link custom object records to an initiative

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the initiative to be edited

PUT /api/v1/initiatives/423077122

Example CURL command

curl "https://secure.aha.io/api/v1/initiatives/423077122" -d '{"initiative":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-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
{
  "initiative": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "initiative": {
    "id": "423077122",
    "name": "Initiative 1",
    "status": "not_started",
    "effort": 10,
    "value": 70,
    "presented": true,
    "start_date": "2017-03-23",
    "end_date": "2017-03-30",
    "position": 1,
    "created_at": "2017-03-16T17:02:52.000Z",
    "updated_at": "2017-03-16T17:03:05.532Z",
    "url": "http://account1.example.org/initiatives/423077122",
    "resource": "http://account1.example.org/api/v1/initiatives/423077122",
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-03-16T17:02:52.000Z"
    },
    "workflow_status": {
      "id": "53968949",
      "name": "Not Started",
      "complete": false
    },
    "description": {
      "id": "673273729",
      "body": "Description of initiative 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "attachments": [

      ]
    },
    "comments_count": 1,
    "goals": [

    ],
    "features": [
      {
        "id": "1007868956",
        "reference_num": "PRJ1-1",
        "name": "Feature 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "url": "http://account1.example.org/features/PRJ1-1",
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
      }
    ],
    "releases": [
      {
        "id": "278327321",
        "reference_num": "PRJ1-R-1",
        "name": "Release 1",
        "start_date": "2017-03-23",
        "release_date": "2017-03-23",
        "parking_lot": false,
        "created_at": "2017-03-16T17:02:53.000Z",
        "integration_fields": [
          {
            "id": "68217473",
            "name": "id",
            "value": "777",
            "integration_id": 204584239,
            "service_name": "jira",
            "created_at": "2017-03-16T17:02:52.000Z"
          }
        ],
        "url": "http://account1.example.org/releases/PRJ1-R-1",
        "resource": "http://account1.example.org/api/v1/releases/PRJ1-R-1",
        "owner": {
          "id": "16338845",
          "name": "John Smith",
          "email": "john.smith@account1.com",
          "created_at": "2017-03-16T17:02:53.000Z",
          "updated_at": "2017-03-16T17:02:53.000Z"
        },
        "project": {
          "id": "131414752",
          "reference_prefix": "PRJ1",
          "name": "Project 1",
          "product_line": false,
          "created_at": "2017-03-16T17:02:52.000Z"
        }
      }
    ],
    "integration_fields": [

    ],
    "custom_fields": [

    ],
    "custom_object_links": [

    ]
  }
}

PUT /api/v1/goals/:id

Link custom object records to a goal

Custom Tables are an Enterprise+ exclusive feature.

Parameters

Name Description
id * Numeric ID, or key of the goal to be edited

PUT /api/v1/goals/602095703

Example CURL command

curl "https://secure.aha.io/api/v1/goals/602095703" -d '{"goal":{"custom_object_links":{"customers":["640362830"]}}}' -X PUT \
	-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
{
  "goal": {
    "custom_object_links": {
      "customers": [
        "640362830"
      ]
    }
  }
}

Response

Status: 200 OK
  Content-Type: application/json; charset=utf-8
{
  "goal": {
    "id": "602095703",
    "name": "Goal 1",
    "effort": 10,
    "value": 70,
    "position": 1,
    "created_at": "2017-03-16T17:02:53.000Z",
    "updated_at": "2017-03-16T17:02:53.000Z",
    "url": "http://account1.example.org/strategic_imperatives/602095703",
    "resource": "http://account1.example.org/strategic_imperatives/602095703",
    "description": {
      "id": "166463080",
      "body": "Description of goal 1",
      "created_at": "2017-03-16T17:02:52.000Z",
      "attachments": [

      ]
    },
    "success_metric": {
      "name": "Metric 1",
      "description": {
        "id": "546284368",
        "body": "Description of goal 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "attachments": [

        ]
      },
      "workflow_status": {
        "id": "1009437757",
        "name": "In progress",
        "complete": false
      }
    },
    "project": {
      "id": "131414752",
      "reference_prefix": "PRJ1",
      "name": "Project 1",
      "product_line": false,
      "created_at": "2017-03-16T17:02:52.000Z"
    },
    "initiatives": [

    ],
    "comments_count": 1,
    "features": [
      {
        "id": "1007868956",
        "reference_num": "PRJ1-1",
        "name": "Feature 1",
        "created_at": "2017-03-16T17:02:52.000Z",
        "url": "http://account1.example.org/features/PRJ1-1",
        "resource": "http://account1.example.org/api/v1/features/PRJ1-1"
      }
    ],
    "releases": [

    ],
    "custom_fields": [

    ],
    "custom_object_links": [

    ]
  }
}

Overview

API Resources